Skip to content

Commit 2cfdfda

Browse files
committed
Updated 'hanging' and 'outside' positioning rules to better match browsers. They're still not perfect, but I have some issues logged.
1 parent 7b68d14 commit 2cfdfda

2 files changed

Lines changed: 39 additions & 40 deletions

File tree

css3-lists/Overview.html

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -571,37 +571,38 @@ <h2 id=list-style-position-property><span class=secno>4. </span> Marker
571571
in this state, and this &lsquo;<code class=css>::marker</code>&rsquo; box
572572
participates in the inline box model in the normal manner.
573573
<p class=issue>Inline markers have some special behavior wrt white-space
574-
collapsing at the beginning of the list-item. I need to figure this out
575-
and spec it. (Since I have hanging and outside markers be abspos, it
576-
doesn't apply to them.)
574+
collapsing at the beginning of the list-item. Is this behavior necessary
575+
for web-compat, or can I just spec it away? (Since I have hanging and
576+
outside markers be abspos, it doesn't apply to them.)
577577

578578
<dt><dfn id=hanging>hanging</dfn>
579579

580-
<dd>As &lsquo;<a href="#inside"><code class=css>inside</code></a>&rsquo;,
581-
except the marker is absolutely positioned. The marker's static position
582-
is such that its baseline is aligned with the baseline of the first line
583-
box in the list item, and its "end" edge is flush with the "start" edge
584-
of the first line box in the list item. <span class=note>Note that, per
585-
the Positioned Layout spec, absolutely positioned boxes leave behind a
586-
&lsquo;<code class=property>placeholder</code>&rsquo; in their original
587-
position in the box tree, which may have an effect on line-box
588-
generation.</span>
580+
<dd>As &lsquo;<a href="#inside"><code
581+
class=property>inside</code></a>&rsquo;, except the marker is instead
582+
placed immediately before the first text or significant whitespace in the
583+
list item or its children. The marker is then absolutely positioned
584+
(leaving behind a placeholder, per the Positioned Layout spec), with the
585+
static position such that the "end" edge of the marker is against the
586+
"start" edge of the placeholder, and the baseline of the marker is
587+
aligned with the placeholder.
588+
<p class=issue>I haven't yet defined what happens when the list item
589+
doesn't contain any text, or when the first text is within a child
590+
list-item. I need to figure out how much of current implementations is
591+
accidental and how much is necessary.
589592

590593
<dt><dfn id=outside>outside</dfn>
591594

592-
<dd>As &lsquo;<a href="#inside"><code class=css>inside</code></a>&rsquo;,
593-
except the marker is absolutely positioned and has the same
594-
directionality as the list item's parent box. The marker's static
595-
position is such that its "over" edge is flush with the edge of the list
596-
item corresponding with the "over" edge of the list item's parent box,
597-
and it's "end" edge is flush with the edge fo the list item corresponding
598-
to the "start" edge of the list item's parent box.
595+
<dd>As &lsquo;<a href="#hanging"><code
596+
class=css>hanging</code></a>&rsquo;, except the horizontal static
597+
position of the marker is such that the marker's "end" edge is placed
598+
against the "start" edge of the list item's parent. <span class=note>The
599+
&lsquo;<a href="#outside"><code class=css>outside</code></a>&rsquo; value
600+
has additional implications for the marker, described in the <a
601+
href="#marker-pseudoelement">Marker section</a>.</span>
602+
<p class=issue>The same problems with &lsquo;<a href="#hanging"><code
603+
class=property>hanging</code></a>&rsquo; apply here.
599604
</dl>
600605

601-
<p class=issue>Are the positioning rules for &lsquo;<a
602-
href="#hanging"><code class=css>hanging</code></a>&rsquo; and &lsquo;<a
603-
href="#outside"><code class=css>outside</code></a>&rsquo; good?
604-
605606
<p>Note that a marker is only generated if the computed value of the
606607
&lsquo;<code class=property>content</code>&rsquo; property for the
607608
element's &lsquo;<code class=css>::marker</code>&rsquo; pseudo-element is

css3-lists/Overview.src.html

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -300,30 +300,28 @@ <h2 id='list-style-position-property'>
300300
to the ''::marker'' pseudo-element in this state, and this ''::marker'' box
301301
participates in the inline box model in the normal manner.
302302
<p class=issue>Inline markers have some special behavior wrt white-space
303-
collapsing at the beginning of the list-item. I need to figure this out
304-
and spec it. (Since I have hanging and outside markers be abspos, it
303+
collapsing at the beginning of the list-item. Is this behavior necessary for web-compat,
304+
or can I just spec it away? (Since I have hanging and outside markers be abspos, it
305305
doesn't apply to them.)</p></dd>
306306

307307
<dt><dfn>hanging</dfn></dt>
308-
<dd>As ''inside'', except the marker is absolutely positioned. The marker's
309-
static position is such that its baseline is aligned with the baseline
310-
of the first line box in the list item, and its "end" edge is flush with
311-
the "start" edge of the first line box in the list item.
312-
<span class=note>Note that, per the Positioned Layout spec, absolutely positioned
313-
boxes leave behind a 'placeholder' in their original position in the box tree,
314-
which may have an effect on line-box generation.</span></dd>
308+
<dd>As 'inside', except the marker is instead placed immediately before the first
309+
text or significant whitespace in the list item or its children. The marker is then
310+
absolutely positioned (leaving behind a placeholder, per the Positioned Layout spec),
311+
with the static position such that the "end" edge of the marker is against the "start"
312+
edge of the placeholder, and the baseline of the marker is aligned with the placeholder.
313+
<p class=issue>I haven't yet defined what happens when the list item doesn't contain
314+
any text, or when the first text is within a child list-item. I need to figure out how much
315+
of current implementations is accidental and how much is necessary.</p></dd>
315316

316317
<dt><dfn>outside</dfn></dt>
317-
<dd>As ''inside'', except the marker is absolutely positioned and has the same
318-
directionality as the list item's parent box. The marker's static position is such that
319-
its "over" edge is flush with the edge of the list item corresponding with
320-
the "over" edge of the list item's parent box, and it's "end" edge is
321-
flush with the edge fo the list item corresponding to the "start" edge of the
322-
list item's parent box.</dd>
318+
<dd>As ''hanging'', except the horizontal static position of the marker is such that
319+
the marker's "end" edge is placed against the "start" edge of the list item's parent.
320+
<span class='note'>The ''outside'' value has additional implications for the marker,
321+
described in the <a href="#marker-pseudoelement">Marker section</a>.</span>
322+
<p class=issue>The same problems with 'hanging' apply here.</p></dd>
323323
</dl>
324324

325-
<p class=issue>Are the positioning rules for ''hanging'' and ''outside'' good?</p>
326-
327325
<p>Note that a marker is only generated if the computed value of the 'content'
328326
property for the element's ''::marker'' pseudo-element is not ''none''.</p>
329327

0 commit comments

Comments
 (0)