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
know.

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).

Regards,

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

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT