반응형

Myth: A pure CSS preprocessor

myth

Homepage: http://www.myth.io/
GitHub: https://github.com/segmentio/myth

 

Myth

CSS the way it was imagined.

Myth is a preprocess that lets you write pure CSS without having to worry about slow browser support, or even slow spec approval. It's a like CSS polyfill.

Installation

$ npm install -g myth

Usage

$ myth input.css output.css
# Generated output.css from input.css

Why?

Myth lets you write pure CSS while still giving you the benefits of tools like LESS and Sass. You can still use variables and math functions, just like you do in preprocessors. It's like a polyfill for future versions of the spec.

Some of the features in CSS require runtime calculations, which neither Myth nor preprocessors handle, but what Myth does is let you write your code today in the future syntax, so that your code is future-proof. When browsers finally support these features you won't need to rewrite anything, just start using the cascade!

Taking plain CSS as an input also means you can use Myth to re-process anyone else's CSS (or another preprocessors output), adding the browser support you need, without having to re-write the code in a completely different syntax.

Myth is built with Rework so it's incredibly fast, and has a nice Javascript API in addition to the CLI. 

반응형

+ Recent posts