Re: [css-variables] CSS Variables are a NEW kind of variable

Here is what I find weird as a dev about the new syntax:

1. Var is a variable "property" yet it is invoked as a function. I assert
then it is not a property and we should not treat it as such. Everything
about a variable does not sound like a property to me. A Variable seems to
be a name/value pair of a defined type called Variable. I think it is very
wrong to shoe-horn this new kind of syntax into an existing 'property' and
try to reuse the same definition by attaching more prefixes.

2. I do think the cascading would make it easier for authors to work with
variables as it provides a scope for vars. This is awesome.

3. Variables - as defined in spec - take only one argument when they are
invoked as a function, this begs the question of why they are functions to
begin with? This is completely contrary to how I have seen functions being
used. First functions are represented in easier ways by their actionable
names rather than just generic ones like 'var'. I can even understand
'calc' but 'var' is just puzzling.

4. There are two actions that seem to occur one is to set a variable, the
other is to get it. Both are functions, except one is syntaxed in one way
(var-*) and the other in a typical CSS function as a value (var()). This
grates.

5. This is why devs want a consistent way to not just set but also get the
variable. $ would be the most obvious known/tested solution, but I think
we would be happy with anything at this point that makes CSS less
confusing. 




 

Received on Wednesday, 30 May 2012 01:02:30 UTC