Skip to content

Nested media queries #104

@dyatko

Description

@dyatko

I'm running tests using latest jest and jsdom fails due to "Could not parse CSS stylesheet"

jest: 24.9.0
jsdom: 15.2.1
cssom: 0.4.2

The issue is with inherited media queries which work perfectly in Chrome.

@media (min-width: 768px) {
  h1 {
    color: red;
  }

  @media (min-resolution: 0.001dpcm) {
    h1 {
      color: yellow;
    }

    @supports (-webkit-appearance: none) {
      h1 {
        color: green;
      }
    }
  }
}

@media (min-resolution: 0.001dpcm) {
  a {
    color: green;
  }
}

@supports (-webkit-appearance: none) {
  p {
    color: blue;
  }
}
<h1>Hello!</h1>
<p>
  Inherited media queries <a href="#">here</a>.
</p>

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