https://github.com/stackcss/sheetify-calc
Spec compliant CSS calc syntax for sheetify
https://github.com/stackcss/sheetify-calc
Last synced: 10 months ago
JSON representation
Spec compliant CSS calc syntax for sheetify
- Host: GitHub
- URL: https://github.com/stackcss/sheetify-calc
- Owner: stackcss
- License: mit
- Created: 2014-10-05T17:30:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-05T17:55:49.000Z (over 11 years ago)
- Last Synced: 2025-03-06T05:37:59.198Z (11 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sheetify-calc
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Downloads][downloads-image]][downloads-url]
A [sheetify][sheetify-url] transform to add support for
[W3C-style CSS calc](http://www.w3.org/TR/css3-values/#calc-notation)
syntax. Uses [`rework-calc`][rework-calc] to perform the transformation.
When multiple units are mixed together in the same expression, the `calc()`
statement is left as is, to fallback to the CSS3 calc feature.
__N.B.__ This is not a polyfill. This transform aims to provide a future-proof way
of using a limited subset of the features provided by native CSS custom media
queries.
## Installation
```bash
npm install sheetify-calc
```
## Usage
As a sheetify transform:
```js
var calc = require('sheetify-calc');
var sheetify = require('sheetify');
sheetify('path/to/my/index.css')
.transform(calc())
.bundle();
```
## License
[MIT](https://tldrlegal.com/license/mit-license)
[npm-image]: https://img.shields.io/npm/v/sheetify-calc.svg?style=flat-square
[npm-url]: https://npmjs.org/package/sheetify-calc
[travis-image]: https://img.shields.io/travis/yoshuawuyts/sheetify-calc.svg?style=flat-square
[travis-url]: https://travis-ci.org/yoshuawuyts/sheetify-calc
[coveralls-image]: https://img.shields.io/coveralls/yoshuawuyts/sheetify-calc.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/yoshuawuyts/sheetify-calc?branch=master
[downloads-image]: http://img.shields.io/npm/dm/sheetify-calc.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/sheetify-calc
[sheetify-url]: https://github.com/requireio/sheetify
[rework-calc]: https://github.com/reworkcss/rework-calc