Re: [css-variables] Different syntax for variable definition and use

On Aug 30, 2012 12:40 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>
> On Thu, Aug 30, 2012 at 8:40 AM, François REMY
> <fremycompany_pub@yahoo.fr> wrote:
> > |  No damning argument, only that it's basically exactly the same as the
> > |  current spec, but with very slightly different names, and I like my
> > |  names better. ^_^
> >
> >    1) Most people agree we should not call "CSS Variables" variables
> > anymore. Using 'var' is not only a bad idea but doesn't make sense.
> > "Variables properties" are not variables, they are properties. A
variable
> > doesn't belong to an object, where 'css custom properties' belong to the
> > element they apply on. Calling them 'variables' is a non-sense, they
are not
> > any variabler than other properties. Honestly, I think you're the only
one
> > still defending the 'variable' terminology.
>
> You may want to check the draft.  I switched the terminology to
> "custom properties" a week or two ago.
>

I can't say for sure, but I think everyone mentioning this is primarily
discussing the var prefix and function.  They don't fit if it is custom
properties, in fact, they may confuse.    We can bikeshed all day long
about alternatives, but I think that is where that discussion is coming
from.

> >    2) This minimalist counter-proposal is not the same as your current
ont
> > at all, because the *same* idenfier is used to define and use the
variable
> > (ie: the difference is in the 'x-' or 'my-' or 'user-' being included
in the
> > 'use()' or 'val()' function. It's not logical to have a different
identifier
> > to define and use the variable, and the first reason it's bad is that it
> > makes CTRL+H difficult. I'll have to make two of them to rename my
variable,
> > which is one more than it should.
>
> It's a tradeoff.  You may have to do a second search/replace while
> renaming, but you have to type an additional four characters all of
> the time.  "var(var-foo)" just seems... redundant.

Yes it does and that is why I didn't use it in my example question to
jens.  What that illustrates though is that it doesn't require absolute
agreement, just a sense that the name is the whole thing, which I think
while not entirely necessary is also not entirely unreasonable and maybe
woth considering.  That would require changing either the prefix or fn name
or both, but again, I think most people dislike var for either of them and
which actual thing it should be is largely bikeshedding.  "Not var" is
about the only concensus agreement that I see in the commuity on that
front.

>
> >    3) If we want to support the use of any property in
> > 'use()'/'val()'/'var()' or 'parent-var()'/'...' we will have a problem
if we
> > didn't included the 'my-'/'x-'/'user-'/'var-' prefix from start.
>
> Actually, referencing arbitrary properties and referencing variables
> are different even if we ignore the potential problems with the
> former.  Variables start out invalid, and you want fallback so you can
> provide a value for that case (technically unnecessary, but *much*
> more convenient and easier to understand than trying to select only
> the first element to set the initial value, and only the remaining
> elements to set the subsequent values).  Normal property values have
> no such problem.
>
> If we do get arbitrary property referencing, we'll want another
> function, like value() or prop() or something.
>
> ~TJ

Received on Thursday, 30 August 2012 16:59:43 UTC