postcss-color-rgb

WebJar for postcss-color-rgb

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

postcss-color-rgb
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

postcss-color-rgb
WebJar for postcss-color-rgb
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/dmarchena/postcss-color-rgb

Download postcss-color-rgb

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : postcss jar [6.0.1,7)
org.webjars.npm : postcss-value-parser jar [3.3.0,4)

Project Modules

There are no modules declared in this project.

PostCSS Color Rgb Build Status Coverage Status

PostCSS plugin to transform W3C CSS Color Module Level 4 rgb() new syntax to more compatible CSS (comma-separated rgb() or rgba()).

CSS Colors 4 syntax

rgb() = rgb( <percentage>{3} [ / <alpha-value> ]? ) |
        rgb( <number>{3} [ / <alpha-value> ]? )

<alpha-value> = <number> | <percentage>

CSS Colors 3 syntax (actual)

rgb() = rgb( <percentage>#{3}) |
        rgb( <integer>#{3})

rgba() = rgba( <percentage>#{3} , <alpha-value> ) |
         rgba( <integer>#{3} , <alpha-value> )

<alpha-value> = <number>

Example

.foo {
  /* Input example */
  color: rgb(250.5 255 255);
  background-image: linear-gradient(to bottom right, rgb(10% 11% 12% / 90%), rgb(23% 24% 25% / .5));
}
.foo {
  /* Output example */
  color: rgb(251, 255, 255);
  background-image: linear-gradient(to bottom right, rgba(10%, 11%, 12%, .9), rgba(23%, 24%, 25%, .5));
}

Usage

postcss([ require('postcss-color-rgb') ])

See PostCSS docs for examples for your environment.

Versions

Version
2.0.0