|
|
|
|
|
by seaneking
3950 days ago
|
|
The API is intentionally transparent. The idea is that you're still writing in the CSS language (even if with non-spec features), rather than a DSL. So if you ever did want to rip Rucksack out and go back to-spec, you'd just run it and grab the output. Your overall structure, logic, and code would look pretty much the same, just with the (expanded) additions of the individual features Rucksack added. This often isn't the case when you're writing in a preprocessor, especially on a big project the input often ends up looking very little like the output. And to clarify, yep Rucksack certainly isn't to-spec (present or future). It's a collection of handy features and shortcuts, like the compass/nib/bourbon of PostCSS. As timdorr points out, you could absolutely use it with cssnext (we do exactly that over at Simpla), you'd probably just want to disable autoprefixing, since cssnext does that for you. |
|
But adding new spec that looks like the CSS language is not transparent, it's ambiguous. It's not a knock perse. And like you say it does not lock you in, as you can rely on the output. But I wouldn't want to use it for projects that are distributed to other users, because now they have the burden of learning and distinguishing between constructs coming from rucksack and normal css spec.