Hacker News new | ask | show | jobs
by ino 3736 days ago
Is there a css3 variables compiler/processor/translator to plain css without variables?

It can be a copy-paste tool on the internet or whatever, no preprocessor or build tools required. You work directly with styles.css3 in the browser and when you're done you transform it to old style without variables, so it works in older browsers.

That's what I wanted to do last week but as I couldn't find such a tool, at the end I did a search/replace. It was a small project obviously.

2 comments

This might be what you're looking for: https://github.com/segmentio/myth
Thanks, this looks good!
i think that is what postcss does
PostCSS parses CSS, runs plugins and outputs CSS. Yep, of course there is a plugin that does variables! And the "Myth" tool, mentioned in a comment here, is just a pack of PostCSS plugins.

And the OP uses PostCSS. Apparently, a lot of people here didn't read that part...