1010 rel =dcterms.rights >
1111 < meta content ="CSS Text Decoration Module Level 3 " name =dcterms.title >
1212 < meta content =text name =dcterms.type >
13- < meta content =2013-06 -10 name =dcterms.date >
13+ < meta content =2013-07 -10 name =dcterms.date >
1414 < meta content ="Elika J. Etemad " name =dcterms.creator >
1515 < meta content ="Koji Ishii " name =dcterms.creator >
1616 < meta content =W3C name =dcterms.publisher >
3030 < h1 class =p-name > CSS Text Decoration Module Level 3</ h1 >
3131
3232 < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft < span
33- class =dt-updated > < span class =value-title title =20130610 > 10 June
33+ class =dt-updated > < span class =value-title title =20130710 > 10 July
3434 2013</ span > </ span > </ h2 >
3535
3636 < dl >
3737 < dt > This version:</ dt >
3838 <!--
39- <dd><a class="u-url" href="http://www.w3.org/TR/2013/WD-css-text-decor-3-20130610 /">http://www.w3.org/TR/2013/WD-css-text-decor-3-20130610 /</a></dd>
39+ <dd><a class="u-url" href="http://www.w3.org/TR/2013/WD-css-text-decor-3-20130710 /">http://www.w3.org/TR/2013/WD-css-text-decor-3-20130710 /</a></dd>
4040 -->
4141
4242 < dd > < a class =u-url
@@ -870,7 +870,7 @@ <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
870870 < tr >
871871 < th > < a href ="#values "> Value</ a > :
872872
873- < td > auto | alphabetic | [ under || [ left | right ] ]
873+ < td > auto | [ under || [ left | right ] ]
874874
875875 < tr >
876876 < th > Initial:
@@ -933,30 +933,22 @@ <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
933933
934934 < dd > The user agent may use any algorithm to determine the underline's
935935 position; however it must be placed at or under the alphabetic baseline.
936- < p class =note > It is suggested that the underline position be ‘< code
937- class =css > alphabetic</ code > ’ unless it crosses either subscripted (or
938- otherwise lowered) text, or it affects characters from Asian scripts
939- such as Han or Tibetan, for which an alphabetic underline is too high:
940- in such cases, aligning to the em box edge as described for ‘< code
941- class =css > under</ code > ’ is more appropriate.
942-
943- < p class =issue > See also
944- http://lists.w3.org/Archives/Public/www-style/2010Dec/0409.html
945-
946- < dt > < dfn id =underline-alphabetic
947- title ="text-underline-position: alphabetic "> ‘< code
948- class =css > alphabetic</ code > ’</ dfn >
949-
950- < dd > The underline is positioned relative to the alphabetic baseline. In
951- this case the underline is likely to cross some descenders.
936+ < p class =note > It is suggested that the default underline position be
937+ close to the alphabetic baseline, unless that would either cross
938+ subscripted (or otherwise lowered) text or draw over glyphs from Asian
939+ scripts such as Han or Tibetan for which an alphabetic underline is too
940+ high: in such cases, shifting the underline lower or aligning to the em
941+ box edge as described for ‘< code class =css > under</ code > ’ may be more
942+ appropriate.
943+
952944 < div class =figure >
953945 < p > < img
954946 alt ="In a typical Latin font, the underline is positioned slightly below the alphabetic baseline, leaving a gap between the line and the bottom of most Latin letters, but crossing through descenders such as the stem of a 'p'. "
955947 src =underline-position-alphabetic.png
956948 title ="text-underline-position: alphabetic ">
957949
958- < p class =caption > ‘ < a href =" #underline- alphabetic" > < code
959- class = css > text-underline-position: alphabetic</ code > </ a > ’
950+ < p class =caption > A typical “ alphabetic” underline is positioned just
951+ below the alphabetic baseline
960952 </ div >
961953
962954 < dt > < dfn id =underline-under
@@ -965,8 +957,8 @@ <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
965957
966958 < dd > The underline is positioned < i > under</ i > the element's text content.
967959 In this case the underline usually does not cross the descenders. (This
968- is sometimes called " accounting" underline.) This value can be combined
969- with ‘< code class =css > left</ code > ’ or ‘< code
960+ is sometimes called “ accounting” underline.) This value can be
961+ combined with ‘< code class =css > left</ code > ’ or ‘< code
970962 class =css > right</ code > ’ if a particular side is preferred in vertical
971963 writing modes.
972964 < div class =figure >
@@ -1040,9 +1032,67 @@ <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
10401032 </ div >
10411033
10421034 < p > The exact position and thickness of line decorations is UA-defined in
1043- this level. However, the UA must use a single thickness and position on
1044- each line for the decorations deriving from a single < a
1045- href ="#decorating-box "> < i > decorating box</ i > </ a > . <!--
1035+ this level. However, for underlines and overlines the UA must use a single
1036+ thickness and position on each line for the decorations deriving from a
1037+ single < a href ="#decorating-box "> < i > decorating box</ i > </ a > .
1038+
1039+ < div class =figure >
1040+ < p > < img
1041+ alt ="A single underline drawn under varying font sizes and vertical positions must be a single line. "
1042+ src =underline-single.png > vs. < img
1043+ alt ="Drawing multiple line segments, each with the position and thickness appropriate to the decorated text, is incorrect. "
1044+ src =underline-broken.png >
1045+
1046+ < p class =caption > Correct and incorrect rendering of
1047+ < code > <u> A<sup> B</sup> <big> C</big> D</u> </ code >
1048+ </ div >
1049+
1050+ < div class =note >
1051+ < p > Note, since line decorations can span elements with varying font sizes
1052+ and vertical alignments, the best position for a line decoration is not
1053+ necessarily the ideal position dictated by the < a
1054+ href ="#decorating-box "> < i > decorating box</ i > </ a > . For example, an
1055+ overline positioned to a small font will effectively become a
1056+ line-through if the element contains text in a significantly larger
1057+ font-size. Even for underlines, if the text is not aligned to the
1058+ alphabetic baseline (for example, in vertical typesetting styles, text is
1059+ aligned to the central baseline by default) an underline will cut through
1060+ descendant text of a larger font-size.
1061+
1062+ < div class =figure >
1063+ < p > < img alt ="" src =leftline-cross.png >
1064+ </ div >
1065+ </ div >
1066+
1067+ < p > UAs < em > must</ em > adjust line positions to match the shifted metrics of
1068+ < a href ="#decorating-box "> < i > decorating boxes</ i > </ a > positioned with
1069+ ‘< code class =property > vertical-align</ code > ’ < a href ="#CSS21 "
1070+ rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a > or subscripted/superscripted
1071+ via ‘< code class =property > font-variant-position</ code > ’ < a
1072+ href ="#CSS3-FONTS " rel =biblioentry > [CSS3-FONTS]<!--{{!CSS3-FONTS}}--> </ a > ,
1073+ but < em > must not</ em > adjust the line position or thickness in response to
1074+ descendants of a < a href ="#decorating-box "> < i > decorating box</ i > </ a > that
1075+ are so styled. This allows superscripts and subscripts to be properly
1076+ decorated (underlined, struck through, etc.) but prevents them from
1077+ distorting or breaking the positioning of such decorations on their
1078+ ancestors.
1079+
1080+ < div class =figure >
1081+ < p > < img
1082+ alt ="An underline for just the superscript 'st' in '1st' is drawn just below the superscript, whereas an underline for the entire text is drawn at the appropriate position for full-size text. "
1083+ src =underline-superscript.png >
1084+
1085+ < p class =caption > Example of underline applied to superscripted text vs.
1086+ underline applied to text containing a superscript
1087+ <!-- illustration code, for future alterations
1088+ <!DOCTYPE html>
1089+ <style>html { font: 2em Sawasdee; } big { font-size: 2em; }</style>
1090+ <u><span>A<sup>B</sup><big>C</big>D</span></u>
1091+ <u>A</u><sup><u>B</u></sup><big><u>C</u></big><u>D</u>
1092+ <u style='font-weight: bold'>1<sup><u>st</u></sup></u>
1093+ -->
1094+ </ div >
1095+ <!--
10461096<h3 id="line-position">
10471097Determining the Position and Thickness of Line Decorations</h3>
10481098
@@ -1136,9 +1186,9 @@ <h3 id="line-position">
11361186-->
11371187
11381188 < p > Some font formats (such as OpenType) can offer information about the
1139- appropriate position of an underline . The UA should use such information
1140- (such as the underline thickness, or appropriate alphabetic alignment)
1141- from the font wherever appropriate. The same applies to line throughs .
1189+ appropriate position of a line decoration . The UA should use such
1190+ information (such as the underline thickness, or appropriate alphabetic
1191+ alignment) from the font wherever appropriate.
11421192
11431193 < p class =note > Typically, OpenType font metrics give the position of an
11441194 ‘< code class =css > alphabetic</ code > ’ underline; in some cases
@@ -1955,6 +2005,16 @@ <h3 class=no-num id=normative-ref>Normative references</h3>
19552005 </ dd >
19562006 <!---->
19572007
2008+ < dt id =CSS3-FONTS > [CSS3-FONTS]
2009+
2010+ < dd > John Daggett. < a
2011+ href ="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/ "> < cite > CSS Fonts
2012+ Module Level 3.</ cite > </ a > 12 February 2013. W3C Working Draft. (Work in
2013+ progress.) URL: < a
2014+ href ="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/ "> http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</ a >
2015+ </ dd >
2016+ <!---->
2017+
19582018 < dt id =CSS3-WRITING-MODES > [CSS3-WRITING-MODES]
19592019
19602020 < dd > Elika J. Etemad; Koji Ishii. < a
@@ -2014,16 +2074,6 @@ <h3 class=no-num id=informative-ref>Informative references</h3>
20142074 </ dd >
20152075 <!---->
20162076
2017- < dt id =CSS3-FONTS > [CSS3-FONTS]
2018-
2019- < dd > John Daggett. < a
2020- href ="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/ "> < cite > CSS Fonts
2021- Module Level 3.</ cite > </ a > 12 February 2013. W3C Working Draft. (Work in
2022- progress.) URL: < a
2023- href ="http://www.w3.org/TR/2013/WD-css3-fonts-20130212/ "> http://www.w3.org/TR/2013/WD-css3-fonts-20130212/</ a >
2024- </ dd >
2025- <!---->
2026-
20272077 < dt id =CSS3COLOR > [CSS3COLOR]
20282078
20292079 < dd > Tantek Çelik; Chris Lilley; L. David Baron. < a
0 commit comments