News for hackers. Stuff that matters.
Re:A Vote for CSS Variables by lucian1900 on Tuesday March 20, 2012 @10:18AM (#3729325)
CSS constants! Names, symbols, whatever. Just don't call them something that implies they change all the time.
Re:A Vote for CSS Variables by woogychuck on Tuesday March 20, 2012 @10:22AM (#3729348)
I agree that the name is confusing. They really aren't variables.
Re:A Vote for CSS Variables by richthegeek on Tuesday March 20, 2012 @10:39AM (#3729443)
If they act in a similar way to variables in SASS, then they can be reassigned without issue. They are not constant, although they may be treated as such.

Of course, the CSSWG will no doubt create a solution that is both absurd in it's complexity, and limited in it's use. For example, constants defined with css-constant('foo', 'bar') instead of $foo: bar

Re:A Vote for CSS Variables by masklinn on Tuesday March 20, 2012 @11:14AM (#3729649)
> For example, constants defined with css-constant('foo', 'bar') instead of $foo: bar

The issue with sigil is that they risk conflicting with (and making more complex the parsing of) selectors. `$` used to be coopted by the Selectors Level 4 draft spec in order to select a non-tail subject for instance (it's apparently been changed to the `!` suffix).

Not that I like what they picked any more than you do (the spec is currently using the `data-` prefix for definition and `data()` for dereference, likely in keeping with HTML5's `data-` attributes)

Re:A Vote for CSS Variables by eru on Tuesday March 20, 2012 @10:41AM (#3729452)
In Haskell we don't change our variables either, and nobody's confused.
Re:A Vote for CSS Variables by Martijn on Tuesday March 20, 2012 @10:58AM (#3729548)
In Haskell variables are called variables because they potentially have a different value each time the function is called.

See also Variable (mathematics) [1] vs. Variable (computer science) [2].

[1] https://secure.wikimedia.org/wikipedia/en/wiki/Variable_%28m... [2] https://secure.wikimedia.org/wikipedia/en/wiki/Variable_%28c...