Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): ignore fill="none" paths on icon svgs #8585

Merged

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented May 5, 2021

Closes #8583

This PR ignores SVG icon paths with fill="none" inline styles when applying icon button color styles. An alternative solution would be to check for and remove extraneous layers on the affected assets (for example the PlayOutlineFilled32 icon does not appear to require the <path d="M11,23a1,1,0,0,1-1-1V10a1,1,0,0,1,1.4473-.8945l12,6a1,1,0,0,1,0,1.789l-12,6A1.001,1.001,0,0,1,11,23Zm1-11.3821v8.7642L20.7642,16Z"></path> while PlayOutlineFilled16 is unaffected because it does not contain this layer). This approach would be more involved as it requires an audit of every icon

Testing / Reviewing

Confirm that all icon button variants render correctly, the temporary PlayOutlineFilled16 and PlayOutlineFilled32 options can be removed before merging

@emyarod emyarod requested a review from a team as a code owner May 5, 2021 15:53
@emyarod emyarod requested review from joshblack and tw15egan May 5, 2021 15:53
@emyarod
Copy link
Member Author

emyarod commented May 5, 2021

if we can update the source SVGs then this additional selector won't be needed

@netlify
Copy link

netlify bot commented May 5, 2021

Deploy preview for carbon-elements ready!

Built with commit 7442c33

https://deploy-preview-8585--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented May 5, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 7442c33

https://deploy-preview-8585--carbon-components-react.netlify.app

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

@kodiakhq kodiakhq bot merged commit dc447cb into carbon-design-system:main May 7, 2021
@emyarod emyarod deleted the 8583-icon-svg-fill-none-paths branch May 10, 2021 16:49
@tw15egan tw15egan mentioned this pull request May 10, 2021
22 tasks
@emyarod emyarod mentioned this pull request May 17, 2021
94 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PlayOutlineFilled32 icon doesn't render correctly when used in a Button
3 participants