json2mq
json2mq is used to generate media query string from JSON or javascript object.
Install
npm install json2mq
Usage
var json2mq = ;;// -> '(min-width: 100px) and (max-width: 200px)'
- Media type
; // -> 'screen'
- Media type with negation
; // -> 'not handheld'
- Media features can be specified in camel case
;// -> '(min-width: 100px) and (max-width: 200px)'
- px is added to numeric dimension values
;// -> '(min-width: 100px) and (max-width: 20em)'
- Multiple media queries can be passed as an array
; // -> 'screen and (min-width: 100px), handheld and (orientation: landscape)'
Contributors
- Eric Schoffstall