Global Styles: Root font-size utility classes mismatch theme settings. #21759
Labels
[Block] Paragraph
Affects the Paragraph Block
CSS Styling
Related to editor and front end styles, CSS-specific issues.
[Feature] Themes
Questions or issues with incorporating or styling blocks in a theme.
[Status] In Progress
Tracking issues with work in progress
While testing the new font-size options in Gutenberg 7.9, I noticed there’s some additional CSS on the frontend that overrides my the font-sizes I have set in CSS and the
add_theme_support()
editor font-size settings.These screenshot illustrates the issue:
Additionally, in my
functions.php
file I have this snippet:(only large is shown here for context, but all the editor font-sizes have this issue)
Expected behavior
I expected Gutenberg to accept the font-sizes I set both in
functions.php
and my theme’s stylesheet but both are getting overwritten because Gutenberg is adding:root
to the font-size selectors.I recognize I could fix this in my theme but adding the
:root
selector to my stylesheet’s font-size utility class selectors, but other Gutenberg utility classes like.has-background
or.alignwide
do not use:root
in their selectors.For consistency, can we simply remove the
:root
selector here?Editor version (please complete the following information):
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: