[wp-trac] [WordPress Trac] #47925: Twenty Nineteen: Size of style.css seems excessively large (225% as large as the next largest theme's CSS)

WordPress Trac noreply at wordpress.org
Fri Aug 2 06:09:55 UTC 2024


#47925: Twenty Nineteen: Size of style.css seems excessively large (225% as large
as the next largest theme's CSS)
---------------------------+-------------------------------
 Reporter:  westonruter    |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Bundled Theme  |     Version:  5.0
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:  css, performance
---------------------------+-------------------------------

Comment (by sabernhardt):

 You may have meant the same thing by "all" selectors, but `:is()` matches
 the //highest// specificity of //any// selector in the list.

 Using `:where()` for both sets of selectors would make these font
 overrides ineffective. Even the `body` element's font would remain the
 theme's serif selection instead of the fonts chosen for each language.

 Combining `:where(*):is(:lang())` would have a specificity of `0-1-0`,
 which is not high enough for all matching elements.
 - Anything that matches the 14 element-only selectors would show in the
 language's font.
 - Located at the beginning of the stylesheet, the non-latin font rulesets
 could not override 17 single-class selectors.
 - The overrides would not replace the font for 50 selectors with a
 specificity higher than one class, regardless of where these rules are.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47925#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list