Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add API to configure icon colors #7068
This PR allows the icon to configure 3 colors: backgroundColor, iconColor, shadowColor.
Some discussion points:
How has this been tested?
This change is very risky as we are changing how an icon is represented, try to do some smoke testing around Gutenberg in places where we show block icons and see things work as expected.
Hi @youknowriad thank you for the review!
I expanded the docs to include this use case.
I'm sorry I missed an update to the gist, with changes applied during the revisions. The Gist was updated and things should work now.
I am approving as this does work. I will add a note though we need to do something about checking accessibility issues such as contrast. We can also easily now have a white background with white icon. That's not great and something maybe we should check to fix.
Jun 4, 2018
added a commit
this pull request
Jun 5, 2018
I've made a PR for the documentation to add an example with foreground color and shadow color.
By the way, shadowColor doesn't seems to work for me as shown in the screenshot. Any idea why?
Also, the fallback with most readable for the foreground color is not always perfect : sometimes with a dark color, the svg color stays black.