Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

postcss-hexrgba

seaneking140.4kMIT2.1.0

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

postcss, css, postcss-plugin, hex, rgba

readme

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

changelog

Change Log

v1.0.1 (2018-04-30)

Full Changelog

Closed issues:

  • !important gets removed #9
  • Plugin not working with specific linear-gradient background #6

Merged pull requests:

  • directly substitute the hex in the replace callback #12 (schelmo)
  • add a test for !important ( #10 ) #11 (schelmo)
  • do not omit !important #10 (schelmo)

v1.0.0 (2017-07-26)

Full Changelog

Closed issues:

  • Plugin is not working in Postcss ember #7

Merged pull requests:

v0.2.1 (2016-09-19)

Full Changelog

Merged pull requests:

  • BUGFIX: hexrgba breaks on undefined values #5 (dimaip)

v0.2.0 (2015-09-06)

Full Changelog

Closed issues:

  • Move to PostCSS 5.0 #4

v0.1.2 (2015-07-25)

Full Changelog

Closed issues:

  • Errors out if declaration value is complex #3

Merged pull requests:

  • Add declaration with multiple attributes including rgba to be converted correctly #2 (simonprev)

v0.1.1 (2015-07-23)

Full Changelog

v0.1.0 (2015-06-17)

* This Change Log was automatically generated by github_changelog_generator