Skip to content

Support for nesting @media atrules inside rules? #346

@gabrielmfern

Description

@gabrielmfern

This seems to be valid for Chrome, and I think it's for most browsers.

.foo {
  @media (min-width: 640px) {
    color: blue;
  }
}

I'm trying to parse the output from Tailwind CSS's runs, and this is how it uses media queries. At the same time, seems like stylis tries to handle this by placing the media query as a sibling of the rule, and not as children.

If I try to serialize-stringify it, it also changes the orders of things, but gets it to something that should work:

@media (min-width: 640px){.foo{color:blue;}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions