You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Same issue, but different reasoning than #11955, which was closed without resolution in November 2018. The issue deserves another look and a solution as the :root pseudo-class is a core element of CSS custom properties which will see significantly increased use as browsers now provide wide-spread support:
When a theme uses CSS custom properties (aka "CSS variables") and declare those properties using the :root pseudo-class in the editor styles, the injection script invalidates those declarations by outputting .editor-styles-wrapper :root.
To Reproduce
Steps to reproduce the behavior:
In editor styles document, declare CSS custom properties with :root pseudo-class.
Use above custom properties in another rule.
Add editor style using add_editor_style().
Run in browser.
Observe the declared custom properties not kicking in.
Inspect code and find the :root pseudo-class has the .editor-styles-wrapper class prepended.
Expected behavior :root pseudo-class should be preserved without alterations.
Desktop (please complete the following information):
OS: All
Browser: All with custom property support
Version: trunk
Additional context
See WP Rig PR #332 and issue #361 for further discussion and original discovery of the issue by @benoitchantre.
The text was updated successfully, but these errors were encountered:
Describe the bug
Same issue, but different reasoning than #11955, which was closed without resolution in November 2018. The issue deserves another look and a solution as the
:root
pseudo-class is a core element of CSS custom properties which will see significantly increased use as browsers now provide wide-spread support:When a theme uses CSS custom properties (aka "CSS variables") and declare those properties using the
:root
pseudo-class in the editor styles, the injection script invalidates those declarations by outputting.editor-styles-wrapper :root
.To Reproduce
Steps to reproduce the behavior:
:root
pseudo-class.add_editor_style()
.:root
pseudo-class has the.editor-styles-wrapper
class prepended.Expected behavior
:root
pseudo-class should be preserved without alterations.Desktop (please complete the following information):
Additional context
See WP Rig PR #332 and issue #361 for further discussion and original discovery of the issue by @benoitchantre.
The text was updated successfully, but these errors were encountered: