LitoMore / simple-icons-cdn

Colorable Simple Icons CDN
https://cdn.simpleicons.org
MIT License
90 stars 4 forks source link

Icon Colour Options #8

Closed adamrusted closed 9 months ago

adamrusted commented 9 months ago

The default behaviour of the CDN is to currently display the brand colour version. I propose that we amend this, so by default no fill colour is used - but a user can use 'brand' in either the light/dark colour to display the brand colour.

LitoMore commented 9 months ago

They should use the jsDelivr or unpkg instead if they want the black one.

This CDN is made for those people who want colors.

adamrusted commented 9 months ago

But we could feasibly expand the functionality of this CDN. Assuming we're well below Vercel free tier usage?

LitoMore commented 9 months ago

I don't want this change. This will be a breaking change for my users. I prefer to keep the current logic.

Especially for those Notion users, they need color by default.

adamrusted commented 9 months ago

How's about this then. Don't break existing functionality, but reserve brand as a keyword that can be used in either place, that and inherit so that people can explicitly call for the brand colour, or for the icon to inherit the colour given by external styles.

LitoMore commented 9 months ago

The currentColor won't work. CSS styles cannot cross HTML documents. See https://github.com/simple-icons/simple-icons/issues/8573.

Currently, any non-color inputs will fallback to brand color. For example: https://cdn.simpleicons.org/discord/nothing.

So, reserving the brand keyword is unnecessary.

adamrusted commented 9 months ago

The currentColor won't work. CSS styles cannot cross HTML documents.

Fair enough. I'll remove 'inherit' from the PR.

Currently, any non-color inputs will fallback to brand color.

What about in the dark mode color - for example:

https://cdn.simpleicons.org/adobe/black/nothing

LitoMore commented 9 months ago

As my documentation mentioned:

Passing in an invalid value will use the default color as a fallback.

adamrusted commented 9 months ago

As my documentation mentioned:

Passing in an invalid value will use the default color as a fallback.

It doesn't work for the dark-mode colour. See https://cdn.simpleicons.org/adobe/white/nothing I would expect the logo to be white on light mode, and the brand color on dark mode.

LitoMore commented 9 months ago

It should be fixed now.