postcss-hexrgba

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

MIT 11 个版本
安装
npm install postcss-hexrgba
yarn add postcss-hexrgba
pnpm add postcss-hexrgba
bun add postcss-hexrgba
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

版本列表
2.1.0 2022-07-10
2.0.1 2020-06-10
2.0.0 2019-10-16
1.0.2 2019-07-19
1.0.1 2018-04-30
1.0.0 2017-07-26
0.2.1 2016-09-19
0.2.0 2015-09-06
0.1.2 2015-07-25
0.1.1 2015-07-23
0.1.0 2015-06-17