postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables
MIT License
415 stars 36 forks source link

pass variable info to postcss.process(result.messages) #71

Closed carlhopf closed 7 years ago

carlhopf commented 7 years ago

give other plugins access variable name/values.

as an example, for https://github.com/carlhopf/postcssify2 this enables the following usage

vars.css

$color: green;
$width: 100px;

index.js

const vars = require('./vars.css');

// 'green'
console.log(vars.color);
// '100px'
console.log(vars.width);
ai commented 7 years ago

Wow, good idea!

ai commented 7 years ago

Released in 4.1