141141Declaring a List Item</ h2 >
142142
143143 < p > To declare a list item, the 'display'
144- property should be set to ''list-item''. This, in addition to generating
144+ property should be set to ''list-item'' or ''inline-list-item'' . This, in addition to generating
145145 a ''::marker'' pseudo-element and enabling the
146146 properties described below for that element, causes that element to
147147 increment the list item counter ''list-item''.
@@ -311,25 +311,18 @@ <h2 id='list-style-position-property'>
311311 participates in the inline box model in the normal manner.
312312 < p class =issue > Inline markers have some special behavior wrt white-space
313313 collapsing at the beginning of the list-item. Is this behavior necessary for web-compat,
314- or can I just spec it away? (Since I have hanging and outside markers be abspos, it
314+ or can I just spec it away? (Since I have outside markers basically be abspos, it
315315 doesn't apply to them.)</ p > </ dd >
316316
317- < dt > < dfn > hanging </ dfn > </ dt >
318- < dd > As 'inside', except the marker is instead placed immediately before the first
319- text or significant whitespace in the list item or its children. The marker is then
320- absolutely positioned (leaving behind a placeholder, per the Positioned Layout spec),
321- with the static position such that the "end" edge of the marker is against the "start"
322- edge of the placeholder, and the baseline of the marker is aligned with the placeholder .
317+ < dt > < dfn > outside </ dfn > </ dt >
318+ < dd > As '' inside'' , except the :: marker pseudo-element is placed
319+ immediately before the first text or significant whitespace in the list
320+ item or its descendants. As well, the computed value of 'position' on
321+ the ::marker pseudo-element is ''marker''. The section on the new
322+ 'marker' value for 'position' explains the consequences of this .
323323 < p class =issue > I haven't yet defined what happens when the list item doesn't contain
324324 any text, or when the first text is within a child list-item. I need to figure out how much
325325 of current implementations is accidental and how much is necessary.</ p > </ dd >
326-
327- < dt > < dfn > outside</ dfn > </ dt >
328- < dd > As ''hanging'', except the horizontal static position of the marker is such that
329- the marker's "end" edge is placed against the "start" edge of the list item's parent.
330- < span class ='note '> The ''outside'' value has additional implications for the marker,
331- described in the < a href ="#marker-pseudoelement "> Marker section</ a > .</ span >
332- < p class =issue > The same problems with 'hanging' apply here.</ p > </ dd >
333326 </ dl >
334327
335328 < p > Note that a marker is only generated if the computed value of the 'content'
@@ -504,12 +497,12 @@ <h2 id='marker-pseudoelement'>
504497
505498 < p > Just like other generated content, markers generate a box when they're created,
506499 which has margins, border, padding, and everything else a box normally has. Markers
507- are placed at the beginning of their superior parent's content, immediately before
508- a ''::before'' pseudo-element on the same superior parent. Marker boxes are
509- inline-block by default, and so a value of ''auto'' for 'width'
510- resolves to the width of the marker's content. The value of ' list-style-position'
511- on the marker's superior parent can vary the marker's directionality and the
512- initial value of its ''position'' property .</ p >
500+ are placed at the beginning of their superior parent's content (the exact
501+ location depends on the value of 'list-style-position' on the list item, as
502+ explained in the definition of that property). Marker boxes are inline by
503+ default, though certain values for ' list-style-position' on the list item
504+ can make the marker box positioned, which can have an effect on the computed
505+ value of display .</ p >
513506
514507 < div class ="html-example ">
515508 < p > In the following example, the content is centered within a marker
@@ -660,13 +653,6 @@ <h3 id='content-property'>
660653 < li > Otherwise, if the computed value of 'list-style-type' is a string, then
661654 the computed value of the 'content' property is that string.</ li >
662655
663- < li > Otherwise, if the computed value of 'list-style-type' is the keyword
664- ''inline'', and the list item has a child element which is an
665- < i title ='inline-marker-candidate '> inline marker candidate</ i > , the
666- computed value of the 'content' property is the textual contents of the
667- list item's first < i title ='inline-marker-candidate '> inline marker candidate
668- child</ i > .</ li >
669-
670656 < li > Otherwise, if the computed value of 'list-style-type' is the name
671657 of a counter style, then the computed value of the 'content' property
672658 is < code > <counter-prefix> counter(list-item, <counter-name> ) <counter-suffix> </ code > ,
@@ -696,25 +682,33 @@ <h3 id='content-property'>
696682<!-- ===================================================================== -->
697683
698684< h2 id ='display-marker '>
699- Using Content as Markers: the ''marker'' value for 'display'</ h2 >
700-
701- < p > In some situations, such as legal proceedings or official minutes, the
702- precise form that the list marker takes is a vital part of the content. It's
703- not acceptable for the marker to change just because the UA is not rendering
704- CSS, or some server error is temporarily preventing the CSS file from being
705- loaded, as the precise marker name is used to officially refer to that segment.
706- The only way to guarantee that the marker will be rendered correctly, regardless
707- of whether CSS is applied, is to specify the marker outside of CSS, directly
708- in the document's markup. However, the page author may still want to style
709- the marker in many of the ways that are available to them when using ordinary
710- CSS-generated markers. To accomodate this, a new value for the 'display'
711- property is defined.</ p >
685+ Positioning Markers: the ''marker'' value for 'position'</ h2 >
686+
687+ < p > This section introduces a new positioning scheme, designed to model the
688+ way in which "outside" list markers were traditionally positioned in CSS 2.1.
689+ Outside list markers now have their positioning defined in terms of this new
690+ value.</ p >
691+
692+ < p > The new positioning scheme defined in this section can be used on all
693+ elements, not just ::marker pseudo-elements. In some situations, such as
694+ legal proceedings or official minutes, the precise form that the list marker
695+ takes is a vital part of the content. It's not acceptable for the marker to
696+ change (from a custom-defined marker to a default bullet or alpha marker)
697+ just because the UA is not rendering CSS, or a server error is temporarily
698+ preventing the CSS file from being loaded, as the precise form of the marker
699+ is used to officially refer to that segment. The only way to guarantee that
700+ the marker will be rendered correctly, regardless of whether CSS is applied,
701+ is to specify the marker outside of CSS, directly in the document's markup.
702+ However, the page author may still want to style the marker in many of the
703+ ways that are available to them when using ordinary CSS-generated markers.
704+ To accomodate this, the new positioning scheme can be used to position the
705+ marker-in-content as if it were an ordinary CSS-generated marker.</ p >
712706
713707 < table class ="propdef ">
714708 < tbody >
715709 < tr >
716710 < th > Property:
717- < td > 'display '
711+ < td > 'position '
718712 < tr >
719713 < th > New Value:
720714 < td > ''marker''
@@ -734,19 +728,44 @@ <h2 id='display-marker'>
734728 < th > Media:
735729 < td > same as CSS2.1
736730 < tr >
737- < th > Computed  ;value:
731+ < th > Computed  ;value:
738732 < td > same as CSS2.1
739733 </ tbody >
740734 </ table >
741735
742- < p > The < dfn > ''marker''</ dfn > value for 'display' indicates that an element
743- is an < dfn title ="inline-marker-candidate "> inline marker candidate</ dfn > .
744- If the element is a child of a list item with ''list-style-type:inline'',
745- and none of the element's previous siblings are inline marker candidates,
746- the textual content of the element (such as what would be returned
747- by the .textContent property on the element in HTML) must be used as the
748- default contents of the ::marker pseudo-element on the element's parent.
749- Otherwise, this value must be treated identically to ''inline-block''.</ p >
736+ < p > The ''marker'' value for 'position' depends on the box it is set on
737+ having a list item ancestor. If there is no list item ancestor, this value
738+ must be treated identically to ''position:relative''.</ p >
739+
740+ < p > The box's vertical position is calculated according to the
741+ < a href ="http://www.w3.org/TR/CSS21/visuren.html#normal-flow "> normal flow</ a > .
742+ < span class ='note '> In the Positioned Layout Module this will be defined
743+ more precisely in terms of placeholders.</ span > </ p >
744+
745+ < p > To calculate the box's horizontal position, first define the box's nearest
746+ list item ancestor as the < dfn > ancestor list item</ dfn > , and the parent of
747+ that box as the < dfn > ancestor list container</ dfn > . The box's horizontal
748+ position must then be set such that the edge of the box corresponding to the
749+ "end" edge of the < i > ancestor list container</ i > is flush with the edge of
750+ the < i > ancestor list item</ i > corresponding to the "start" edge of the
751+ < i > ancestor list container</ i > . < span class ='note '> The purpose of this
752+ somewhat convoluted definition is to position the marker flush against its
753+ list item, and to keep all the markers for a given list on the same side
754+ of their list items even in mixed-direction text, so that authors can
755+ specify padding on only one side and still ensure their markers are
756+ visible.</ span > </ p >
757+
758+ < p class ='issue '> This handles ltr/rtl mixed-direction text, but not mixed
759+ horizontal and vertical text. For example, if the < i > ancestor list container</ i >
760+ is vertical but the < i > ancestor list item</ i > is horizontal, this definition
761+ is nonsensical, as it requires a vertical edge of the marker to be flush
762+ against a horizontal edge of the < i > ancestor list item</ i > . Need to think
763+ on what UI would be acceptable for such a crazy case, and how to state it
764+ in non-crazy terms.</ p >
765+
766+ < p > The 'top', 'right', 'bottom', and 'left' properties specify offsets
767+ relative to the top, right, bottom, and left edges (respectively) of the box
768+ itself, similar to how relative positioning works.</ p >
750769
751770<!-- ===================================================================== -->
752771
0 commit comments