Re:Style like a BOSS. New css preprocessor.
by robin_reala on Tuesday October 02, 2012 @07:17AM
(#4601436)
Standard CSS syntax for arithmetic operations is the calc() operator:
Re:Style like a BOSS. New css preprocessor.
by lvivski on Tuesday October 02, 2012 @08:02AM
(#4601547)
well, yes. CSS has variables syntax too (http://dev.w3.org/csswg/css-variables/) but for the time of compiling you don't know anything about the runtime, so you can't calculate things like "10em + 5px" 'cause EM's absolute value depends on many things, so I had to separate "real" css calculations and "fake" ones
Ex. you wan only arithmetic operations to write "10px + 10%", you are welcome to do so, or use only variables.
Ruleset nesting works like in SASS or LESS with small addition of BEM, but it's totally compatible with CSS selectors. And you may not use nesting if you don't want to.