Skip to content

Commit

Permalink
Minor change readme formating
Browse files Browse the repository at this point in the history
  • Loading branch information
akiran committed Nov 22, 2014
1 parent 4d9a366 commit da7f46b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@ json2mq is used to generate media query string from JSON or javascript object.
## Usage
```javascript
var json2mq = require('json2mq');
json2mq({minWidth: 100, maxWidth: 200}); // -> '(min-width: 100px) and (max-width: 200px)'
json2mq({minWidth: 100, maxWidth: 200});
// -> '(min-width: 100px) and (max-width: 200px)'
```
* Media type should be specified using type property
```javascript
json2mq({type: 'screen'}); // -> 'screen'
```
* Media features can be specified in camel case
```javascript
json2mq({minWidth: 100, maxWidth: 200}); // -> '(min-width: 100px) and (max-width: 200px)'
json2mq({minWidth: 100, maxWidth: 200});
// -> '(min-width: 100px) and (max-width: 200px)'
```
* px is added to numeric dimension values
```javascript
json2mq({minWidth: 100, maxWidth: '20em'}) // -> '(min-width: 100px) and (max-width: 20em)'
json2mq({minWidth: 100, maxWidth: '20em'});
// -> '(min-width: 100px) and (max-width: 20em)'
```
* Multiple media queries can be passed as an array
```javascript
Expand Down

0 comments on commit da7f46b

Please sign in to comment.