skip to navigation
skip to content

cssmediaquery 0.0.1

CSS Media Query parser and matcher

## css-mediaquery

Parses and determines if a given CSS Media Query matches a set of values.

This is a port of https://github.com/ericf/css-mediaquery

### Usage

```python

from cssmediaquery import match, parse

isamatch = match('screen and (min-width: 40em)', {
'type' : 'screen',
'width' : '1024px'
})
# returns True

ast = parse('screen and (min-width: 40em)')
print ast
# [
# {
# 'inverse': 'false',
# 'type' : 'screen',
# 'expressions': [{
# 'modifier': 'min',
# 'feature': 'width',
# 'value': '40em'
# }]
# }
# ]
```

### Installing

$ pip install cssmediaquery

### Running Tests

python tests.py -v  
File Type Py Version Uploaded on Size
cssmediaquery-0.0.1-py2.py3-none-any.whl (md5) Python Wheel 2.7 2017-06-12 4KB
cssmediaquery-0.0.1.tar.gz (md5) Source 2017-06-12 3KB