source-media-query-builder
Build media-query for the
source
node with helpers
Install
npm i source-media-query-builder
Helpers
(feature < value) range
Easily build simple range
const builder = // "(max-width: 399px)" // "(max-width: 400px)" // "(width: 400px)" // "(min-width: 400px)" // "(min-width: 401px)"
(value < feature < value) range
Easily build multiple range
const builder = // "(min-width: 301px) and (max-width: 399px)" // "(max-width: 300px) and (min-width: 400px)"
(hd: bool) property
Easily target high or standard device pixel resolution
const builder = // "(min-resolution: 144dpi)" // "(max-resolution: 96dpi)"
Example
const builder = // "(width: 400px)" // "(min-width: 301px) and (max-width: 399px) and (min-resolution: 144dpi)" // "(max-width: 400px) and (max-resolution: 96dpi)'"
License
MIT