Skip to content

Nested @media in style sheet fails to parse #3988

@Fox32

Description

@Fox32

Node.js version

v20.19.2

jsdom version

27.2.0

Minimal reproduction case

const { JSDOM } = require("jsdom");

const options = {};
const dom = new JSDOM(`
  <style>
    @media (min-width:0px) {
      @media (orientation: landscape){
        .css-1gak8h1-MuiToolbar-root-MuiTablePagination-toolbar {
          min-height:48px;
        }
      }
    }
  </style>
`, options);

How does similar code behave in browsers?

This pattern is used by Mui an generally worked in the past, like jsdom@27.0.1.

What is the problem?

This fails with Could not parse CSS stylesheet, the exact error is hidden.

Metadata

Metadata

Assignees

No one assigned

    Labels

    csshas to-upstream testThis bug has a failing to-upstream web platform test waiting to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions