NV / CSSOM

Unmaintained! ⚠️ CSS Object Model implemented in pure JavaScript. Also, a CSS parser.
https://nv.github.io/CSSOM/docs/parse.html
MIT License
751 stars 99 forks source link

Fixes @font-face nested in @media #103

Closed jonkemp closed 4 years ago

jonkemp commented 4 years ago

Fixes #102

NV commented 4 years ago

Could you add tests to spec/parse.spec.js?

jonkemp commented 4 years ago

@NV ~I don't understand how to run the tests.~ I added a test, but I'm not sure it's right.

NV commented 4 years ago

Looks good! Thank you for fixing this!

NV commented 4 years ago

This broke nested media queries :(

https://nv.github.io/CSSOM/docs/parse.html#css=%40media%20a%20%7B%0A%20%20%40media%20b%20%7B%0A%20%20%20%20h1%20%7Bcolor%3A%20yellow%7D%0A%20%20%7D%0A%7D%0A

@media a {
  @media b {
    h1 {color: yellow}
  }
}