css-mediaquery
css-mediaquery copied to clipboard
Parses and determines if a given CSS Media Query matches a set of values via JavaScript.
I'd love to see this library get updated, as it's in fairly regular use and hasn't been touched in 9 years. In particular, I'm trying to parse a media query...
Since numeric values are accepted for width/height etc it's confusing to never match `0`.
In contrast to other media features, [color-gamut](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/color-gamut) and [any-pointer](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/any-pointer) can match multiple values at the same time. For example, if the user display supports DCI-P3, the following expressions will match:...
Module has a wrong SPDX identifier as the "license" field in "package.json". According to [spdx list](https://spdx.org/licenses/) "BSD" is not a valid spdx identifier.
`(max-width: calc(100px - 1px))` throws an error on the v0.1.2
We noticed a strange behavior when trying to do matches. Issue demostrated below: ```js > const css = require('css-mediaquery') undefined > css.match('screen and (min-width: 48em)', { width: '48em' }) false...
did you published the last version on npm? When I run `npm install css-mediaquery` I get an old code. The `package.json` shows 0.1.2 version but the code is from 0.1.1....
Hi, I've found your library useful with those minor enhancements, let me know what you think. In my app I match the query multiple times(*element query style). I don't want...
i like your latest changes for strict parsing. do you plan a new npm release with this changes soon?
``` javascript var mq = require('css-mediaquery'); mq.parse('only screen and (min-width: 950px)') ``` ``` json [{ "inverse": false, "type": "screen", "expressions": [{ "modifier": "min", "feature": "width", "value": "950px" }] }] ```...