3 ms·
CSS constants! Names, symbols, whatever. Just don't call them something that implies they change all the time.
by lucian1900 15y ago
CSS constants! Names, symbols, whatever. Just don't call them something that implies they change all the time.
- woogychuck 15y agoI agree that the name is confusing. They really aren't variables.
- richthegeek 15y agoIf 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
- masklinn 15y ago> 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)
- eru 15y agoIn Haskell we don't change our variables either, and nobody's confused.
- Martijn 15y agoIn 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_%28mathematics%29 https://secure.wikimedia.org/wikipedia/en/wiki/Variable_%28m... [2] https://secure.wikimedia.org/wikipedia/en/wiki/Variable_%28computer_science%29 https://secure.wikimedia.org/wikipedia/en/wiki/Variable_%28c...