https://github.com/kompot/postcss-grid-unit
A PostCSS plugin to create custom measurement units to ease grid enforcement.
https://github.com/kompot/postcss-grid-unit
Last synced: 20 days ago
JSON representation
A PostCSS plugin to create custom measurement units to ease grid enforcement.
- Host: GitHub
- URL: https://github.com/kompot/postcss-grid-unit
- Owner: kompot
- License: mit
- Created: 2015-10-30T05:13:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-30T05:14:17.000Z (over 9 years ago)
- Last Synced: 2025-05-30T12:18:37.485Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# postcss-grid-unit
A [PostCSS](https://github.com/postcss/postcss) plugin to create custom grid units to ease grid enforcement. Inspired by Mark Goodyear's [postcss-vertical-rhythm](https://github.com/markgoodyear).## Examples
Given options
```
{
units: [
{unit: 'u', size: 8},
{unit: 'lu', size: 32},
],
}
```and input
```css
.block {
margin-bottom: 1u;
padding-top: 2lu;
}
```output will be
```css
.block {
margin-bottom: 8px;
padding-top: 64px;
}
```## Usage
Install:
```
npm install postcss-grid-unit --save-dev
```Then include the plugin:
```js
postcss([ require('postcss-grid-unit')(options) ])
```See [PostCSS] docs for examples for your environment.
## Licence
Released under the MIT license.