- From: John Daggett <jdaggett@mozilla.com>
- Date: Tue, 26 Feb 2013 19:42:38 -0800 (PST)
- To: www-style list <www-style@w3.org>
The current ED of the CSS Variables spec uses different terms to describe the definition and use of variables. I understand that there's a need to distinguish what is being defined here from what programmers or web authors typically think of as "variables" but I think the use of these separate terms is confusing and isn't the best way to describe the concepts being discussed. When referring to the cascading variable definition, the term "custom property" is used: A custom property is any property whose name is composed of "var-" followed by an <ident> [CSS3VAL] Custom properties are solely for use by authors and users; CSS will never give them a meaning beyond what is presented here. When referring to the variable usage, the term "cascading variable" is used instead: The primary purpose of custom properties is to define cascading variables. In CSS, a cascading variable is a value that can be substituted into other properties, allowing authors to "abstract" parts of their page's CSS out and reuse it in several places. Every custom property defines a corresponding variable with the same name, minus the "var-" prefix. For example, the custom property ‘var-foo’ defines a variable named ‘foo’. See the next chapter for details on how to use variables. The module name is now: Even the name of the module reflects this dichotomy: "CSS Custom Properties for Cascading Variables" I think using different terms simply to describe use versus defintion is poor word choice. Historically the term "custom attribute" in HTML meant the ability to stick arbitrary attributes into HTML elements, so I think the term "custom property" implies something similar; in the general sense it connotes properties with completely arbitrary names that behave something like properties. That's a superset of the functionality here and so it would be much simpler to avoid this confusing term. I think it would be much better to use the same term for both definition and use, so I would propose substituting "cascading variable property" in place of "custom property". I think that's a more accurate way of describing the "var-foo: 16px" / "var(foo)" syntax that's defined by this spec. Regards, John Daggett
Received on Wednesday, 27 February 2013 03:43:05 UTC