[wp-trac] [WordPress Trac] #55518: Global styles variables and the specificity problem

WordPress Trac noreply at wordpress.org
Sun Apr 3 12:13:08 UTC 2022


#55518: Global styles variables and the specificity problem
--------------------------+--------------------------------
 Reporter:  gyurmey       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Themes        |     Version:
 Severity:  normal        |  Resolution:  reported-upstream
 Keywords:                |     Focuses:  css
--------------------------+--------------------------------
Changes (by ocean90):

 * status:  assigned => closed
 * component:  General => Themes
 * version:  5.9.2 =>
 * milestone:  Awaiting Review =>
 * resolution:   => reported-upstream


Old description:

> [https://wordpress.org/support/topic/global-styles-2/ Details]

New description:

 Hi,
 I am trying to use global variables for the html tag but they are declared
 for the body tag and there are CSS cascading issues. Is there any filter
 to change the body tag to :root or html?

 Instead of this:

 {{{
 <style id='global-styles-inline-css'>
 body {--wp--preset--color--background: #f8f5f2; [...] </style>
 }}}



 I'd like it

 {{{
 <style id='global-styles-inline-css'>
 :root {--wp--preset--color--background: #f8f5f2; [...] </style>
 }}}



 Is it possible? I have hot no idea how to fix it.


 Previously reproted in https://wordpress.org/support/topic/global-
 styles-2/.

--

Comment:

 Hello @gyurmey, welcome to WordPress Trac!

 Thanks for the report. For issues with the block editor we are using the
 [https://github.com/WordPress/gutenberg Gutenberg GitHub repo] and there's
 already an issue for this at
 https://github.com/WordPress/gutenberg/issues/35840.
 Closing therefore as ''reported-upstream''.

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


More information about the wp-trac mailing list