2 ms·
You're still confusing sass and compass. Like I said, your current feature set is ample for the 95% use case of normal web development. To that end, we are in
by chriseppstein 17y ago
You're still confusing sass and compass.
Like I said, your current feature set is ample for the 95% use case of normal web development. To that end, we are in complete agreement.
I don't know how familiar you are with blueprint, but the less syntax doesn't support creating new abstractions that simplify design.
In sass using the compass port of blueprint we can do this:
#sidebar
+column(8)
which generates:
#sidebar {
float: left;
margin-right: 10px;
width: 310px; }
The column mixin is defined here: http://github.com/chriseppstein/compass/blob/master/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass#L101 http://github.com/chriseppstein/compass/blob/master/framewor...
So what could be the equivalent less syntax for this?
div#sidebar { .column: 8; }
This is wonderfully easy for end users, but the language syntax has to become more complicated to support it. You have to be able to specify the arguments for the mixin. Also, you need a way to refer to the parent selector within the mixin abstractly. In sass we use the & symbol to represent the selector's context. I don't know what a "css-like" syntax would be for these capabilities. I would argue that they don't really have to be that "css-y", but they just have to play nicely with existing CSS syntax, because normal users don't need them.
Anyways, it's your project... But I've spent the last year thinking about these sorts of issues. If you want to discuss further, you can hit me up on github.
-chris