#62128 closed defect (bug) (fixed)
Twenty Thirteen to Twenty Sixteen: update Genericons
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.9 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | has-patch |
| Focuses: | Cc: |
Description
@metodiew suggested removing the EOT rule and/or IE hacks from the Genericons CSS for Twenty Fourteen and Twenty Sixteen (in pull requests 4644 and 4658).
Firefox shows a "rejected by sanitizer" console error related to the EOT file reference in the CSS from Twenty Thirteen and Twenty Fourteen, so I would like to remove that.
It might be worth updating more Genericons files, too.
- Twenty Sixteen uses 3.4.1, which almost matches the current repository. PR 83 added quotes to the
filterrules, but those lines probably could be removed instead. - Twenty Fifteen uses 3.2, which might be close enough to 3.4.1 to copy files there without editing much.
- Twenty Thirteen and Twenty Fourteen have 3.0.3, and that version had a different file structure (with a
fontdirectory and different names).
Change History (23)
This ticket was mentioned in PR #7452 on WordPress/wordpress-develop by @sabernhardt.
14 months ago
#1
- Keywords has-patch added
#2
@
14 months ago
The PR removes console errors in Firefox, but the console can still show warnings ("no supported format found" and/or "Glyph bbox was incorrect"). I am less concerned about those than the sanitizer errors.
#4
@
5 weeks ago
- Milestone changed from Awaiting Review to 6.9
- Type changed from enhancement to defect (bug)
#5
@
5 weeks ago
The PR does not (yet) update the version string. That could be part of the version bumps on #64069 if it uses the commit date, or I could use '20251202' now.
#6
@
5 weeks ago
I used 20251202 so testing the patch would be easier. If the commit date is more appropriate, that can be changed later.
#7
@
5 weeks ago
To see the icons in each theme, you could create a post with this content and view the icons on the front end.
#9
@
5 weeks ago
Now that woff is baseline, is it worth removing Genericons.ttf and Genericons.svg from the package and CSS reference?
There's also some webkit hacks that I think can go too:
@media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { font-family: "Genericons"; src: url("./Genericons.svg#Genericons") format("svg"); } }
#10
@
4 weeks ago
I missed the version string in twentythirteen_custom_header_fonts(), which is now part of the patch.
I also agree about removing the -webkit-min-device-pixel-ratio hack from Twenty Fifteen and Twenty Sixteen. That apparently was for Chrome on Windows until Chrome 38 dropped support for SVG fonts.
Additional steps are more questionable for this ticket, especially since the cycle is now in beta.
- Remove the TTF and SVG
srcreferences. WOFF support seems good enough now. - Remove all prefixes from
transformin the rotate and flip classes (Twenty Sixteen). In admin styles, [41062] removed-ms-transform, and [43309] removed-webkit-transform. - The
transitionprefixes probably should stay as they are for anyone who overruled them, but the second time value is missing a unit. The first time could have a leading zero too:-moz-transition: color 0.1s ease-in 0s; - Remove
speak: neverand add the empty alternativecontentvalues for eachgenericon-class, as [60885] did. - Update the themes'
style.cssvalues forcontentandspeakproperties. (This probably should be done, on a separate ticket.)
I theoretically could copy the final modified stylesheet from Twenty Sixteen to use nearly the same file for all four themes, but Twenty Thirteen and Twenty Fourteen should continue to set width and height at 16px. And I'm not sure what other adjustments those two themes might need with that change.
This ticket was mentioned in PR #10427 on WordPress/wordpress-develop by @sabernhardt.
4 weeks ago
#12
Alternative:
In addition to removing the EOT, filter, and various hacks, this includes three extra changes to consider.
- Removes the TTF and SVG
srcreferences for all four themes. - Removes all prefixes from
transformin the rotate and flip classes available in Twenty Sixteen. - Edits the values for prefixed transition properties in Twenty Fifteen and Twenty Sixteen.
#13
@
4 weeks ago
I created a second PR to consider a few of the extra changes.
I changed my mind about the empty alternative text. Its browser support is good for the admin at 93.12%, but I am not ready to add that in front-end stylesheets.
This ticket was mentioned in Slack in #core-performance by westonruter. View the logs.
4 weeks ago
@westonruter commented on PR #10427:
4 weeks ago
#15
Would these changes be proposed upstream at https://github.com/Automattic/Genericons also?
@sabernhardt commented on PR #10427:
4 weeks ago
#16
Would these changes be proposed upstream at https://github.com/Automattic/Genericons also?
The `transition-delay` issue was reported already, and I updated the PR accordingly.
Additional changes could be suggested upstream, but I doubt it will be updated anymore. https://github.com/Automattic/Genericons/pull/105 and https://github.com/Automattic/Genericons/issues/106 encouraged using Genericons Neue or Social Logos instead in 2016, and the last update to this project's repository was five years ago.
@sabernhardt commented on PR #10427:
4 weeks ago
#17
the font files can be removed with the change to only include the encoded woff font. (eot, svg and ttf)
I prefer not to delete any files.
- Child themes and plugins can replace the stylesheet with one that still contains references to any of the font files (likely for reducing CSS). The Genericons
readmefiles even describe creating your own styles. - T13 and T14 have included the OTF as part of the package, and the stylesheet did not use that.
I might be having a silly but I can't actually see where the icons are used in 2016
T16 uses the icons in several places, anywhere the content value starts with "\f. That includes navigation toggle buttons and arrow links, social navigation, etc.
@peterwilsoncc commented on PR #10427:
4 weeks ago
#18
I prefer not to delete any files.
- Child themes and plugins can replace the stylesheet with one that still contains references to any of the font files (likely for reducing CSS). The Genericons
readmefiles even describe creating your own styles.
- T13 and T14 have included the OTF as part of the package, and the stylesheet did not use that.
OK, I'm happy to follow your advice on this as you work on the bundled themes heaps more than I do.
@sabernhardt commented on PR #10427:
3 weeks ago
#19
I'm happy to commit this for you if you like.
Thanks!
@westonruter commented on PR #10427:
3 weeks ago
#21
Committed in r61109.
@westonruter commented on PR #7452:
3 weeks ago
#22
Committed in r61109.
filterrules from the CSS included in Twenty Sixteen.Trac 62128