Skip to content

Commit 91dd37a

Browse files
committed
Fixed up the -position:outside and position:marker sections. If I just copy IE, it's so simple!
1 parent 0ed5fa3 commit 91dd37a

2 files changed

Lines changed: 31 additions & 85 deletions

File tree

css3-lists/Overview.html

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525

2626
<h1>CSS Lists and Counters Module Level 3</h1>
2727

28-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 30 June 2011</h2>
28+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 9 July 2011</h2>
2929

3030
<dl>
3131
<dt>This version:
3232

33-
<dd><!--<a href="http://www.w3.org/TR/2011/WD-css3-lists-20110630">http://www.w3.org/TR/2011/WD-css3-lists-20110630</a></dd>-->
33+
<dd><!--<a href="http://www.w3.org/TR/2011/WD-css3-lists-20110709">http://www.w3.org/TR/2011/WD-css3-lists-20110709</a></dd>-->
3434
<a
3535
href="http://dev.w3.org/csswg/css3-lists/">http://dev.w3.org/csswg/css3-lists/</a>
3636

@@ -652,26 +652,15 @@ <h2 id=list-style-position-property><span class=secno>4. </span> Marker
652652
&lsquo;<code class=css>::marker</code>&rsquo; pseudo-element in this
653653
state, and this &lsquo;<code class=css>::marker</code>&rsquo; box
654654
participates in the inline box model in the normal manner.
655-
<p class=issue>Inline markers have some special behavior wrt white-space
656-
collapsing at the beginning of the list-item. Is this behavior necessary
657-
for web-compat, or can I just spec it away? (Since I have outside
658-
markers basically be abspos, it doesn't apply to them.)
659655

660656
<dt><dfn id=outside>outside</dfn>
661657

662658
<dd>As &lsquo;<a href="#inside"><code class=css>inside</code></a>&rsquo;,
663-
except the ::marker pseudo-element is placed immediately before the first
664-
text or significant whitespace in the <a href="#list-item"><i>list
665-
item</i></a> or its descendants. As well, the computed value of
666-
&lsquo;<code class=property>position</code>&rsquo; on the ::marker
667-
pseudo-element is &lsquo;<code class=css>marker</code>&rsquo;. The
668-
section on the new &lsquo;<code class=property>marker</code>&rsquo; value
669-
for &lsquo;<code class=property>position</code>&rsquo; explains the
670-
consequences of this.
671-
<p class=issue>I haven't yet defined what happens when the list item
672-
doesn't contain any text, or when the first text is within a child
673-
list-item. I need to figure out how much of current implementations is
674-
accidental and how much is necessary.
659+
plus the computed value of &lsquo;<code
660+
class=property>position</code>&rsquo; on the ::marker pseudo-element is
661+
&lsquo;<code class=css>marker</code>&rsquo;. The section on the new
662+
&lsquo;<code class=property>marker</code>&rsquo; value for &lsquo;<code
663+
class=property>position</code>&rsquo; explains the consequences of this.
675664
</dl>
676665

677666
<p>Note that a marker is only generated if the computed value of the
@@ -895,11 +884,8 @@ <h2 id=marker-pseudoelement><span class=secno>6. </span> Markers: The
895884
<p>Just like other generated content, markers generate a box when they're
896885
created, which has margins, border, padding, and everything else a box
897886
normally has. Markers are placed at the beginning of their superior
898-
parent's content (the exact location depends on the value of &lsquo;<a
899-
href="#list-style-position"><code
900-
class=property>list-style-position</code></a>&rsquo; on the list item, as
901-
explained in the definition of that property). Marker boxes are inline by
902-
default, though certain values for &lsquo;<a
887+
parent's content, before the ::before pseudo-element (if it exists).
888+
Marker boxes are inline by default, though certain values for &lsquo;<a
903889
href="#list-style-position"><code
904890
class=property>list-style-position</code></a>&rsquo; on the list item can
905891
make the marker box positioned, which can have an effect on the computed
@@ -1171,10 +1157,12 @@ <h2 id=display-marker><span class=secno>7. </span> Positioning Markers: the
11711157
</table>
11721158

11731159
<p>The &lsquo;<code class=css>marker</code>&rsquo; value for &lsquo;<code
1174-
class=property>position</code>&rsquo; depends on the box it is set on
1175-
having a list item ancestor. If there is no list item ancestor, this value
1176-
must be treated identically to &lsquo;<code
1177-
class=css>position:relative</code>&rsquo;.
1160+
class=property>position</code>&rsquo; depends on the element it is set on
1161+
having a list item ancestor. If the specified value of &lsquo;<code
1162+
class=property>position</code>&rsquo; is &lsquo;<code
1163+
class=css>marker</code>&rsquo; and the element does not have a list-item
1164+
ancestor, &lsquo;<code class=property>position</code>&rsquo; must compute
1165+
to &lsquo;<code class=property>relative</code>&rsquo; on the element.
11781166

11791167
<p>The box's vertical position is calculated according to the <a
11801168
href="http://www.w3.org/TR/CSS21/visuren.html#normal-flow">normal
@@ -1185,17 +1173,18 @@ <h2 id=display-marker><span class=secno>7. </span> Positioning Markers: the
11851173
nearest list item ancestor as the <dfn id=ancestor-list-item>ancestor list
11861174
item</dfn>, and the parent of that box as the <dfn
11871175
id=ancestor-list-container>ancestor list container</dfn>. The box's
1188-
horizontal position must then be set such that the edge of the box
1176+
horizontal position must then be set such that the margin edge of the box
11891177
corresponding to the "end" edge of the <a
11901178
href="#ancestor-list-container"><i>ancestor list container</i></a> is
1191-
flush with the edge of the <a href="#ancestor-list-item"><i>ancestor list
1192-
item</i></a> corresponding to the "start" edge of the <a
1193-
href="#ancestor-list-container"><i>ancestor list container</i></a>. <span
1194-
class=note>The purpose of this somewhat convoluted definition is to
1195-
position the marker flush against its list item, and to keep all the
1196-
markers for a given list on the same side of their list items even in
1197-
mixed-direction text, so that authors can specify padding on only one side
1198-
and still ensure their markers are visible.</span>
1179+
flush with the border edge of the <a
1180+
href="#ancestor-list-item"><i>ancestor list item</i></a> corresponding to
1181+
the "start" edge of the <a href="#ancestor-list-container"><i>ancestor
1182+
list container</i></a>. <span class=note>The purpose of this somewhat
1183+
convoluted definition is to position the marker flush against its list
1184+
item, and to keep all the markers for a given list on the same side of
1185+
their list items even in mixed-direction text, so that authors can specify
1186+
padding on only one side and still ensure their markers are
1187+
visible.</span>
11991188

12001189
<p class=issue>This handles ltr/rtl mixed-direction text, but not mixed
12011190
horizontal and vertical text. For example, if the <a

css3-lists/Overview.src.html

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -329,27 +329,10 @@ <h2 id='list-style-position-property'>
329329

330330
<dl>
331331
<dt><dfn>inside</dfn></dt>
332-
<dd>The ''::marker'' pseudo-element is a 'display:inline' element placed immediately
333-
before the ''::before'' pseudo-element in the <i>list item</i>'s principle box, after
334-
which the element's content flows. Note that if there is no inline content,
335-
this will create a line box, just as content in an inline ''::before'' pseudo-element
336-
would. Also note that all the properties that apply to inline elements apply
337-
to the ''::marker'' pseudo-element in this state, and this ''::marker'' box
338-
participates in the inline box model in the normal manner.
339-
<p class=issue>Inline markers have some special behavior wrt white-space
340-
collapsing at the beginning of the list-item. Is this behavior necessary for web-compat,
341-
or can I just spec it away? (Since I have outside markers basically be abspos, it
342-
doesn't apply to them.)</p></dd>
332+
<dd>The ''::marker'' pseudo-element is a 'display:inline' element placed immediately before the ''::before'' pseudo-element in the <i>list item</i>'s principle box, after which the element's content flows. Note that if there is no inline content, this will create a line box, just as content in an inline ''::before'' pseudo-element would. Also note that all the properties that apply to inline elements apply to the ''::marker'' pseudo-element in this state, and this ''::marker'' box participates in the inline box model in the normal manner.</dd>
343333

344334
<dt><dfn>outside</dfn></dt>
345-
<dd>As ''inside'', except the ::marker pseudo-element is placed
346-
immediately before the first text or significant whitespace in the
347-
<i>list item</i> or its descendants. As well, the computed value of
348-
'position' on the ::marker pseudo-element is ''marker''. The section on
349-
the new 'marker' value for 'position' explains the consequences of this.
350-
<p class=issue>I haven't yet defined what happens when the list item doesn't contain
351-
any text, or when the first text is within a child list-item. I need to figure out how much
352-
of current implementations is accidental and how much is necessary.</p></dd>
335+
<dd>As ''inside'', plus the computed value of 'position' on the ::marker pseudo-element is ''marker''. The section on the new 'marker' value for 'position' explains the consequences of this.</dd>
353336
</dl>
354337

355338
<p>Note that a marker is only generated if the computed value of the 'content'
@@ -521,14 +504,7 @@ <h2 id='marker-pseudoelement'>
521504
the computed value of the 'content' property for the pseudo-element is not
522505
''none''.</p>
523506

524-
<p>Just like other generated content, markers generate a box when they're created,
525-
which has margins, border, padding, and everything else a box normally has. Markers
526-
are placed at the beginning of their superior parent's content (the exact
527-
location depends on the value of 'list-style-position' on the list item, as
528-
explained in the definition of that property). Marker boxes are inline by
529-
default, though certain values for 'list-style-position' on the list item
530-
can make the marker box positioned, which can have an effect on the computed
531-
value of display.</p>
507+
<p>Just like other generated content, markers generate a box when they're created, which has margins, border, padding, and everything else a box normally has. Markers are placed at the beginning of their superior parent's content, before the ::before pseudo-element (if it exists). Marker boxes are inline by default, though certain values for 'list-style-position' on the list item can make the marker box positioned, which can have an effect on the computed value of display.</p>
532508

533509
<div class="html-example">
534510
<p>In the following example, the content is centered within a marker
@@ -679,13 +655,7 @@ <h3 id='content-property'>
679655
<li>Otherwise, if the computed value of 'list-style-type' is a string, then
680656
the computed value of the 'content' property is that string.</li>
681657

682-
<li>Otherwise, if the computed value of 'list-style-type' is the name
683-
of a counter style, then the computed value of the 'content' property
684-
is <code>&lt;counter-prefix> counter(list-item, &lt;counter-name>) &lt;counter-suffix></code>,
685-
where <i>&lt;counter-name></i> is the computed value of the 'list-style-type'
686-
property and <i>&lt;counter-prefix></i> and <i>&lt;counter-suffix></i> are
687-
the values of the <i title='counter-prefix'>prefix</i> and <i title='counter-suffix'>suffix</i>
688-
descriptors for the counter style with that name.</li>
658+
<li>Otherwise, if the computed value of 'list-style-type' is the name of a counter style, then the computed value of the 'content' property is <code>&lt;counter-prefix> counter(list-item, &lt;counter-name>) &lt;counter-suffix></code>, where <i>&lt;counter-name></i> is the computed value of the 'list-style-type' property and <i>&lt;counter-prefix></i> and <i>&lt;counter-suffix></i> are the values of the <i title='counter-prefix'>prefix</i> and <i title='counter-suffix'>suffix</i> descriptors for the counter style with that name.</li>
689659

690660
<li>Otherwise the computed value is ''none''.</li>
691661
</ol>
@@ -759,27 +729,14 @@ <h2 id='display-marker'>
759729
</tbody>
760730
</table>
761731

762-
<p>The ''marker'' value for 'position' depends on the box it is set on
763-
having a list item ancestor. If there is no list item ancestor, this value
764-
must be treated identically to ''position:relative''.</p>
732+
<p>The ''marker'' value for 'position' depends on the element it is set on having a list item ancestor. If the specified value of 'position' is ''marker'' and the element does not have a list-item ancestor, 'position' must compute to 'relative' on the element.</p>
765733

766734
<p>The box's vertical position is calculated according to the
767735
<a href="http://www.w3.org/TR/CSS21/visuren.html#normal-flow">normal flow</a>.
768736
<span class='note'>In the Positioned Layout Module this will be defined
769737
more precisely in terms of placeholders.</span></p>
770738

771-
<p>To calculate the box's horizontal position, first define the box's nearest
772-
list item ancestor as the <dfn>ancestor list item</dfn>, and the parent of
773-
that box as the <dfn>ancestor list container</dfn>. The box's horizontal
774-
position must then be set such that the edge of the box corresponding to the
775-
"end" edge of the <i>ancestor list container</i> is flush with the edge of
776-
the <i>ancestor list item</i> corresponding to the "start" edge of the
777-
<i>ancestor list container</i>. <span class='note'>The purpose of this
778-
somewhat convoluted definition is to position the marker flush against its
779-
list item, and to keep all the markers for a given list on the same side
780-
of their list items even in mixed-direction text, so that authors can
781-
specify padding on only one side and still ensure their markers are
782-
visible.</span></p>
739+
<p>To calculate the box's horizontal position, first define the box's nearest list item ancestor as the <dfn>ancestor list item</dfn>, and the parent of that box as the <dfn>ancestor list container</dfn>. The box's horizontal position must then be set such that the margin edge of the box corresponding to the "end" edge of the <i>ancestor list container</i> is flush with the border edge of the <i>ancestor list item</i> corresponding to the "start" edge of the <i>ancestor list container</i>. <span class='note'>The purpose of this somewhat convoluted definition is to position the marker flush against its list item, and to keep all the markers for a given list on the same side of their list items even in mixed-direction text, so that authors can specify padding on only one side and still ensure their markers are visible.</span></p>
783740

784741
<p class='issue'>This handles ltr/rtl mixed-direction text, but not mixed
785742
horizontal and vertical text. For example, if the <i>ancestor list container</i>

0 commit comments

Comments
 (0)