Skip to content

Commit 85b148e

Browse files
committed
[css-variables] Fix up the case-insensitivy declaration with latest terms from CSSOM.
--HG-- extra : rebase_source : 1d7ec340a1a2be91b6fc270e9f79f70df6ba1421
1 parent 1f4dc00 commit 85b148e

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

css-variables/Overview.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</p>
5555
<h1 class="p-name no-ref" id=title>CSS Custom Properties for Cascading Variables Module Level 1</h1>
5656
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
57-
<span class=dt-updated><span class=value-title title=20140103>3 January 2014</span></span></span></h2>
57+
<span class=dt-updated><span class=value-title title=20140128>28 January 2014</span></span></span></h2>
5858
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-variables/>http://dev.w3.org/csswg/css-variables/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-variables-1/>http://www.w3.org/TR/css-variables-1/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-variables/>http://dev.w3.org/csswg/css-variables/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2013/WD-css-variables-20130312/ rel=previous>http://www.w3.org/TR/2013/WD-css-variables-20130312/</a><dd><a href=http://www.w3.org/TR/2012/WD-css-variables-20120410/ rel=previous>http://www.w3.org/TR/2012/WD-css-variables-20120410/</a>
5959
<dt>Feedback:</dt>
6060
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-variables%5D%20feedback">www-style@w3.org</a>
@@ -694,15 +694,14 @@ <h3 class="heading settled heading" data-level=4.1 id=the-cssstyledeclaration-in
694694
<p> A <code>CSSStyleDeclaration</code> is the <dfn data-dfn-type=dfn data-noexport="" id=associated-style-declaration>associated style declaration<a class=self-link href=#associated-style-declaration></a></dfn>
695695
for the <code>CSSVariablesMap</code> assigned to its <code>var</code> attribute.
696696

697-
<p> While the CSSStyleDeclaration interface normally contains attributes that are camel-cased name variants of all CSS properties
698-
(and sometimes also attributes for their canonical names),
699-
it must not contain any such attributes for custom properties.
700-
The camel-case trick does not work,
701-
as custom property names are case-sensitive,
702-
and there are potentially an infinity of custom properties,
703-
which is incompatible with the normal behavior of exposing every property
704-
whether it was set in the corresponding declaration block or not.
697+
<p> All <a data-link-type=dfn href=#custom-property title="custom property">custom property</a> <a data-link-type=dfn title=declarations>declarations</a> have the <a data-link-type=dfn title=case-insensitive>case-insensitive</a> flag set.
705698

699+
<p class=note> Note: Custom properties do not appear on a CSSStyleDeclaration object in camel-cased form,
700+
because their names may have both upper and lower case letters
701+
which indicate distinct custom properties.
702+
The sort of text transformation that automatic camel-casing performs is incompatible with this.
703+
They can still be accessed by their proper name via <a class=idl-code data-link-type=method title=getproperty()>getProperty()</a>/etc,
704+
or by the <a class=idl-code data-link-type=interface href=#dom-cssvariablesmap title=cssvariablesmap>CSSVariablesMap</a> interface defined below.
706705

707706

708707
<h4 class="heading settled heading" data-level=4.1.1 id=serializing-custom-props><span class=secno>4.1.1 </span><span class=content>

css-variables/Overview.src.html

+8-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1>CSS Custom Properties for Cascading Variables Module Level 1</h1>
1111
Previous Version: http://www.w3.org/TR/2012/WD-css-variables-20120410/
1212
Editor: Tab Atkins Jr., Google, http://xanthir.com/contact
1313
Abstract: This module introduces cascading variables as a new primitive value type that is accepted by all CSS properties, and custom properties for defining them.
14-
Ignored Terms: var-0, var-foo, var-main-color, var-Bar, var-two, var-header-color, var-accent-background, var-foo-bar, var-bar, var-one, var, <ident>
14+
Ignored Terms: var-0, var-foo, var-main-color, var-Bar, var-two, var-header-color, var-accent-background, var-foo-bar, var-bar, var-one, var, <ident>, declarations, case-insensitive, getproperty()
1515
</pre>
1616

1717
<h2 id="intro">
@@ -653,15 +653,14 @@ <h3 id='the-cssstyledeclaration-interface'>
653653
A <code>CSSStyleDeclaration</code> is the <dfn>associated style declaration</dfn>
654654
for the <code>CSSVariablesMap</code> assigned to its <code>var</code> attribute.
655655

656-
While the CSSStyleDeclaration interface normally contains attributes that are camel-cased name variants of all CSS properties
657-
(and sometimes also attributes for their canonical names),
658-
it must not contain any such attributes for custom properties.
659-
The camel-case trick does not work,
660-
as custom property names are case-sensitive,
661-
and there are potentially an infinity of custom properties,
662-
which is incompatible with the normal behavior of exposing every property
663-
whether it was set in the corresponding declaration block or not.
656+
All <a>custom property</a> <a>declarations</a> have the <a>case-insensitive</a> flag set.
664657

658+
Note: Custom properties do not appear on a CSSStyleDeclaration object in camel-cased form,
659+
because their names may have both upper and lower case letters
660+
which indicate distinct custom properties.
661+
The sort of text transformation that automatic camel-casing performs is incompatible with this.
662+
They can still be accessed by their proper name via <a method>getProperty()</a>/etc,
663+
or by the <a interface>CSSVariablesMap</a> interface defined below.
665664

666665

667666
<h4 id='serializing-custom-props'>

0 commit comments

Comments
 (0)