W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css-variables] the new ED for CSS Variables

From: John Daggett <jdaggett@mozilla.com>
Date: Sun, 19 Feb 2012 20:55:10 -0800 (PST)
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style@w3.org, Brian Kardell <bkardell@gmail.com>
Message-ID: <1314730021.11614906.1329713710264.JavaMail.root@zimbra1.shared.sjc1.mozilla.com>
Tab Atkins wrote:

> > I mentioned this a few months ago, but I would like to reiterate:  I
> > think it is definitely worth going to some measure to ensure an
> > understanding of the actual relationship between data properties in
> > CSS and data properties in HTML as I can easily see confusion here
> > with people doing something like:
> >
> >    <div data-foo="something">
> >
> > and then expecting to be able to say:
> >
> >    div{
> >          property:  data(foo);
> >    }
> >
> > Or vice versa.
> Naming is still somewhat up in the air.  We may just change the name
> entirely, to var-* or something.  If we don't, then I think it would
> be good to add a note saying that it's merely a surface resemblance.

During the TPAC discussion of this proposal there was a brief discussion
of this.  Not all of that discussion got minuted but I remember Peter
Linss mentioned that he thought we should use functional notation
throughout rather than have 'data-' (or 'var-') micro-syntax and I tend
to agree with him.

So instead of:

  div {
    data-foo: xxx;

  #content { color: data(foo); }

the author would use:

  div {
    data(foo): xxx;

  #content { color: data(foo); }

This way the definition and use stays the same and there's less potential
for an author misconstruing a data-xxx thingy as some property they don't

I think it would be a good idea to mark naming as an issue in the spec, noting
the '$', 'var-' and functional syntax proposals, along with your objections
(changes to the CSS core grammar as I recall or whatever).


John Daggett
Received on Monday, 20 February 2012 04:55:38 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:11 UTC