Setting Button block to Outline Style causes CSS output order to change and cause conflicts #63912
Closed
2 tasks done
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Typically,
wp-block-library-inline-css
is output beforeglobal-styles-inline-css
so that styles fromglobal-styles-inline-css
(i.e. those fromtheme.json
) override those fromwp-block-library-inline-css
(like the various WP default colors and font sizes).For some reason, setting a Button block on a page to Outline style causes
wp-block-library-inline-css
to print afterglobal-styles-inline-css
, causing it to override any same-name settings intheme.json
.This is an absolute disaster for us, because our theme defines a
normal
font size, and now it is being overridden with by the WP default of16px
on any page that uses an Outline button.Step-by-step reproduction instructions
theme.json
file to include a font size with the slugnormal
that is something fairly large, like2rem
2rem
16px
Screenshots, screen recording, code snippet
Normal print order when an Outline style button is not on the page:
Print order with an Outline style button on the page:
Environment info
WordPress version 6.6.1
Twenty Twenty Four theme (only modified to add a font size to
theme.json
)no plugins
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: