Re: @with -- DRY syntax for nesting selectors

Le 09/01/2012 14:29, Marat Tanalin | tanalin.com a écrit :
> Compared with existing nonstandard solutions like LESS or SASS, the
> syntax proposed above avoids mixing declarations (property/value
> pairs) and rules on same nesting level (such mixing is generally a
> bad idea, and this is implicitly proved out, for example, by the fact
> that we don't have this in CSS standard so far).

Bad idea or not, we do have it in css3-page:

http://dev.w3.org/csswg/css3-page/#margin-at-rules

As much as I like the idea, syntax details aside and assuming this is 
spec’d and implemented right now, it will be many years before we can 
use it on the web without fallbacks because of older browser versions.

On the other hand, pre-processors like LESS or SASS are available right 
now. They can be changed/updated/replaced without browser support concerns.

Regards,
-- 
Simon Sapin

Received on Monday, 9 January 2012 14:09:54 UTC