- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 388
[Icons] explain svg colors and improve example configuration #2671
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
Conversation
5677614    to
    0d2a283      
    Compare
  
    | ah, i did not realize its a default configuration. i reverted that change. although i don't understand what that configuration is done for. all icons i look at use  if the default configuration is to work around weird icons that do not define the fill or outline to be currentColor, we could keep that in the doc about default configuration, but the example for adding global settings could show how to set color and size for example, to do something the user actually could want to do. | 
| It is hard to find a solution that pleases everyone, and works for every icon 🤷 "Styling icons" is indeed a good idea for a new dedicated section, with examples of hard-coded style, CSS classes, or global css styling. Would you like to try writing a first version of it ? | 
| i think a section on styling icons is the right idea to share the relevant knowledge, even if it is not strictly about the symfony bundle per se. i can't promise if i find time, its gotten pretty busy for me right now. i will try, but if somebody else wants to do it, don't hesitate :-) | 
5410735    to
    b9347f6      
    Compare
  
    | Rebased (then removed my merge commit 😅 ) and ready to merge :) | 
| Thank you David. | 
I got mislead by the configuration examples setting the
fillattribute on the<svg>element. All icons i looked have<path>elements that referencecurrentColorfor either fill or outline. andcurrentColorin the context of CSS is thecolorattribute of the element. thus, to change the color of an icon, we need to set the CSS color. changing thefillattribute on the top level<svg>has no effect.I am not 100% sure if this is always true, maybe the section i add needs to be less assertive or explain in which cases it is correct.