Open jasmussen opened 7 years ago
Missed this. Maybe I'll hook this repo into Slack.
I suppose, this would be ok, although I personally think of this repository as a group of single color "icons", but maybe it could expand to include logos like this. I would consider just using the standard Google logo for this, until the feature is shipped.
We would need to clearly state when it would be appropriate to use a multi-color logo. For example, only include if there is no other alternative. We also don't want a colored version for each logo in the repo.
@folletto what do you think?
This would also be helpful for the Social Login project - for example, Automattic/wp-calypso#15542 requires the multi-coloured Google logo, so I'm just pasting an entire SVG into place. Using <SocialLogo>
would be so much nicer.
I think it's important as some brand guidelines require the logo to be colored in some or all instances – as @pento pointed out, here's the Google guidelines detailing the requirement.
I think the main thing here is to make explicit the difference, and why it's done in a specific way.
Assumptions:
So we could:
/sources/svg/color
.color="true"
.Downside of this: icons with color alternatives are duplicated. We might fill
them by default but seems a bit heavy handed?
Would be nice if we could "warn" in some way when the monochrome icon is used if it has also a color alternative, but seems hard to do without adding too much clutter in the logs.
Great discussion here. Good points all around.
Regarding the technicality of this — we could do as little as not strip out the color of the SVGs.
We'd still be able to override the color, make it monochrome. But if we wanted the colors to "shine through", we could let them.
No strong opinion on this though.
Yeah, that starts on different assumptions. If we do that, I wonder if it would make more sense to DEFAULT to all colored, and then allow override?
Maybe we 'bake' the brand color into each logo (even if it's just one color), and it'll be up to the user of the icons to make all of the icons a uniform color (fill: currentColor). In other words, the default is colored.
Maybe we 'bake' the brand color into each logo (even if it's just one color), and it'll be up to the user of the icons to make all of the icons a uniform color (fill: currentColor). In other words, the default is colored.
This was the gist of my initial idea in this ticket. We can even let the default be monochrome, so you'd have to unstyle a logo (inherit
) to get the colors out.
The only thing we'd need to do, is ensure that colors aren't stripped out from the SVGs during the minification process.
To facilitate this, I did a further refactoring to the build process in Gridicons, so we can parametrize what gets transformed and how better, and also move the files around: https://github.com/Automattic/gridicons/pull/241
I think the current removal of styling is done by svgmin
, which happens fairly early. If we merge ⌗241, I can look into porting the same build process here too, while removing the svgmin
attribute. The two aren't strictly related, but I think that if the repositories start to diverge, it's better if we are able to more clearly see where the divergence is.
We're currently integrating Google My Business into WordPress.com, and as such will have to display the Google My Business logo. Right now we're just using an image file, but I was wondering if we're still thinking of refactoring Social Logos to accept colored logos, or if we should find another place for locating such logos (we're planning on integrating more Google services in the near future).
I think there has been no update to the discussion above. My take is:
With an SVG icon, you can change the color of the whole icon with
fill
, so it doesn't matter what color the individual files are born with.For some logos, like Google Photos, it's really important they have color. We should see if there's a way to make the scripts not strip out color attributes, if not for all logos, then at least optionally for some of them.
Here's a Google Photos logo, for example: