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
Use inline icons as components #2670
Conversation
We've had a lot of luck recently just putting the SVG inline in the CSS like bootstrap's now doing: https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss#L881 |
@cbeer the problem with that approach is you can't style the svg using css, can you? For example |
7584a17
to
49057c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about this on the committer's call and like this pattern. We'd just like to see documentation in the class or method level to describe how to customize the icon if that's what you want to do
deedcca
to
60536ba
Compare
@tpendragon I added class documentation in the two icon classes. |
Another option I had to research is to still read the svg out of a file... |
CI's failing, but besides that 👍 |
This makes the icons simple to customize and allows us to deprecate behavior that deals with the internals of the asset pipeline
I'm thinking about @hackartisan's questions yesterday - if we made the new components simple extensions of Edit: I could help look into that post-merge, but it's a separate change. |
This makes the icons simple to customize and allows us to deprecate behavior that deals with the internals of the asset pipeline. This approach is an alternative to #2668 where we add awareness of other asset pipelines (e.g. propshaft).