Skip to content

Commit

Permalink
Match browsers for case-sensitivity of ol[type=a] selector
Browse files Browse the repository at this point in the history
Browsers are case-insensitive for the attribute value of
`type` attribute selectors for all HTML elements, but they
should be case-sensitive for `ol` and `li` in the UA stylesheet.

Fixes #225.
  • Loading branch information
zcorpan authored and annevk committed Oct 6, 2015
1 parent 3970693 commit 9f367c1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -68814,7 +68814,7 @@ contradict people?
<p>Attribute selectors on an <span data-x="HTML elements">HTML element</span> in an
<span data-x="HTML documents">HTML document</span> must treat the <em>values</em> of attributes
with the following names as <span>ASCII case-insensitive</span>, with one
exception as noted below:</p>
exception as noted <a href="#attribute-selector-case-sensitive">in the rendering section</a>:</p>

<!-- based on Mozilla's list, which was itself based on HTML4 -->
<!-- WebKit's was identical at the time of writing except as noted below -->
Expand Down Expand Up @@ -68861,15 +68861,12 @@ contradict people?
<li><code data-x="">shape</code>
<li><code data-x="">target</code>
<li><code data-x="">text</code>
<li><code data-x="">type</code> (except as specified below)
<li><code data-x="">type</code> (except as specified in the rendering section)
<li><code data-x="">valign</code>
<li><code data-x="">valuetype</code>
<li><code data-x="">vlink</code>
</ul>

<p>The exception to the list above is the <code data-x="attr-ol-type">type</code> attribute on
<code>ol</code> elements, which must be treated as <span>case-sensitive</span>.</p>

<p>All other attribute values and everything else must be treated as entirely
<span>case-sensitive</span> for the purposes of selector matching. This includes:</p>

Expand Down Expand Up @@ -108712,6 +108709,10 @@ ul[type=disc i], li[type=disc i] { list-style-type: disc; }
ul[type=circle i], li[type=circle i] { list-style-type: circle; }
ul[type=square i], li[type=square i] { list-style-type: square; }</pre>

<p id="attribute-selector-case-sensitive">In the above stylesheet, the attribute selectors for the
<code>ol</code> and <code>li</code> elements are expected to be treated as
<span>case-sensitive</span>.</p>

<p>When rendering <code>li</code> elements, non-CSS user agents are expected to use the
<span>ordinal value</span> of the <code>li</code> element to render the counter in the list item
marker.</p>
Expand Down

0 comments on commit 9f367c1

Please sign in to comment.