[wp-trac] [WordPress Trac] #58292: CSS @container queries break block editor styles

WordPress Trac noreply at wordpress.org
Thu May 11 01:29:08 UTC 2023


#58292: CSS @container queries break block editor styles
--------------------------+-----------------------------
 Reporter:  retrovertigo  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Post Formats  |    Version:  6.1.1
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:  css           |
--------------------------+-----------------------------
 Hi there,

 It seems that having any selector inside a css `@container` query breaks
 the inlining of the styles applied to the block editor (`.editor-styles-
 wrapper`) via the `add_editor_style( 'style-editor.css' );` file.

 The CSS from `style-editor.css` does simply not get applied at all.
 Removing all `@container` queries "fixes" that issue.

 This is the minimum test case where the issue appears

 {{{
 #!css
 @container  {
   .selector {}
 }
 }}}

 Note: Without the `.selector` the query gets ignored and the styles are
 getting applied.

 Is there any known way around this issue besides removing all @container
 queries?

 I have a file which gets auto-generated alongside my `style.css` and
 having to revert my code to work without the `@container` queries is
 currently a bit of a blow.

 Many thanks,
 Albert

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58292>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list