- From: John Daggett <jdaggett@mozilla.com>
- Date: Thu, 28 Feb 2013 21:35:59 -0800 (PST)
- To: www-style list <www-style@w3.org>
Tab Atkins wrote: > > Ah, I think I get it now. So the following examples below would > > be valid/invalid as described: > > > > div { > > var-foo: 16px; > > var-Bar: red; > > var-foo-bar: 50%; > > } > > > > el.style.var.foo = "30px"; // valid > > el.style.var.Bar = "blue"; // valid > > el.style.varFoo = "50%"; // invalid - camel-cased var props not supported > > el.style.varfoo = "16pt"; // invalid - as above, irrespective of casing > > el.style.var.foo-bar = "red"; // invalid - not valid JS ident syntax > > el.style.var["foo-bar"] = "red"; // valid > > > > Are these variations correct? > > Yes. > > > I think it would be really helpful to have a section 4.3 with examples > > of this sort to illustrate common usage patterns. > > Thanks for the examples! I copied them into an example in the spec. ^_^ So those may be examples of valid/invalid variable formats but it would be nice to have "real" examples precede that, including some sort of "iterate over all variables" one. John
Received on Friday, 1 March 2013 05:36:26 UTC