blob: 0436953bba40a275b50988dd4a188f2487c54a0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# PostCSS Alias
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
[PostCSS][PostCSS] plugin that lets you create custom aliases for CSS properties with an `@alias` rule.
Part of [Rucksack - CSS Superpowers](http://simplaio.github.io/rucksack).
_Input_
```css
@alias {
fs: font-size;
bg: background;
}
.aliased {
fs: 16px;
bg: white;
}
```
_Output_
```css
.aliased {
font-size: 16px;
background: white;
}
```
> **Note:** Aliases in property values (eg: `transition: bg 200ms`) are not supported
### Usage
```js
postcss([ require('postcss-alias') ])
```
See [PostCSS][PostCSS] docs for examples for your environment.
***
MIT © [Sean King](https://twitter.com/seaneking)
[npm-image]: https://badge.fury.io/js/postcss-alias.svg
[npm-url]: https://npmjs.org/package/postcss-alias
[travis-image]: https://travis-ci.org/seaneking/postcss-alias.svg?branch=master
[travis-url]: https://travis-ci.org/seaneking/postcss-alias
[daviddm-image]: https://david-dm.org/seaneking/postcss-alias.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/seaneking/postcss-alias
[PostCSS]: https://github.com/postcss/postcss
|