News for hackers. Stuff that matters.
Re:CSS Variables landing in Chrome 49 by givan on Sunday February 07, 2016 @12:31PM (#11053727)
The syntax is verbose and ugly compared to SASS
Re:CSS Variables landing in Chrome 49 by colinramsay on Sunday February 07, 2016 @12:40PM (#11053765)
I think a lot of people agree with you but there is a reason:

http://www.xanthir.com/blog/b4KT0

Re:CSS Variables landing in Chrome 49 by innocentoldguy on Sunday February 07, 2016 @06:49PM (#11055606)
I understand the reasoning, but this new syntax is still kind of verbose and ugly. I think one of the reasons Sass has been so successful is that it is elegant. It adds a lot of functionality to CSS, but does so in a way that feels very much at home. This new syntax doesn't feels very elegant and it doesn't feel at home with current CSS syntax.
Re:CSS Variables landing in Chrome 49 by TabAtkins on Monday February 08, 2016 @01:18PM (#11059829)
If I'd done what everyone keeps saying I should have done and just used $foo, then Sass would have gotten angry at me, because we'd be sharing syntax for different features. We already tweaked CSS a little to avoid that in another case (when specifying grid line names in Grid, you surround the names with []; it was originally (), but Sass asked us to change it because they use that for their list syntax).

We could only have used $foo if we hewed very close to Sass's functionality - global macros that operate at the stylesheet's lexical level. That wasn't what we wanted to do, though, either at the time (considering only the variables use-case) or looking forward (to the use of custom properties as the generic "inject info into your page via the CSS engine", a la data attributes for HTML).

By avoiding global macros, we also get context sensitivity - we can actually offer APIs for this stuff that are smarter than "here's the string you set". When we add custom pseudoclasses, custom media queries, etc they'll all get their own useful APIs. Sass is stuck with string manipulation, because you can use a Sass var anywhere, so it's impossible to infer anything about it.

Re:CSS Variables landing in Chrome 49 by frik on Sunday February 07, 2016 @01:13PM (#11053942)
Stupid decision, the should have used $foo (dollar sign for variables) like in Perl and PHP. It remind me decisions of standards based on XML (XLST, XML-Schema, RDF, etc).
Re:CSS Variables landing in Chrome 49 by esailija on Sunday February 07, 2016 @04:09PM (#11054850)
Read the linked post. Css variables are nothing like macros like sass's `$foo` and css might support macros with sass's `$foo` syntax in future.
Re:CSS Variables landing in Chrome 49 by frik on Monday February 08, 2016 @12:24AM (#11056483)
I read the article, that's why I commented because "might support something in future" that probably never happens, is what I related to XML based formats design decisions go wrong. Argh, but thanks for misunderstanding and downvotings.