1.0.0 • Published 7 years ago

postcss-flextype v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

postcss-flextype

PostCSS plugin for use with flextype that converts --flextype declarations into hidden ::before pseudo-content to work with browsers that don't yet support CSS variables.

Example

Input:

.foo {
  --flextype: 5%;
}
.bar {
  --flextype: '{"100": 12, "500+": 18}';
}

Output:

.foo::before {
  content: '5%';
  display: none;
}
.bar::before {
  content: '{"100": 12, "500+": 18}';
  display: none;
}

Install

npm i -S postcss-flextype

Usage

const postcss = require('postcss');
const flextype = require('postcss-flextype');

postcss([flextype]);

Options

replace (type: Boolean, default: true)

If set to false postcss-flextype will leave the --flextype declarations in your CSS in addition to adding them as ::before content.