-
Notifications
You must be signed in to change notification settings - Fork 10
Don't set fill for icons that set declare it #207
Conversation
Only override the fill for elements that don't declare one. Fixes #206
Closed because I'm a doofus and named the branch incorrectly |
Wait no, I'm extra dumb. 207 is the PR ticket. I didn't sleep well. sigh |
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.
Before we can merge this patch, we need to do 2 things:
- Clean-up existing icons. There are nearly 50 uses of
fill="..."
attribute in SVG icons across the project. If we merged this PR, which narrows the feature to fill–less nodes only, the dynamic icon colors wouldn't work anymore for all those icons. This is a regression we must avoid. - We must verify what multi–color icons look like after this fix. And I'm speaking mainly about highlight icons which are configurable.
I made a pen with most (I think all) icons from the ckeditor repos https://codepen.io/michaeldjeffrey/pen/YRGWLZ Regarding icons like Highlight. The colors are set by setting the Something I noticed in making that codepen, some of the icons like Other icons of note. The I guess a couple options would be:
What would you like to see from me to move this forward? |
To start off, I noticed that you mixed CKEditor 4 and CKEditor 5 icons. They are two different projects and Just to let you know, we already have a manual test that agregates all icons in the project: Having configured the development environment, you can run it using Back to the issue, I think we could get rid of the |
If someone used our SVG files in other places, not styled with our |
I was suprised, but it isn't actually true. Even clean To sum up I'm 👍 for removing it. By the way we could decide if we are using |
And whatever convention we agree upon, let's write it down in https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/development-environment.html#svg-icons. |
I pushed changes to the SVG icons in various repos. The changes are as follows:
You can check them by using Note: Since I automated my work with regexps and svgo, the changes must be thoroughly reviewed and verified in all browsers. cc @dkonopka |
Other PRs in a human-readable format:
Have fun, @dkonopka 😛 |
BTW, this change saves us ~2.5kB of code. |
How did you clean those svg files? Did you use some tool? Is it documented in the dev env guide? |
On my TODO. |
Let's keep this PR open until we have the docs too 😈 |
@Reinmar Waiting in ckeditor/ckeditor5#1361. |
Thanks, @michaeldjeffrey for your contribution! Let us know if everything is OK now. |
Thanks for running with this. Much appreciated. |
Only override the fill for elements that don't declare one.
Closes ckeditor/ckeditor5#3420