Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including postcss-hexrgba with all npm packages installed. Try it out:

var postcssHexrgba = require("postcss-hexrgba")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

postcss-hexrgba v2.0.1

PostCSS plugin that adds shorthand hex methods to rgba() values

PostCSS HexRGBA

NPM version Downloads Build Status

PostCSS plugin that adds shorthand hex methods to rgba() values.

Part of Rucksack - CSS Superpowers

Input

.foo {
  color: rgba(#0fab53, 0.8)
}

.bar {
  background: linear-gradient(rgba(#fff, .1), rgba(#fff, .2));
}

Output

.foo {
  color: rgba(15,171,83, 0.8)
}

.bar {
  background: linear-gradient(rgba(255,255,255, .1), rgba(255,255,255, .2));
}

Usage

postcss([ require('postcss-hexrgba') ])

See PostCSS docs for examples for your environment.


MIT © Sean King

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free