Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madeleineostoja/postcss-alias
PostCSS plugin that allows you to create aliases for CSS properties
https://github.com/madeleineostoja/postcss-alias
css postcss postcss-plugin
Last synced: 14 days ago
JSON representation
PostCSS plugin that allows you to create aliases for CSS properties
- Host: GitHub
- URL: https://github.com/madeleineostoja/postcss-alias
- Owner: madeleineostoja
- Created: 2015-07-04T10:54:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T10:33:16.000Z (over 1 year ago)
- Last Synced: 2024-10-12T00:35:43.971Z (about 1 month ago)
- Topics: css, postcss, postcss-plugin
- Language: JavaScript
- Homepage:
- Size: 158 KB
- Stars: 48
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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