postcss-color-rgba-fallback

WebJar for postcss-color-rgba-fallback

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

postcss-color-rgba-fallback
Последняя версия

Последняя версия

3.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

postcss-color-rgba-fallback
WebJar for postcss-color-rgba-fallback
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/postcss/postcss-color-rgba-fallback

Скачать postcss-color-rgba-fallback

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/postcss-color-rgba-fallback/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>postcss-color-rgba-fallback</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-color-rgba-fallback/
implementation 'org.webjars.npm:postcss-color-rgba-fallback:3.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/postcss-color-rgba-fallback/
implementation ("org.webjars.npm:postcss-color-rgba-fallback:3.0.0")
'org.webjars.npm:postcss-color-rgba-fallback:jar:3.0.0'
<dependency org="org.webjars.npm" name="postcss-color-rgba-fallback" rev="3.0.0">
  <artifact name="postcss-color-rgba-fallback" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='postcss-color-rgba-fallback', version='3.0.0')
)
libraryDependencies += "org.webjars.npm" % "postcss-color-rgba-fallback" % "3.0.0"
[org.webjars.npm/postcss-color-rgba-fallback "3.0.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.webjars.npm : postcss jar [6.0.6,7)
org.webjars.npm : postcss-value-parser jar [3.3.0,4)
org.webjars.npm : rgb-hex jar [2.1.0,3)

Модули Проекта

Данный проект не имеет модулей.

postcss-color-rgba-fallback Travis Build Status

PostCSS plugin to transform rgba() to hexadecimal.

Installation

$ npm install postcss-color-rgba-fallback

Usage

// dependencies
var fs = require("fs")
var postcss = require("postcss")
var colorRgbaFallback = require("postcss-color-rgba-fallback")

// css to be processed
var css = fs.readFileSync("input.css", "utf8")

// process css
var output = postcss()
  .use(colorRgbaFallback())
  .process(css)
  .css

Using this input.css:

body {
  background: rgba(153, 221, 153, 0.8);
  border: solid 1px rgba(100,102,103,.3);
}

you will get:

body {
  background: #99DD99;
  background: rgba(153, 221, 153, 0.8);
  border: solid 1px #646667;
  border: solid 1px rgba(100,102,103,.3);
}

Node.js options

postcss-color-rgba-fallback accepts options

properties

default: [ "background-color", "background", "color", "border", "border-color", "outline", "outline-color ]

Allows you to specify your whitelist of properties. This option enables adding a fallback for one or a properties list

oldie

default: false

Set to true to enable the option and to get fallback for ie8

backgroundColor

default: null

Allows you to specify a background color to use as a base alpha matte.

Instead of cutting off the alpha channel it will blend the foreground and background.

Expects an array of rgb values:

  "backgroundColor": [255, 1, 1]

Checkout tests for more examples.


Contributing

Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.

$ git clone https://github.com/postcss/postcss-color-rgba-fallback.git
$ git checkout -b patch-1
$ npm install
$ npm test

Changelog

License

org.webjars.npm

PostCSS

PostCSS and plugins based on it

Версии библиотеки

Версия
3.0.0