Skip to content

Custom CSS Support: Media queries #76728

@scruffian

Description

@scruffian

In #73959 we added support for custom CSS to individual blocks. It would be great if this also supported media queries. At the moment if I add:

  @media (min-width: 1024px) {
    & {
      grid-template-columns: repeat(2, 1fr); /* 2 columns at 1024px+ */
    }
  }

This is what gets outputted:

:root :where(.wp-custom-css-af3a99c3@media (min-width: 1024px) ){}:root :where(.wp-custom-css-af3a99c3){grid-template-columns: repeat(2, 1fr); }

I would expect this:

@media (min-width: 1024px) ){ :root :where(.wp-custom-css-af3a99c3){grid-template-columns: repeat(2, 1fr); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    CustomizationIssues related to Phase 2: Customization efforts[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions