Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[6a3a178] | 1 | # postcss-color-rebeccapurple [![CSS Standard Status](https://cssdb.org/badge/rebeccapurple-color.svg)](https://cssdb.org/#rebeccapurple-color) [![Build Status](https://api.travis-ci.org/postcss/postcss-color-rebeccapurple.svg)](https://travis-ci.org/postcss/postcss-color-rebeccapurple)
|
---|
| 2 |
|
---|
| 3 | > [PostCSS](https://github.com/postcss/postcss) plugin to transform [W3C CSS `rebeccapurple` color](https://www.w3.org/TR/css-color-4/#valdef-color-rebeccapurple) to more compatible CSS (rgb()).
|
---|
| 4 |
|
---|
| 5 | ## Why this plugin ?
|
---|
| 6 |
|
---|
| 7 | If you did some CSS, I'm sure you know who [Eric Meyer](https://en.wikipedia.org/wiki/Eric_A._Meyer) is, & what he did for this language.
|
---|
| 8 | In memory of [Eric Meyer’s daughter](https://meyerweb.com/eric/thoughts/2014/06/09/in-memoriam-2/), [W3C added new color rebeccapurple to CSS 4 Color Module](https://lists.w3.org/Archives/Public/www-style/2014Jun/0312.html).
|
---|
| 9 |
|
---|
| 10 | ## Installation
|
---|
| 11 |
|
---|
| 12 | ```console
|
---|
| 13 | $ npm install postcss-color-rebeccapurple
|
---|
| 14 | ```
|
---|
| 15 |
|
---|
| 16 | ## Usage
|
---|
| 17 |
|
---|
| 18 | ```js
|
---|
| 19 | // dependencies
|
---|
| 20 | var fs = require("fs")
|
---|
| 21 | var postcss = require("postcss")
|
---|
| 22 | var colorRebeccapurple = require("postcss-color-rebeccapurple")
|
---|
| 23 |
|
---|
| 24 | // css to be processed
|
---|
| 25 | var css = fs.readFileSync("input.css", "utf8")
|
---|
| 26 |
|
---|
| 27 | // process css
|
---|
| 28 | var output = postcss()
|
---|
| 29 | .use(colorRebeccapurple())
|
---|
| 30 | .process(css)
|
---|
| 31 | .css
|
---|
| 32 | ```
|
---|
| 33 |
|
---|
| 34 | Using this `input.css`:
|
---|
| 35 |
|
---|
| 36 | ```css
|
---|
| 37 | body {
|
---|
| 38 | color: rebeccapurple
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | ```
|
---|
| 42 |
|
---|
| 43 | you will get:
|
---|
| 44 |
|
---|
| 45 | ```css
|
---|
| 46 | body {
|
---|
| 47 | color: rgb(102, 51, 153);
|
---|
| 48 | }
|
---|
| 49 | ```
|
---|
| 50 |
|
---|
| 51 | Checkout [tests](test) for more examples.
|
---|
| 52 |
|
---|
| 53 | ---
|
---|
| 54 |
|
---|
| 55 | ## Contributing
|
---|
| 56 |
|
---|
| 57 | Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
|
---|
| 58 |
|
---|
| 59 | ```console
|
---|
| 60 | $ git clone https://github.com/postcss/postcss-color-rebeccapurple.git
|
---|
| 61 | $ git checkout -b patch-1
|
---|
| 62 | $ npm install
|
---|
| 63 | $ npm test
|
---|
| 64 | ```
|
---|
| 65 |
|
---|
| 66 | ## [Changelog](CHANGELOG.md)
|
---|
| 67 |
|
---|
| 68 | ## [License](LICENSE)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.