Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madeleineostoja/postcss-hexrgba
PostCSS plugin that adds shorthand hex methods to rgba() values
https://github.com/madeleineostoja/postcss-hexrgba
css-color css-colors postcss postcss-plugin
Last synced: 3 months ago
JSON representation
PostCSS plugin that adds shorthand hex methods to rgba() values
- Host: GitHub
- URL: https://github.com/madeleineostoja/postcss-hexrgba
- Owner: madeleineostoja
- License: mit
- Created: 2015-06-17T15:04:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T21:29:57.000Z (almost 2 years ago)
- Last Synced: 2024-10-20T01:48:40.265Z (3 months ago)
- Topics: css-color, css-colors, postcss, postcss-plugin
- Language: JavaScript
- Homepage:
- Size: 152 KB
- Stars: 70
- Watchers: 1
- Forks: 13
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - postcss-hexrgba
README
# PostCSS HexRGBA
[![NPM version][npm-badge]][npm-url] [![Downloads][downloads-badge]][npm-url] [![Build Status][travis-badge]][travis-url][PostCSS][PostCSS] plugin that adds shorthand hex methods to rgba() values.
_Part of [Rucksack - CSS Superpowers](https://www.rucksackcss.org/)_
**Input**
```css
.foo {
color: rgba(#0fab53, 0.8)
}.bar {
background: linear-gradient(rgba(#fff, .1), rgba(#fff, .2));
}
```**Output**
```css
.foo {
color: rgba(15,171,83, 0.8)
}.bar {
background: linear-gradient(rgba(255,255,255, .1), rgba(255,255,255, .2));
}
```## Usage
```js
postcss([ require('postcss-hexrgba') ])
```See [PostCSS][PostCSS] docs for examples for your environment.
***
MIT © [Sean King](https://twitter.com/seaneking)
[npm-badge]: https://badge.fury.io/js/postcss-hexrgba.svg
[npm-url]: https://npmjs.org/package/postcss-hexrgba
[downloads-badge]: https://img.shields.io/npm/dm/postcss-hexrgba.svg
[travis-badge]: https://travis-ci.org/seaneking/postcss-hexrgba.svg?branch=master
[travis-url]: https://travis-ci.org/seaneking/postcss-hexrgba
[PostCSS]: https://github.com/postcss/postcss