- From: Elika Etemad via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 08 Feb 2011 01:31:05 +0000
- To: public-css-commits@w3.org
Update of /sources/public/csswg/css3-text In directory hutz:/tmp/cvs-serv19924 Modified Files: Overview.html Overview.src.html Log Message: Improve wording and organization of character-based alignment section. Add statement on interaction with white-space: pre(-wrap) from CSS2.1 issue. Index: Overview.html =================================================================== RCS file: /sources/public/csswg/css3-text/Overview.html,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Overview.html 4 Feb 2011 20:01:30 -0000 1.43 +++ Overview.html 8 Feb 2011 01:31:03 -0000 1.44 @@ -83,14 +83,14 @@ <h1>CSS Text Level 3</h1> - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 4 February + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 8 February 2011</h2> <dl> <dt>This version: <dd><a href="http://dev.w3.org/csswg/css3-text/Overview.html">$Date: - 2011/01/30 22:03:16 $ (CVS $Revision$)</a> <!--<dd><a + 2011/02/04 20:01:30 $ (CVS $Revision$)</a> <!--<dd><a href="http://www.w3.org/TR/2010/WD-css3-text-20101005/">http://www.w3.org/TR/2010/WD-css3-text-20101005/</a></dd> --> @@ -322,6 +322,10 @@ <ul class=toc> <li><a href="#text-align"><span class=secno>8.1. </span> Text Alignment: the ‘<code class=property>text-align</code>’ property</a> + <ul class=toc> + <li><a href="#character-alignment"><span class=secno>8.1.1. + </span>Details on Character-based Alignment in a Table Column</a> + </ul> <li><a href="#text-align-first"><span class=secno>8.2. </span> First Line Alignment: the ‘<code @@ -2169,7 +2173,7 @@ <tr> <th>Value: - <td>[start | end | left | right | center | justify | match-parent ] || + <td>[ start | end | left | right | center | justify | match-parent ] || <a class=noxref href="http://www.w3.org/TR/CSS21/syndata.html#value-def-string"><span class=value-inst-string><string></span></a> @@ -2250,25 +2254,22 @@ <dd>The string must be a single character; otherwise the declaration must be <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>. - When applied to a table cell, specifies a character around which the - cell's contents will align. The alignment character of each - <string>-aligned cell in the same column is centered along a single - vertical axis and the rest of the text in the column shifted accordingly. - If width constraints on the cell contents prevent full alignment - throughout the column, the resulting alignment is undefined. Note that - the strings do not have to be the same for each cell, although the - usually are. See below for further details. + When applied to a table cell, specifies the <dfn + id=alignment-character>alignment character</dfn> around which the cell's + contents will align. See <a href=character-alignment>below</a> for + further details. <dt><dfn id=match-parent title="text-align:match-parent"><code>match-parent</code></dfn> <dd>This value behaves the same as ‘<code - class=property>inherit</code>’ except that an inherited value of + class=property>inherit</code>’ except that an inherited ‘<code class=property>start</code>’ or ‘<code - class=property>end</code>’ is calculated against its parent's - ‘<code class=property>direction</code>’ value and results in - a computed value of either ‘<code class=property>left</code>’ - or ‘<code class=property>right</code>’. + class=property>end</code>’ keyword is calculated against its + parent's ‘<code class=property>direction</code>’ value and + results in a computed value of either ‘<code + class=property>left</code>’ or ‘<code + class=property>right</code>’. </dl> <p>A block of text is a stack of <a @@ -2278,43 +2279,74 @@ class=property>left</code>’, ‘<code class=property>right</code>’ and ‘<code class=property>center</code>’, this property specifies how the - inline boxes within each line box align within the line box: alignment is - not with respect to the <a + inline-level boxes within each line box align with respect to the start + and end sides of the line box: alignment is not with respect to the <a href="http://www.w3.org/TR/CSS21/visuren.html#viewport">viewport</a> or - containing block. In the case of ‘<code - class=property>justify</code>’, the UA may stretch the inline boxes - in addition to adjusting their positions. (See also the <a class=property - href="#text-justify">‘<code - class=property>text-justify</code>’</a>, <a class=property - href="#letter-spacing">‘<code - class=property>letter-spacing</code>’</a> and <a class=property - href="#word-spacing">‘<code - class=property>word-spacing</code>’</a>.) + containing block. + + <p>In the case of ‘<code class=property>justify</code>’, the UA + may stretch or shrink any inline boxes by <a + href="#text-justify">adjusting</a> their text in addition to shifting + their positions. (See also ‘<a href="#text-justify0"><code + class=property>text-justify</code></a>’, ‘<a + href="#letter-spacing0"><code + class=property>letter-spacing</code></a>’, and ‘<a + href="#word-spacing0"><code + class=property>word-spacing</code></a>’.) If an element's white + space is set to be <a href="#collapse">collapsible</a>, then the UA is not + required to adjust its text for the purpose of justification and may + instead treat the text as having no expansion opportunities. If the UA + chooses to adjust the text, then it must ensure that tab stops continue to + line up as required by the <a + href="http://dev.w3.org/csswg/css3-text/#white-space-rules">white space + processing rules</a>. + + <h4 id=character-alignment><span class=secno>8.1.1. </span>Details on + Character-based Alignment in a Table Column</h4> + + <p>When multiple cells in a column have an alignment character specified, + the alignment character of each such cell in the column is centered along + a single column-parallel axis and the rest of the text in the column + shifted accordingly. (Note that the strings do not have to be the same for + each cell, although they usually are.) + + <p>If the alignment character appears more than once in the text, the first + instance is used for alignment. If the alignment character does not appear + in a cell at all, the string is aligned as if the alignment character had + been inserted at the end of its contents. + + <p>Character-based alignment occurs before table cell width computation so + that auto width computations can leave enough space for alignment. Whether + column-spanning cells participate in the alignment prior to or after width + computation is undefined. If width constraints on the cell contents + prevent full alignment throughout the column, the resulting alignment is + undefined. <p>A keyword value may be specified in conjunction with the <string> value; if it is not given, it defaults to ‘<code - class=property>right</code>’. This value is used: + class=css>right</code>’. This value is used: <ul> - <li>when <string> alignment is applied to boxes that are not table + <li>when character-based alignment is applied to boxes that are not table cells. <li>when the text wraps to multiple lines. <li>when the column is wide enough that the character alignment alone does - not determine the alignment of its <string>-aligned contents as - follows: the keyword alignment of the first cell in the column with a - <string> alignment is used to slide the position of the aligned - contents to match the given alignment insofar as possible without - changing the width of the column. For ‘<code + not determine the positions of its character-aligned contents. In this + case the keyword alignment of the first cell in the column with a + specified alignment character is used to slide the position of the + character-aligned contents to match the keyword alignment insofar as + possible without changing the width of the column. For ‘<code class=css>center</code>’, the UA may center the aligned contents using its extremes, center the alignment axis itself (insofar as possible), or optically center the aligned contents some other way (such - as by taking a weighted average of the extent of the cells' contents). + as by taking a weighted average of the extent of the cells' contents to + either side of the axis). - <li>when a <string>-aligned cell spans more than one column as - follows: the keyword alignment value is used to determine which column's - axis to align with: the leftmost column for ‘<code + <li>when a character-aligned cell spans more than one column. In this case + the keyword alignment value is used to determine which column's axis to + align with: the leftmost column for ‘<code class=css>left</code>’, the rightmost column for ‘<code class=css>right</code>’ and ‘<code class=css>center</code>’, the startmost column for ‘<code @@ -2322,16 +2354,6 @@ class=css>end</code>’. </ul> - <p>If the alignment character appears more than once in the text, the first - instance is used for alignment. If the alignment character does not appear - in a cell at all, the string is aligned as if the alignment character had - been inserted at the end of its contents. - - <p><string>-alignment along a vertical axis occurs before table cell - width computation so that auto width computations can leave enough space - for alignment. Whether column-spanning cells participate in the alignment - prior to width computation is undefined. - <div class=example> The following style sheet: <pre>TD { text-align: "." center }</pre> will cause the column of dollar figures in the following HTML table: @@ -2368,10 +2390,10 @@ <!-- --></pre> </div> - <p class=note>Right alignment is used by default for <string> + <p class=note>Right alignment is used by default for character-based alignment because numbering systems are almost all left-to-right even in - right-to-left writing systems, and the primary use case of - <string>-alignment is for numerical alignment. + right-to-left writing systems, and the primary use case of character-based + alignment is for numerical alignment. <h3 id=text-align-first><span class=secno>8.2. </span> First Line Alignment: the ‘<a href="#text-align-first0"><code @@ -5526,7 +5548,7 @@ <tr valign=baseline> <td><a class=property href="#text-align0">text-align</a> - <td>[start | end | left | right | center | justify | match-parent ] || + <td>[ start | end | left | right | center | justify | match-parent ] || <string> <td>start @@ -5961,6 +5983,9 @@ <!--begin-index--> <ul class=indexlist> + <li>alignment character, <a href="#alignment-character" title="alignment + character"><strong>8.1.</strong></a> + <li>‘<code class=css>alphabetic</code>’, <a href="#alphabetic" title="''alphabetic''"><strong>11.1.6.</strong></a> Index: Overview.src.html =================================================================== RCS file: /sources/public/csswg/css3-text/Overview.src.html,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- Overview.src.html 4 Feb 2011 20:01:30 -0000 1.138 +++ Overview.src.html 8 Feb 2011 01:31:03 -0000 1.139 @@ -1526,7 +1526,7 @@ </tr> <tr> <th>Value:</th> - <td>[start | end | left | right | center | justify | match-parent ] || + <td>[ start | end | left | right | center | justify | match-parent ] || <a class="noxref" href="http://www.w3.org/TR/CSS21/syndata.html#value-def-string"><span class="value-inst-string"><string></span></a> </td> </tr> @@ -1584,63 +1584,80 @@ ><span class="value-inst-string"><string></span></a></span></code></dfn></dt> <dd>The string must be a single character; otherwise the declaration must be <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>. - When applied to a table cell, specifies a character around which the - cell's contents will align. The alignment character of each - <string>-aligned cell in the same column is centered along a - single vertical axis and the rest of the text in the column shifted - accordingly. If width constraints on the cell contents prevent full - alignment throughout the column, the resulting alignment is undefined. - Note that the strings do not have to be the same for each cell, - although the usually are. See below for further details. + When applied to a table cell, specifies the <dfn>alignment character</dfn> + around which the cell's contents will align. See + <a href="character-alignment">below</a> for further details. </dd> <dt><dfn title="text-align:match-parent"><code>match-parent</code></dfn></dt> <dd>This value behaves the same as 'inherit' except that an inherited - value of 'start' or 'end' is calculated against its parent's 'direction' + 'start' or 'end' keyword is calculated against its parent's 'direction' value and results in a computed value of either 'left' or 'right'. </dl> <p>A block of text is a stack of <a href="http://www.w3.org/TR/CSS21/visuren.html#line-box">line boxes</a>. In the case of 'start', 'end', 'left', 'right' and 'center', this - property specifies how the inline boxes within each line box align - within the line box: alignment is not with respect to the + property specifies how the inline-level boxes within each line box align + with respect to the start and end sides of the line box: alignment is not + with respect to the <a href="http://www.w3.org/TR/CSS21/visuren.html#viewport">viewport</a> - or containing block. In the case of 'justify', the UA may stretch - the inline boxes in addition to adjusting their positions. (See also - the <a href="#text-justify" class="property">'text-justify'</a>, - <a href="#letter-spacing" class="property">'letter-spacing'</a> - and <a href="#word-spacing" class="property">'word-spacing'</a>.) + or containing block. + + <p>In the case of 'justify', the UA may stretch or shrink any inline boxes + by <a href="#text-justify">adjusting</a> their text in addition to + shifting their positions. (See also 'text-justify', 'letter-spacing', and + 'word-spacing'.) + If an element's white space is set to be <a href="#collapse">collapsible</a>, + then the UA is not required to adjust its text for the purpose of + justification and may instead treat the text as having no expansion + opportunities. If the UA chooses to adjust the text, then it must ensure + that tab stops continue to line up as required by the + <a href="http://dev.w3.org/csswg/css3-text/#white-space-rules">white + space processing rules</a>. + + <h4 id="character-alignment">Details on Character-based Alignment in a Table Column</h4> + + <p>When multiple cells in a column have an alignment character specified, + the alignment character of each such cell in the column is centered along + a single column-parallel axis and the rest of the text in the column + shifted accordingly. (Note that the strings do not have to be the same + for each cell, although they usually are.) + + <p>If the alignment character appears more than once in the text, the first + instance is used for alignment. If the alignment character does not appear + in a cell at all, the string is aligned as if the alignment character had + been inserted at the end of its contents. + + <p>Character-based alignment occurs before table cell width computation so + that auto width computations can leave enough space for alignment. + Whether column-spanning cells participate in the alignment prior to + or after width computation is undefined. + If width constraints on the cell contents prevent full alignment + throughout the column, the resulting alignment is undefined. <p>A keyword value may be specified in conjunction with the <string> - value; if it is not given, it defaults to 'right'. This value is used: + value; if it is not given, it defaults to ''right''. This value is used: <ul> - <li>when <string> alignment is applied to boxes that are not table + <li>when character-based alignment is applied to boxes that are not table cells. <li>when the text wraps to multiple lines. <li>when the column is wide enough that the character alignment alone does - not determine the alignment of its <string>-aligned contents as - follows: the keyword alignment of the first cell in the column with a - <string> alignment is used to slide the position of the aligned - contents to match the given alignment insofar as possible without - changing the width of the column. For ''center'', the UA may center + not determine the positions of its character-aligned contents. In this + case the keyword alignment of the first cell in the column with a + specified alignment character is used to slide the position of the + character-aligned contents to match the keyword alignment insofar as + possible without changing the width of the column. + For ''center'', the UA may center the aligned contents using its extremes, center the alignment axis itself (insofar as possible), or optically center the aligned contents some other way (such as by taking a weighted average of the extent of - the cells' contents). - <li>when a <string>-aligned cell spans more than one column as - follows: the keyword alignment value is used to determine which column's + the cells' contents to either side of the axis). + <li>when a character-aligned cell spans more than one column. In this + case the keyword alignment value is used to determine which column's axis to align with: the leftmost column for ''left'', the rightmost column for ''right'' and ''center'', the startmost column for ''start'', the endmost column for ''end''. </ul> - <p>If the alignment character appears more than once in the text, the first - instance is used for alignment. If the alignment character does not appear - in a cell at all, the string is aligned as if the alignment character had - been inserted at the end of its contents. - <p><string>-alignment along a vertical axis occurs before table cell - width computation so that auto width computations can leave enough space - for alignment. Whether column-spanning cells participate in the alignment - prior to width computation is undefined. <div class="example"> The following style sheet: @@ -1678,10 +1695,10 @@ <!-- --></pre> </div> - <p class="note">Right alignment is used by default for <string> + <p class="note">Right alignment is used by default for character-based alignment because numbering systems are almost all left-to-right even in right-to-left writing systems, and the primary use case of - <string>-alignment is for numerical alignment.</p> + character-based alignment is for numerical alignment.</p> <h3 id="text-align-first"> First Line Alignment: the 'text-align-first' property</h3>
Received on Tuesday, 8 February 2011 01:31:07 UTC