Skip to content

Commit

Permalink
Fix #991: Define case-sensitivity of the argument to attr()
Browse files Browse the repository at this point in the history
  • Loading branch information
zcorpan authored and domenic committed Apr 13, 2016
1 parent f66348e commit fb8ed61
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions source
Expand Up @@ -3594,6 +3594,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li>The <dfn data-noexport="" data-x-href="https://drafts.csswg.org/css-values/#vw">'vw'</dfn> unit</li>
<li>The <dfn data-noexport="" data-x-href="https://drafts.csswg.org/css-values/#in">'in'</dfn> unit</li>
<li>The <dfn data-noexport="" data-x-href="https://drafts.csswg.org/css-values/#px">'px'</dfn> unit</li>
<li>The <dfn data-noexport="" data-x-href="https://drafts.csswg.org/css-values/#funcdef-attr">'attr()'</dfn> function</li>
<li>The <dfn data-noexport="" data-x-href="https://drafts.csswg.org/css-values/#funcdef-calc">'calc()'</dfn> function</li>
</ul>

<p>The term <dfn data-x="css-styling-attribute" data-noexport=""
Expand Down Expand Up @@ -24918,7 +24920,8 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
<span>viewport</span>.
Other units must be interpreted the same as in Media Queries. <ref spec=MQ></p>

<p>A <span>source size</span> must not use CSS functions other than the <code data-x="">calc()</code> function.</p>
<p>A <span>source size</span> must not use CSS functions other than the <span>'calc()'</span>
function.</p>

<p>When asked to <dfn>select an image source</dfn> for a given <code>img</code> element <var>el</var>,
user agents must do the following:</p>
Expand Down Expand Up @@ -25342,7 +25345,7 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
is a valid non-negative <span>&lt;source-size-value></span>,
let <var>size</var> be its value
and remove the <span>component value</span> from <var>unparsed size</var>.
Any CSS function other than the <code data-x="">calc()</code> function is invalid.
Any CSS function other than the <span>'calc()'</span> function is invalid.
Otherwise, there is a <span data-x="concept-microsyntax-parse-error">parse error</span>;
continue to the next iteration of this algorithm.</p></li>

Expand Down Expand Up @@ -66999,9 +67002,25 @@ contradict people?

<!--ADD-TOPIC:CSS-->

<h3 id="selectors">Matching HTML elements using selectors</h3>
<h3 id="selectors">Matching HTML elements using selectors and CSS</h3>

<h4>Case-sensitivity</h4>
<h4>Case-sensitivity of the CSS <span>'attr()'</span> function</h4>

<p>The CSS Values and Units specification leaves the case-sensitivity of attribute names for the
purpose of the <span>'attr()'</span> function to be defined by the host language. <ref
spec=CSSVALUES></p>

<p>When comparing the attribute name part of a CSS <span>'attr()'</span> function to the names of
namespace-less attributes on <span>HTML elements</span> in <span>HTML documents</span>, the name
part of the CSS <span>'attr()'</span> function must first be <span>converted to ASCII
lowercase</span>. The same function when compared to other attributes must be compared according
to its original case. In both cases, the comparison is <span>case-sensitive</span>.</p>

<p class="note">This is the same as comparing the name part of a CSS <span>attribute
selector</span>, specified in the next section.</p>


<h4>Case-sensitivity of selectors</h4>

<p>The Selectors specification leaves the case-sensitivity of element names, attribute names, and
attribute values to be defined by the host language. <ref spec=SELECTORS></p>
Expand Down

0 comments on commit fb8ed61

Please sign in to comment.