css-text-decor-3/Overview.html

Thu, 07 Feb 2013 22:55:02 -0800

author
L. David Baron <dbaron@dbaron.org>
date
Thu, 07 Feb 2013 22:55:02 -0800
changeset 7399
45007c88f5c7
parent 7310
13343cf8c42f
child 7548
bdb242da56bb
permissions
-rw-r--r--

[css-text-decor-3] Add "Animatable:" lines to propdef tables, and change the Computed Value: line for the 'text-decoration' shorthand to "see individual properties".

The Animatable lines are as resolved in Tucson face-to-face at
2013-02-04 11:40:47 -0700, and edited by me per discussion starting at
2013-02-05 11:11:38 -0700.

fantasai@6997 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
fantasai@6658 2
fantasai@6658 3 <html lang=en>
fantasai@6997 4 <head profile="http://dublincore.org/documents/2008/08/04/dc-html/ ">
fantasai@6658 5 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
fantasai@7159 6 <title>CSS Text Decoration Module Level 3</title>
fantasai@6658 7
fantasai@6997 8 <link href="http://purl.org/dc/terms/" rel=schema.dcterms>
fantasai@6997 9 <link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
fantasai@6997 10 rel=dcterms.rights>
fantasai@7159 11 <meta content="CSS Text Decoration Module Level 3" name=dcterms.title>
jackalmage@6856 12 <meta content=text name=dcterms.type>
dbaron@7399 13 <meta content=2013-02-08 name=dcterms.issued>
jackalmage@6856 14 <meta content="Elika J. Etemad" name=dcterms.creator>
jackalmage@6856 15 <meta content="Koji Ishii" name=dcterms.creator>
jackalmage@6856 16 <meta content=W3C name=dcterms.publisher>
dbaron@7399 17 <meta content="http://www.w3.org/TR/2013/ED-css-text-decor-3-20130208/"
jackalmage@6856 18 name=dcterms.identifier>
bert@7028 19 <link href="#contents" rel=contents><!--<link rel=index href="#index">-->
bert@7028 20
fantasai@6658 21 <link href="../default.css" rel=stylesheet type="text/css">
fantasai@7155 22 <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
fantasai@6658 23 type="text/css">
fantasai@6658 24
fantasai@6658 25 <body>
fantasai@6658 26 <div class=head> <!--begin-logo-->
fantasai@6658 27 <p><a href="http://www.w3.org/"><img alt=W3C height=48
fantasai@6658 28 src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
fantasai@6658 29
fantasai@6658 30 <h1>CSS Text Decoration Module Level 3</h1>
fantasai@6658 31
dbaron@7399 32 <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 8 February
fantasai@7286 33 2013</h2>
fantasai@6658 34
fantasai@6658 35 <dl>
fantasai@7155 36 <dt>This version:</dt>
fantasai@7155 37 <!--
dbaron@7399 38 <dd><a href="http://www.w3.org/TR/2013/WD-css-text-decor-3-20130208/">http://www.w3.org/TR/2013/WD-css-text-decor-3-20130208/</a></dd>
fantasai@7155 39 -->
fantasai@6658 40
fantasai@6658 41 <dd><a
fantasai@7155 42 href="http://dev.w3.org/csswg/css-text-decor-3/">http://dev.w3.org/csswg/css-text-decor-3/</a>
fantasai@6658 43
fantasai@6658 44 <dt>Latest version:
fantasai@6658 45
fantasai@6658 46 <dd><a
jackalmage@6895 47 href="http://www.w3.org/TR/css-text-decor-3/">http://www.w3.org/TR/css-text-decor-3/</a>
fantasai@6658 48
fantasai@6658 49 <dt>Latest editor's draft:
fantasai@6658 50
fantasai@6658 51 <dd><a
jackalmage@6895 52 href="http://dev.w3.org/csswg/css-text-decor-3/">http://dev.w3.org/csswg/css-text-decor-3/</a>
fantasai@6658 53
fantasai@6658 54 <dt>Previous version:
fantasai@6658 55
fantasai@6658 56 <dd><a
bert@7028 57 href="http://www.w3.org/TR/2012/WD-css-text-decor-3-20121113/">http://www.w3.org/TR/2012/WD-css-text-decor-3-20121113/</a>
fantasai@6658 58
fantasai@6658 59 <dt>Issues List:
fantasai@6658 60
fantasai@6658 61 <dd><a
fantasai@6658 62 href="http://www.w3.org/Style/CSS/Tracker/products/10">http://www.w3.org/Style/CSS/Tracker/products/10</a>
fantasai@6658 63
fantasai@6658 64 <dt>Discussion:
fantasai@6658 65
fantasai@6658 66 <dd><a
fantasai@6658 67 href="http://lists.w3.org/Archives/Public/www-style/">www-style@w3.org</a>
fantasai@7286 68 with subject line “<kbd>[text-decor-3] <var>… message topic
fantasai@6658 69 …</var></kbd>”
fantasai@6658 70
fantasai@6658 71 <dt>Editors:
fantasai@6658 72
fantasai@6658 73 <dd><a href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>
fantasai@6658 74 (Mozilla)
fantasai@6658 75
fantasai@6658 76 <dd><a href="mailto:koji.a.ishii@mail.rakuten.com">Koji Ishii</a>
fantasai@6658 77 (Rakuten, Inc.)
fantasai@6658 78 </dl>
fantasai@6658 79 <!--begin-copyright-->
fantasai@6658 80 <p class=copyright><a
fantasai@6658 81 href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
fantasai@7159 82 rel=license>Copyright</a> © 2013 <a href="http://www.w3.org/"><abbr
fantasai@6658 83 title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
fantasai@6658 84 href="http://www.csail.mit.edu/"><abbr
fantasai@6658 85 title="Massachusetts Institute of Technology">MIT</abbr></a>, <a
fantasai@6658 86 href="http://www.ercim.eu/"><abbr
fantasai@6658 87 title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
fantasai@7286 88 <a href="http://www.keio.ac.jp/">Keio</a>, <a
fantasai@7286 89 href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C <a
fantasai@6658 90 href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
fantasai@6658 91 <a
fantasai@6658 92 href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
fantasai@6658 93 and <a
fantasai@6658 94 href="http://www.w3.org/Consortium/Legal/copyright-documents">document
fantasai@6658 95 use</a> rules apply.</p>
fantasai@6658 96 <!--end-copyright-->
fantasai@6658 97 <hr title="Separator for header">
fantasai@6658 98 </div>
fantasai@6658 99
fantasai@6658 100 <h2 class="no-num no-toc" id=abstract>Abstract</h2>
fantasai@6658 101
fantasai@6658 102 <p>This module contains the features of CSS relating to text decoration,
fantasai@6658 103 such as underlines, text shadows, and emphasis marks. <a
fantasai@6658 104 href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the
fantasai@6658 105 rendering of structured documents (such as HTML and XML) on screen, on
fantasai@6658 106 paper, in speech, etc.
fantasai@6658 107
fantasai@6658 108 <h2 class="no-num no-toc" id=status>Status of this document</h2>
fantasai@6658 109
fantasai@6658 110 <p><em>This section describes the status of this document at the time of
fantasai@6658 111 its publication. Other documents may supersede this document. A list of
fantasai@6658 112 current W3C publications and the latest revision of this technical report
fantasai@6658 113 can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
fantasai@6658 114 index at http://www.w3.org/TR/.</a></em>
fantasai@6658 115
fantasai@6658 116 <p>Publication as a Working Draft does not imply endorsement by the W3C
fantasai@6658 117 Membership. This is a draft document and may be updated, replaced or
fantasai@6658 118 obsoleted by other documents at any time. It is inappropriate to cite this
fantasai@6658 119 document as other than work in progress.
fantasai@6658 120
fantasai@6658 121 <p>This CSS module has been produced as a combined effort of the <a
fantasai@6658 122 href="http://www.w3.org/International/Activity">W3C Internationalization
fantasai@6658 123 Activity</a>, and the <a href="http://www.w3.org/Style/Activity">Style
fantasai@6658 124 Activity</a> and is maintained by the <a
fantasai@6658 125 href="http://www.w3.org/Style/CSS/members">CSS Working Group</a>. It also
fantasai@6658 126 includes contributions made by participants in the <a
fantasai@6658 127 href="http://www.w3.org/Style/XSL/Group/">XSL Working Group</a> (<a
fantasai@6658 128 href="http://cgi.w3.org/MemberAccess/AccessRequest">members only</a>).
fantasai@6658 129
fantasai@6658 130 <p>This document was produced by a group operating under the <a
fantasai@6658 131 href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
fantasai@6658 132 2004 W3C Patent Policy</a>. W3C maintains a <a
fantasai@6658 133 href="http://www.w3.org/2004/01/pp-impl/32061/status"
fantasai@6658 134 rel=disclosure>public list of any patent disclosures</a> made in
fantasai@6658 135 connection with the deliverables of the group; that page also includes
fantasai@6658 136 instructions for disclosing a patent. An individual who has actual
fantasai@6658 137 knowledge of a patent which the individual believes contains <a
fantasai@6658 138 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
fantasai@6658 139 Claim(s)</a> must disclose the information in accordance with <a
fantasai@6658 140 href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
fantasai@6658 141 6 of the W3C Patent Policy</a>.
fantasai@6658 142
fantasai@6658 143 <p><strong>Feedback on this draft should be posted to the (<a
fantasai@6658 144 href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
fantasai@6658 145 mailing list <a
fantasai@6658 146 href="mailto:www-style@w3.org">www-style@w3.org</a></strong> (see <a
fantasai@6658 147 href="http://www.w3.org/Mail/Request">instructions</a>) <strong>with
fantasai@7286 148 <kbd>[text-decor-3]</kbd> in the subject line.</strong> You are strongly
jackalmage@6895 149 encouraged to complain if you see something stupid in this draft. The
jackalmage@6895 150 editors will do their best to respond to all feedback.
fantasai@6658 151
fantasai@6658 152 <p>The following features are at risk and may be cut from the spec during
fantasai@6658 153 its CR period if there are no (correct) implementations:
fantasai@6658 154
fantasai@6658 155 <ul>
fantasai@6658 156 <li>the ‘<a href="#text-decoration-skip"><code
fantasai@6658 157 class=property>text-decoration-skip</code></a>’ property / ‘<code
fantasai@6658 158 class=css>ink</code>’ value
fantasai@7154 159
fantasai@7154 160 <li>the <a href="#line-position">line positioning rules</a>
fantasai@6658 161 </ul>
fantasai@6658 162
fantasai@7154 163 <p>This is a <strong>Last Call Working Draft</strong>. The deadline for
fantasai@7154 164 comments is <strong>31 January 2013</strong>.
fantasai@7015 165
kojiishi@6720 166 <h2 class="no-num no-toc" id=contents> Table of Contents</h2>
kojiishi@6720 167 <!--begin-toc-->
kojiishi@6720 168
kojiishi@6720 169 <ul class=toc>
kojiishi@6720 170 <li><a href="#intro"><span class=secno>1. </span> Introduction</a>
kojiishi@6720 171 <ul class=toc>
kojiishi@6720 172 <li><a href="#placement"><span class=secno>1.1. </span> Module
kojiishi@6720 173 Interactions</a>
kojiishi@6720 174
kojiishi@6720 175 <li><a href="#values"><span class=secno>1.2. </span> Values</a>
kojiishi@6720 176
kojiishi@6720 177 <li><a href="#terms"><span class=secno>1.3. </span>Terminology</a>
kojiishi@6720 178 </ul>
kojiishi@6720 179
kojiishi@6720 180 <li><a href="#line-decoration"><span class=secno>2. </span> Line
kojiishi@6720 181 Decoration: Underline, Overline, and Strike-Through</a>
kojiishi@6720 182 <ul class=toc>
kojiishi@6720 183 <li><a href="#text-decoration-line-property"><span class=secno>2.1.
kojiishi@6720 184 </span> Text Decoration Lines: the ‘<code
kojiishi@6720 185 class=property>text-decoration-line</code>’ property</a>
kojiishi@6720 186
kojiishi@6720 187 <li><a href="#text-decoration-color-property"><span class=secno>2.2.
kojiishi@6720 188 </span> Text Decoration Color: the ‘<code
kojiishi@6720 189 class=property>text-decoration-color</code>’ property</a>
kojiishi@6720 190
kojiishi@6720 191 <li><a href="#text-decoration-style-property"><span class=secno>2.3.
kojiishi@6720 192 </span> Text Decoration Style: the ‘<code
kojiishi@6720 193 class=property>text-decoration-style</code>’ property</a>
kojiishi@6720 194
kojiishi@6720 195 <li><a href="#text-decoration-property"><span class=secno>2.4. </span>
kojiishi@6720 196 Text Decoration Shorthand: the ‘<code
kojiishi@6720 197 class=property>text-decoration</code>’ property</a>
kojiishi@6720 198
kojiishi@6720 199 <li><a href="#text-decoration-skip-property"><span class=secno>2.5.
kojiishi@6720 200 </span> Text Decoration Line Continuity: the ‘<code
kojiishi@6720 201 class=property>text-decoration-skip</code>’ property</a>
kojiishi@6720 202
jackalmage@6863 203 <li><a href="#text-underline-position-property"><span class=secno>2.6.
jackalmage@6863 204 </span> Text Underline Position: the ‘<code
jackalmage@6863 205 class=property>text-underline-position</code>’ property</a>
fantasai@6996 206
fantasai@6996 207 <li><a href="#line-position"><span class=secno>2.7. </span> Determining
fantasai@6996 208 the Position and Thickness of Line Decorations</a>
kojiishi@6720 209 </ul>
kojiishi@6720 210
jackalmage@6863 211 <li><a href="#emphasis-marks"><span class=secno>3. </span> Emphasis
jackalmage@6863 212 Marks</a>
kojiishi@6720 213 <ul class=toc>
jackalmage@6863 214 <li><a href="#text-emphasis-style-property"><span class=secno>3.1.
jackalmage@6863 215 </span> Emphasis Mark Style: the ‘<code
jackalmage@6863 216 class=property>text-emphasis-style</code>’ property</a>
jackalmage@6863 217
jackalmage@6863 218 <li><a href="#text-emphasis-color-property"><span class=secno>3.2.
jackalmage@6863 219 </span> Emphasis Mark Color: the ‘<code
jackalmage@6863 220 class=property>text-emphasis-color</code>’ property</a>
jackalmage@6863 221
jackalmage@6863 222 <li><a href="#text-emphasis-property"><span class=secno>3.3. </span>
jackalmage@6863 223 Emphasis Mark Shorthand: the ‘<code
jackalmage@6863 224 class=property>text-emphasis</code>’ property</a>
jackalmage@6863 225
jackalmage@6863 226 <li><a href="#text-emphasis-position-property"><span class=secno>3.4.
jackalmage@6863 227 </span> Emphasis Mark Position: the ‘<code
jackalmage@6863 228 class=property>text-emphasis-position</code>’ property</a>
jackalmage@6863 229 </ul>
jackalmage@6863 230
jackalmage@6863 231 <li><a href="#text-shadow-property"><span class=secno>4. </span> Text
jackalmage@6863 232 Shadows: the ‘<code class=property>text-shadow</code>’ property</a>
jackalmage@6863 233
jackalmage@6863 234 <li><a href="#conformance"><span class=secno>5. </span> Conformance</a>
jackalmage@6863 235 <ul class=toc>
jackalmage@6863 236 <li><a href="#conventions"><span class=secno>5.1. </span> Document
kojiishi@6720 237 Conventions</a>
kojiishi@6720 238
jackalmage@6863 239 <li><a href="#conformance-classes"><span class=secno>5.2. </span>
kojiishi@6720 240 Conformance Classes</a>
kojiishi@6720 241
jackalmage@6863 242 <li><a href="#partial"><span class=secno>5.3. </span> Partial
kojiishi@6720 243 Implementations</a>
kojiishi@6720 244
jackalmage@6863 245 <li><a href="#experimental"><span class=secno>5.4. </span> Experimental
kojiishi@6720 246 Implementations</a>
kojiishi@6720 247
jackalmage@6863 248 <li><a href="#testing"><span class=secno>5.5. </span>Non-Experimental
kojiishi@6720 249 Implementations</a>
kojiishi@6720 250
jackalmage@6863 251 <li><a href="#cr-exit-criteria"><span class=secno>5.6. </span> CR Exit
kojiishi@6720 252 Criteria</a>
kojiishi@6720 253 </ul>
kojiishi@6720 254
kojiishi@6720 255 <li class=no-num><a href="#acknowledgements"> Appendix A:
kojiishi@6720 256 Acknowledgements</a>
kojiishi@6720 257
kojiishi@6720 258 <li class=no-num><a href="#appendix-b-references">Appendix B:
kojiishi@6720 259 References</a>
kojiishi@6720 260 <ul class=toc>
kojiishi@6720 261 <li class=no-num><a href="#normative-ref">Normative references</a>
kojiishi@6720 262
kojiishi@6720 263 <li class=no-num><a href="#informative-ref">Informative references</a>
kojiishi@6720 264 </ul>
kojiishi@6720 265
kojiishi@6720 266 <li class=no-num><a href="#changes">Appendix C: Changes</a>
fantasai@7011 267 <ul class=toc>
fantasai@7011 268 <li class=no-num><a href="#recent-changes"> Changes since the May 2012
fantasai@7011 269 CSS Writing Modes Module Level 3 <abbr
fantasai@7011 270 title="Working Draft">WD</abbr></a>
fantasai@7011 271 </ul>
jackalmage@6858 272
jackalmage@6858 273 <li class=no-num><a href="#default-stylesheet"> Appendix D: Default UA
jackalmage@6858 274 Stylesheet</a>
kojiishi@6720 275 </ul>
kojiishi@6720 276 <!--end-toc-->
kojiishi@6720 277
fantasai@6658 278 <h2 id=intro><span class=secno>1. </span> Introduction</h2>
fantasai@6658 279
fantasai@7154 280 <p><em>This subsection is non-normative.</em>
fantasai@7153 281
fantasai@7153 282 <p>This module covers text decoration, i.e. decorating the glyphs of the
fantasai@7153 283 text once typeset according to font and typographic rules. (See <a
fantasai@7153 284 href="#CSS3TEXT" rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> and <a
fantasai@7153 285 href="#CSS3-FONTS" rel=biblioentry>[CSS3-FONTS]<!--{{CSS3-FONTS}}--></a>.)
fantasai@7153 286 Such features are traditionally used not only for purely decorative
fantasai@7153 287 purposes, but also in some cases to show emphasis, for honorifics, and to
fantasai@7153 288 indicate editorial changes such as insertions, deletions, and
fantasai@7153 289 misspellings.
fantasai@7153 290
fantasai@7153 291 <p>CSS Levels 1 and 2 only defined very basic <a
fantasai@7153 292 href="#line-decoration">line decorations</a> (underlines, overlines, and
fantasai@7153 293 strike-throughs) appropriate to Western typographical traditions. Level 3
fantasai@7153 294 of this module adds the ability to change the color, style, position, and
fantasai@7153 295 continuity of these decorations, and also introduces <a
fantasai@7153 296 href="#emphasis-marks">emphasis marks</a> (traditionally used in East
fantasai@7153 297 Asian typography), and <a href="#text-shadow-property">shadows</a> (which
fantasai@7153 298 were proposed then deferred from Level 2).
fantasai@6658 299
fantasai@6658 300 <h3 id=placement><span class=secno>1.1. </span> Module Interactions</h3>
fantasai@6658 301
fantasai@6993 302 <p>This module replaces and extends the text-decorating features defined in
fantasai@6993 303 <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> chapter 16.
fantasai@6658 304
fantasai@6658 305 <h3 id=values><span class=secno>1.2. </span> Values</h3>
fantasai@6658 306
fantasai@6658 307 <p>This specification follows the <a
fantasai@6658 308 href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
fantasai@6658 309 definition conventions</a> from <a href="#CSS21"
fantasai@6658 310 rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Value types not defined in
fantasai@6658 311 this specification are defined in CSS Level 2 Revision 1 <a
fantasai@6658 312 href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Other CSS
fantasai@6658 313 modules may expand the definitions of these value types: for example <a
fantasai@6658 314 href="#CSS3COLOR" rel=biblioentry>[CSS3COLOR]<!--{{CSS3COLOR}}--></a>,
fantasai@6658 315 when combined with this module, expands the definition of the
fantasai@6658 316 &lt;color&gt; value type as used in this specification.
fantasai@6658 317
fantasai@6658 318 <p>In addition to the property-specific values listed in their definitions,
fantasai@6658 319 all properties defined in this specification also accept the <a
fantasai@6658 320 href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
fantasai@6658 321 keyword as their property value. For readability it has not been repeated
fantasai@6658 322 explicitly.
fantasai@6658 323
fantasai@6658 324 <h3 id=terms><span class=secno>1.3. </span>Terminology</h3>
fantasai@6658 325
fantasai@6658 326 <p>The terms <a
fantasai@6658 327 href="http://www.w3.org/TR/css3-text/#grapheme-cluster"><dfn
fantasai@6658 328 id=character>character</dfn></a>, <a
fantasai@6658 329 href="http://www.w3.org/TR/css3-text/#letter"><dfn
fantasai@6658 330 id=letter>letter</dfn></a>, and <a
fantasai@6658 331 href="http://www.w3.org/TR/css3-text/#content-language"><dfn
fantasai@6658 332 id=content-language>content language</dfn></a> as used in this
fantasai@6658 333 specification are defined in <a href="#CSS3TEXT"
fantasai@6658 334 rel=biblioentry>[CSS3TEXT]<!--{{!CSS3TEXT}}--></a>. Other terminology and
fantasai@6658 335 concepts used in this specification are defined in <a href="#CSS21"
fantasai@6658 336 rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> and <a
fantasai@6658 337 href="#CSS3-WRITING-MODES"
fantasai@6658 338 rel=biblioentry>[CSS3-WRITING-MODES]<!--{{!CSS3-WRITING-MODES}}--></a>.
fantasai@6658 339
fantasai@6658 340 <h2 id=line-decoration><span class=secno>2. </span> Line Decoration:
fantasai@6658 341 Underline, Overline, and Strike-Through</h2>
fantasai@6658 342
jackalmage@6861 343 <p> The following properties describe line decorations that are added to
jackalmage@6861 344 the content of an element. When specified on or propagated to an inline
jackalmage@6861 345 box, that box becomes a <dfn id=decorating-box>decorating box</dfn> for
jackalmage@6861 346 that decoration, applying the decoration to all its fragments. The
jackalmage@6861 347 decoration is then further propagated to any in-flow block-level boxes
jackalmage@6861 348 that split the inline (see <a
fantasai@6658 349 href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">CSS2.1
jackalmage@6861 350 section 9.2.1.1</a>). When specified on or propagated to a block container
jackalmage@6861 351 that establishes an inline formatting context, the decorations are
jackalmage@6861 352 propagated to an anonymous inline box that wraps all the in-flow
jackalmage@6861 353 inline-level children of the block container. When specified on or
jackalmage@6861 354 propagated to a ruby box, the decorations are propagated only to the ruby
jackalmage@6861 355 base. For all other box types, the decorations are propagated to all
fantasai@6658 356 in-flow children.
fantasai@6658 357
jackalmage@6861 358 <p class=note> Note that text decorations are not propagated to any
fantasai@6658 359 out-of-flow descendants, nor to the contents of atomic inline-level
jackalmage@6861 360 descendants such as inline blocks and inline tables. They are also not
jackalmage@6861 361 propagated to inline children of inline boxes, although the decoration is
jackalmage@6861 362 <em>applied</em> to such boxes.
fantasai@6658 363
jackalmage@6860 364 <p> By default underlines, overlines, and line-throughs are applied only to
jackalmage@6860 365 non-replaced inline boxes, and are drawn over all text (including white
jackalmage@6861 366 space, letter spacing, and word spacing). Atomic inlines, such as images,
jackalmage@6861 367 are not decorated. The ‘<a href="#text-decoration-skip"><code
fantasai@6658 368 class=property>text-decoration-skip</code></a>’ property can be used to
jackalmage@6861 369 modify this behavior, for example allowing atomic inlines to be underlined
jackalmage@6861 370 or requiring that white space be skipped. Margins, borders, and padding of
jackalmage@6861 371 the <a href="#decorating-box"><i>decorating box</i></a> are always
jackalmage@6861 372 skipped.
fantasai@6658 373
jackalmage@6861 374 <p>Relatively positioning a descendant moves all text decorations applied
jackalmage@6861 375 to it along with the descendant's text; it does not affect calculation of
jackalmage@6861 376 the decoration's initial position on that line. The ‘<code
jackalmage@6856 377 class=property>visibility</code>’ property, ‘<a
jackalmage@6856 378 href="#text-shadow"><code class=property>text-shadow</code></a>’,
jackalmage@6856 379 filters, and other graphical transformations likewise affect text
jackalmage@6856 380 decorations as part of the text they're drawn on, even if the decorations
jackalmage@6861 381 were specified on an ancestor box.
fantasai@6658 382
fantasai@6658 383 <div class=example>
fantasai@6658 384 <p>In the following style sheet and document fragment:
fantasai@6658 385
jackalmage@6861 386 <pre>
fantasai@6658 387 <!-- --> blockquote { text-decoration: underline; color: blue; }
fantasai@6658 388 <!-- --> em { display: block; }
jackalmage@6861 389 <!-- --> cite { color: fuchsia; }</pre>
fantasai@6658 390
jackalmage@6861 391 <pre>
fantasai@6658 392 <!-- --> &lt;blockquote&gt;
fantasai@6658 393 <!-- --> &lt;p&gt;
fantasai@6658 394 <!-- --> &lt;span&gt;
fantasai@6658 395 <!-- --> Help, help!
fantasai@6658 396 <!-- --> &lt;em&gt; I am under a hat! &lt;/em&gt;
fantasai@6658 397 <!-- -->
fantasai@6658 398 <!-- --> &lt;cite&gt; —GwieF &lt;/cite&gt;
fantasai@6658 399 <!-- --> &lt;/span&gt;
fantasai@6658 400 <!-- --> &lt;/p&gt;
jackalmage@6861 401 <!-- --> &lt;/blockquote&gt;</pre>
fantasai@6658 402
fantasai@6658 403 <p>...the underlining for the blockquote element is propagated to an
jackalmage@6861 404 anonymous inline box that surrounds the span element, causing the text
jackalmage@6861 405 "Help, help!" to be blue, with the blue underlining from the anonymous
jackalmage@6861 406 inline underneath it, the color being taken from the blockquote element.
jackalmage@6861 407 The <code>&lt;em&gt;text&lt;/em&gt;</code> in the em block is also
jackalmage@6861 408 underlined, as it is in an in-flow block to which the underline is
fantasai@6658 409 propagated. The final line of text is fuchsia, but the underline
fantasai@6658 410 underneath it is still the blue underline from the anonymous inline
fantasai@6658 411 element.
fantasai@6658 412
fantasai@6658 413 <p><img alt="Sample rendering of the above underline example"
fantasai@6658 414 src=underline-example.png>
fantasai@6658 415
fantasai@6658 416 <p>This diagram shows the boxes involved in the example above. The rounded
fantasai@6658 417 aqua line represents the anonymous inline element wrapping the inline
fantasai@6658 418 contents of the paragraph element, the rounded blue line represents the
fantasai@6658 419 span element, and the orange lines represent the blocks.
fantasai@6658 420 </div>
fantasai@6658 421
fantasai@6658 422 <h3 id=text-decoration-line-property><span class=secno>2.1. </span> Text
fantasai@6658 423 Decoration Lines: the ‘<a href="#text-decoration-line"><code
fantasai@6658 424 class=property>text-decoration-line</code></a>’ property</h3>
fantasai@6658 425
fantasai@6658 426 <table class=propdef>
fantasai@6658 427 <tbody>
fantasai@6658 428 <tr>
fantasai@6658 429 <th>Name:
fantasai@6658 430
fantasai@6658 431 <td><dfn id=text-decoration-line>text-decoration-line</dfn>
fantasai@6658 432
fantasai@6658 433 <tr>
fantasai@6658 434 <th><a href="#values">Value</a>:
fantasai@6658 435
jackalmage@6858 436 <td>none | [ underline || overline || line-through || blink ]
fantasai@6658 437
fantasai@6658 438 <tr>
fantasai@6658 439 <th>Initial:
fantasai@6658 440
fantasai@6658 441 <td>none
fantasai@6658 442
fantasai@6658 443 <tr>
fantasai@6658 444 <th>Applies to:
fantasai@6658 445
fantasai@6658 446 <td>all elements
fantasai@6658 447
fantasai@6658 448 <tr>
fantasai@6658 449 <th>Inherited:
fantasai@6658 450
fantasai@6658 451 <td>no (but see prose)
fantasai@6658 452
fantasai@6658 453 <tr>
fantasai@6658 454 <th>Percentages:
fantasai@6658 455
fantasai@6658 456 <td>N/A
fantasai@6658 457
fantasai@6658 458 <tr>
fantasai@6658 459 <th>Media:
fantasai@6658 460
fantasai@6658 461 <td>visual
fantasai@6658 462
fantasai@6658 463 <tr>
fantasai@6658 464 <th>Computed value:
fantasai@6658 465
fantasai@6658 466 <td>as specified
dbaron@7399 467
dbaron@7399 468 <tr>
dbaron@7399 469 <th>Animatable:
dbaron@7399 470
dbaron@7399 471 <td>no
fantasai@6658 472 </table>
fantasai@6658 473
fantasai@6658 474 <p>Specifies what line decorations, if any, are added to the element.
fantasai@6658 475 Values have the following meanings:
fantasai@6658 476
fantasai@6658 477 <dl>
fantasai@6658 478 <dt><dfn id=none title="text-decoration-line:none">‘<code
fantasai@6658 479 class=css>none</code>’</dfn>
fantasai@6658 480
fantasai@6658 481 <dd>Neither produces nor inhibits text decoration.
fantasai@6658 482
fantasai@6658 483 <dt><dfn id=underline>‘<code class=css>underline</code>’</dfn>
fantasai@6658 484
fantasai@6658 485 <dd>Each line of text is underlined.
fantasai@6658 486
fantasai@6658 487 <dt><dfn id=overline>‘<code class=css>overline</code>’</dfn>
fantasai@6658 488
fantasai@6993 489 <dd>Each line of text has a line over it (i.e. on the opposite side from
fantasai@6658 490 an underline).
fantasai@6658 491
fantasai@6658 492 <dt><dfn id=line-through>‘<code class=css>line-through</code>’</dfn>
fantasai@6658 493
fantasai@6658 494 <dd>Each line of text has a line through the middle.
jackalmage@6858 495
jackalmage@6858 496 <dt><dfn id=blink>‘<code class=css>blink</code>’</dfn>
jackalmage@6858 497
jackalmage@6858 498 <dd> The text blinks (alternates between visible and invisible).
jackalmage@6858 499 Conforming user agents may simply not blink the text. Note that not
jackalmage@6858 500 blinking the text is one technique to satisfy <a
jackalmage@6858 501 href="http://www.w3.org/TR/UAAG/guidelines.html#tech-on-off-blinking-text">checkpoint
jackalmage@6858 502 3.3 of WAI-UAAG</a>. This value is <strong>deprecated</strong> in favor
jackalmage@6858 503 of Animations <a href="#CSS3-ANIMATIONS"
jackalmage@6858 504 rel=biblioentry>[CSS3-ANIMATIONS]<!--{{CSS3-ANIMATIONS}}--></a>.
fantasai@6658 505 </dl>
fantasai@6658 506
fantasai@6658 507 <h3 id=text-decoration-color-property><span class=secno>2.2. </span> Text
fantasai@6658 508 Decoration Color: the ‘<a href="#text-decoration-color"><code
fantasai@6658 509 class=property>text-decoration-color</code></a>’ property</h3>
fantasai@6658 510
fantasai@6658 511 <table class=propdef>
fantasai@6658 512 <tbody>
fantasai@6658 513 <tr>
fantasai@6658 514 <th>Name:
fantasai@6658 515
fantasai@6658 516 <td><dfn id=text-decoration-color>text-decoration-color</dfn>
fantasai@6658 517
fantasai@6658 518 <tr>
fantasai@6658 519 <th><a href="#values">Value</a>:
fantasai@6658 520
fantasai@6658 521 <td><a href="http://www.w3.org/TR/css3-color/#color0"><span
fantasai@6658 522 class=value-inst-color>&lt;color&gt;</span></a>
fantasai@6658 523
fantasai@6658 524 <tr>
fantasai@6658 525 <th>Initial:
fantasai@6658 526
fantasai@6658 527 <td><a
fantasai@6658 528 href="http://www.w3.org/TR/css3-color/#currentcolor">currentColor</a>
fantasai@6658 529
fantasai@6658 530 <tr>
fantasai@6658 531 <th>Applies to:
fantasai@6658 532
fantasai@6658 533 <td>all elements
fantasai@6658 534
fantasai@6658 535 <tr>
fantasai@6658 536 <th>Inherited:
fantasai@6658 537
fantasai@6658 538 <td>no
fantasai@6658 539
fantasai@6658 540 <tr>
fantasai@6658 541 <th>Percentages:
fantasai@6658 542
fantasai@6658 543 <td>N/A
fantasai@6658 544
fantasai@6658 545 <tr>
fantasai@6658 546 <th>Media:
fantasai@6658 547
fantasai@6658 548 <td>visual
fantasai@6658 549
fantasai@6658 550 <tr>
fantasai@6658 551 <th>Computed value:
fantasai@6658 552
fantasai@6658 553 <td>the computed color
dbaron@7399 554
dbaron@7399 555 <tr>
dbaron@7399 556 <th>Animatable:
dbaron@7399 557
dbaron@7399 558 <td>as <a
dbaron@7399 559 href="http://dev.w3.org/csswg/css3-transitions/#animtype-color">color</a>
fantasai@6658 560 </table>
fantasai@6658 561
fantasai@6658 562 <p>This property specifies the color of text decoration (underlines
fantasai@6658 563 overlines, and line-throughs) set on the element with ‘<a
fantasai@6658 564 href="#text-decoration-line"><code
fantasai@6658 565 class=property>text-decoration-line</code></a>’.
fantasai@6658 566
jackalmage@6862 567 <p> The color of text decorations must remain the same on all decorations
jackalmage@6862 568 originating from a given element, even if descendant boxes have different
jackalmage@6862 569 specified colors.
jackalmage@6862 570
fantasai@6658 571 <h3 id=text-decoration-style-property><span class=secno>2.3. </span> Text
fantasai@6658 572 Decoration Style: the ‘<a href="#text-decoration-style"><code
fantasai@6658 573 class=property>text-decoration-style</code></a>’ property</h3>
fantasai@6658 574
fantasai@6658 575 <table class=propdef>
fantasai@6658 576 <tbody>
fantasai@6658 577 <tr>
fantasai@6658 578 <th>Name:
fantasai@6658 579
fantasai@6658 580 <td><dfn id=text-decoration-style>text-decoration-style</dfn>
fantasai@6658 581
fantasai@6658 582 <tr>
fantasai@6658 583 <th><a href="#values">Value</a>:
fantasai@6658 584
fantasai@6658 585 <td>solid | double | dotted | dashed | wavy
fantasai@6658 586
fantasai@6658 587 <tr>
fantasai@6658 588 <th>Initial:
fantasai@6658 589
fantasai@6658 590 <td>solid
fantasai@6658 591
fantasai@6658 592 <tr>
fantasai@6658 593 <th>Applies to:
fantasai@6658 594
fantasai@6658 595 <td>all elements
fantasai@6658 596
fantasai@6658 597 <tr>
fantasai@6658 598 <th>Inherited:
fantasai@6658 599
fantasai@6658 600 <td>no
fantasai@6658 601
fantasai@6658 602 <tr>
fantasai@6658 603 <th>Percentages:
fantasai@6658 604
fantasai@6658 605 <td>N/A
fantasai@6658 606
fantasai@6658 607 <tr>
fantasai@6658 608 <th>Media:
fantasai@6658 609
fantasai@6658 610 <td>visual
fantasai@6658 611
fantasai@6658 612 <tr>
fantasai@6658 613 <th>Computed value:
fantasai@6658 614
fantasai@6658 615 <td>as specified
dbaron@7399 616
dbaron@7399 617 <tr>
dbaron@7399 618 <th>Animatable:
dbaron@7399 619
dbaron@7399 620 <td>no
fantasai@6658 621 </table>
fantasai@6658 622
fantasai@6658 623 <p>This property specifies the style of the line(s) drawn for text
fantasai@6658 624 decoration specified on the element. Values have the same meaning as for
fantasai@6658 625 the <a
fantasai@6658 626 href="http://www.w3.org/TR/css3-background/#the-border-style">border-style
fantasai@6658 627 properties</a> <a href="#CSS3BG"
fantasai@6658 628 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>. ‘<code
fantasai@6658 629 class=css>wavy</code>’ indicates a wavy line.
fantasai@6658 630
jackalmage@6862 631 <p> The style of text decorations must remain the same on all decorations
jackalmage@6862 632 originating from a given element, even if descendant boxes have different
jackalmage@6862 633 specified styles.
jackalmage@6862 634
fantasai@6658 635 <h3 id=text-decoration-property><span class=secno>2.4. </span> Text
fantasai@6658 636 Decoration Shorthand: the ‘<a href="#text-decoration"><code
fantasai@6658 637 class=property>text-decoration</code></a>’ property</h3>
fantasai@6658 638
fantasai@6658 639 <table class=propdef>
fantasai@6658 640 <tbody>
fantasai@6658 641 <tr>
fantasai@6658 642 <th>Name:
fantasai@6658 643
fantasai@6658 644 <td><dfn id=text-decoration>text-decoration</dfn>
fantasai@6658 645
fantasai@6658 646 <tr>
fantasai@6658 647 <th><a href="#values">Value</a>:
fantasai@6658 648
fantasai@6658 649 <td><var><a
fantasai@6658 650 href="#text-decoration-line">&lt;text-decoration-line&gt;</a></var> ||
fantasai@6658 651 <var><a
fantasai@6658 652 href="#text-decoration-style">&lt;text-decoration-style&gt;</a></var>
fantasai@6658 653 || <var><a
fantasai@6658 654 href="#text-decoration-color">&lt;text-decoration-color&gt;</a></var>
fantasai@6658 655
fantasai@6658 656 <tr>
fantasai@6658 657 <th>Initial:
fantasai@6658 658
fantasai@6658 659 <td>none
fantasai@6658 660
fantasai@6658 661 <tr>
fantasai@6658 662 <th>Applies to:
fantasai@6658 663
fantasai@6658 664 <td>all elements
fantasai@6658 665
fantasai@6658 666 <tr>
fantasai@6658 667 <th>Inherited:
fantasai@6658 668
fantasai@6658 669 <td>no
fantasai@6658 670
fantasai@6658 671 <tr>
fantasai@6658 672 <th>Percentages:
fantasai@6658 673
fantasai@6658 674 <td>N/A
fantasai@6658 675
fantasai@6658 676 <tr>
fantasai@6658 677 <th>Media:
fantasai@6658 678
fantasai@6658 679 <td>visual
fantasai@6658 680
fantasai@6658 681 <tr>
fantasai@6658 682 <th>Computed value:
fantasai@6658 683
dbaron@7399 684 <td>see individual properties
dbaron@7399 685
dbaron@7399 686 <tr>
dbaron@7399 687 <th>Animatable:
dbaron@7399 688
dbaron@7399 689 <td>see individual properties
fantasai@6658 690 </table>
fantasai@6658 691
fantasai@6658 692 <p>This property is a shorthand for setting ‘<a
fantasai@6658 693 href="#text-decoration-line"><code
fantasai@6658 694 class=property>text-decoration-line</code></a>’, ‘<a
fantasai@6658 695 href="#text-decoration-color"><code
fantasai@6658 696 class=property>text-decoration-color</code></a>’, and ‘<a
fantasai@6658 697 href="#text-decoration-style"><code
fantasai@6658 698 class=property>text-decoration-style</code></a>’ in one declaration.
fantasai@6658 699 Omitted values are set to their initial values. A ‘<a
fantasai@6658 700 href="#text-decoration"><code class=property>text-decoration</code></a>’
fantasai@6658 701 declaration that omits both the ‘<a href="#text-decoration-color"><code
fantasai@6658 702 class=property>text-decoration-color</code></a>’ and ‘<a
fantasai@6658 703 href="#text-decoration-style"><code
fantasai@6658 704 class=property>text-decoration-style</code></a>’ values is
fantasai@6658 705 backwards-compatible with CSS Levels 1 and 2.
fantasai@6658 706
fantasai@6658 707 <div class=example>
fantasai@6658 708 <p>The following example underlines unvisited links with a solid blue
fantasai@6658 709 underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs.
fantasai@6658 710
fantasai@6658 711 <pre><code class=css>
fantasai@6658 712 <!-- -->:link {
fantasai@6658 713 <!-- --> color: blue;
fantasai@6658 714 <!-- --> text-decoration: underline;
fantasai@6658 715 <!-- --> text-decoration: navy dotted underline; /* <a
fantasai@6658 716 href="http://www.w3.org/TR/CSS21/syndata.html#ignore">Ignored</a> in CSS1/CSS2 UAs */
fantasai@6658 717 <!-- -->}</code></pre>
fantasai@6658 718 </div>
fantasai@6658 719
fantasai@6658 720 <h3 id=text-decoration-skip-property><span class=secno>2.5. </span> Text
fantasai@6658 721 Decoration Line Continuity: the ‘<a href="#text-decoration-skip"><code
fantasai@6658 722 class=property>text-decoration-skip</code></a>’ property</h3>
fantasai@6658 723
fantasai@6658 724 <table class=propdef>
fantasai@6658 725 <tbody>
fantasai@6658 726 <tr>
fantasai@6658 727 <th>Name:
fantasai@6658 728
fantasai@6658 729 <td><dfn id=text-decoration-skip>text-decoration-skip</dfn>
fantasai@6658 730
fantasai@6658 731 <tr>
fantasai@6658 732 <th><a href="#values">Value</a>:
fantasai@6658 733
jackalmage@6860 734 <td>none | [ objects || spaces || ink || edges || box-decoration ]
fantasai@6658 735
fantasai@6658 736 <tr>
fantasai@6658 737 <th>Initial:
fantasai@6658 738
fantasai@6658 739 <td>objects
fantasai@6658 740
fantasai@6658 741 <tr>
fantasai@6658 742 <th>Applies to:
fantasai@6658 743
fantasai@6658 744 <td>all elements
fantasai@6658 745
fantasai@6658 746 <tr>
fantasai@6658 747 <th>Inherited:
fantasai@6658 748
fantasai@6658 749 <td>yes
fantasai@6658 750
fantasai@6658 751 <tr>
fantasai@6658 752 <th>Percentages:
fantasai@6658 753
fantasai@6658 754 <td>N/A
fantasai@6658 755
fantasai@6658 756 <tr>
fantasai@6658 757 <th>Media:
fantasai@6658 758
fantasai@6658 759 <td>visual
fantasai@6658 760
fantasai@6658 761 <tr>
fantasai@6658 762 <th>Computed value:
fantasai@6658 763
fantasai@6658 764 <td>as specified
dbaron@7399 765
dbaron@7399 766 <tr>
dbaron@7399 767 <th>Animatable:
dbaron@7399 768
dbaron@7399 769 <td>no
fantasai@6658 770 </table>
fantasai@6658 771
fantasai@6658 772 <p>This property specifies what parts of the element's content any text
fantasai@6658 773 decoration affecting the element must skip over. It controls all text
fantasai@6658 774 decoration lines drawn by the element and also any text decoration lines
fantasai@6658 775 drawn by its ancestors. Values have the following meanings:
fantasai@6658 776
fantasai@6658 777 <dl>
fantasai@6658 778 <dt><dfn id=none0 title="text-decoration-skip:none">‘<code
fantasai@6658 779 class=css>none</code>’</dfn>
fantasai@6658 780
fantasai@6658 781 <dd>Skip nothing: text-decoration is drawn for all text content and for
fantasai@6658 782 inline replaced elements.
fantasai@6658 783
fantasai@6658 784 <dt><dfn id=objects title="text-decoration-skip:objects">‘<code
fantasai@6658 785 class=css>objects</code>’</dfn>
fantasai@6658 786
fantasai@6658 787 <dd>Skip this element if it is an atomic inline (such as an image or
fantasai@6658 788 inline-block).
fantasai@6658 789
fantasai@6658 790 <dt><dfn id=spaces title="text-decoration-skip:spaces">‘<code
fantasai@6658 791 class=css>spaces</code>’</dfn>
fantasai@6658 792
fantasai@7310 793 <dd>Skip spaces: this includes space (U+0020) and tab (U+0009), as well as
fantasai@7310 794 nbsp (U+00A0), ideographic space (U+3000), all fixed width spaces (such
fantasai@7310 795 as U+2000–U+200A, U+202F and U+205F), plus any adjacent letter-spacing
fantasai@7310 796 or word-spacing <a href="#CSS3TEXT"
fantasai@7310 797 rel=biblioentry>[CSS3TEXT]<!--{{!CSS3TEXT}}--></a>.
fantasai@7291 798 <p class=issue>Should this include visible characters like Ethiopic Word
fantasai@7291 799 Space?
fantasai@6658 800
fantasai@6658 801 <dt><dfn id=ink title="text-decoration-skip:ink">‘<code
fantasai@6658 802 class=css>ink</code>’</dfn>
fantasai@6658 803
fantasai@6658 804 <dd>Skip over where glyphs are drawn: interrupt the decoration line to let
fantasai@6658 805 text show through where the text decoration would otherwise cross over a
fantasai@6658 806 glyph. The UA may also skip a small distance to either side of the glyph
fantasai@6658 807 outline.
fantasai@6658 808
fantasai@6658 809 <dt><dfn id=edges title="text-decoration-skip:edges">‘<code
fantasai@6658 810 class=css>edges</code>’</dfn>
fantasai@6658 811
fantasai@6658 812 <dd>The UA should place the start and end of the line inwards from the
jackalmage@6861 813 content edge of the <i>decorating element</i> so that, e.g. two
jackalmage@6861 814 underlined elements side-by-side do not appear to have a single
jackalmage@6861 815 underline. (This is important in Chinese, where underlining is a form of
jackalmage@6861 816 punctuation.)
jackalmage@6860 817
jackalmage@6860 818 <dt><dfn id=box-decoration
jackalmage@6860 819 title="text-decoration-skip:box-decoration">‘<code
jackalmage@6860 820 class=css>box-decoration</code>’</dfn>
jackalmage@6860 821
jackalmage@6860 822 <dd> Skip over the box's margin, border, and padding areas. Note that this
jackalmage@6860 823 only has an effect on decorations imposed by an ancestor.
fantasai@6658 824 </dl>
fantasai@6658 825
fantasai@6658 826 <p class=note>Note that this property inherits and that descendant elements
fantasai@6658 827 can have a different setting.
fantasai@6658 828
jackalmage@6860 829 <p class=note> Note that CSS 2.1 required skipping margins, borders, and
jackalmage@6860 830 padding always. In this level, by default only the margins, borders, and
jackalmage@6860 831 padding of the <i>decorating element</i> are skipped.
jackalmage@6860 832
jackalmage@6863 833 <h3 id=text-underline-position-property><span class=secno>2.6. </span> Text
jackalmage@6863 834 Underline Position: the ‘<a href="#text-underline-position"><code
jackalmage@6863 835 class=property>text-underline-position</code></a>’ property</h3>
fantasai@6658 836
fantasai@6658 837 <table class=propdef>
fantasai@6658 838 <tbody>
fantasai@6658 839 <tr>
fantasai@6658 840 <th>Name:
fantasai@6658 841
fantasai@6658 842 <td><dfn id=text-underline-position>text-underline-position</dfn>
fantasai@6658 843
fantasai@6658 844 <tr>
fantasai@6658 845 <th><a href="#values">Value</a>:
fantasai@6658 846
fantasai@6993 847 <td>auto | alphabetic | [ under || [ left | right ] ]
fantasai@6658 848
fantasai@6658 849 <tr>
fantasai@6658 850 <th>Initial:
fantasai@6658 851
fantasai@6658 852 <td>auto
fantasai@6658 853
fantasai@6658 854 <tr>
fantasai@6658 855 <th>Applies to:
fantasai@6658 856
fantasai@6658 857 <td>all elements
fantasai@6658 858
fantasai@6658 859 <tr>
fantasai@6658 860 <th>Inherited:
fantasai@6658 861
fantasai@6658 862 <td>yes
fantasai@6658 863
fantasai@6658 864 <tr>
fantasai@6658 865 <th>Percentages:
fantasai@6658 866
fantasai@6658 867 <td>N/A
fantasai@6658 868
fantasai@6658 869 <tr>
fantasai@6658 870 <th>Media:
fantasai@6658 871
fantasai@6658 872 <td>visual
fantasai@6658 873
fantasai@6658 874 <tr>
fantasai@6658 875 <th>Computed value:
fantasai@6658 876
fantasai@6658 877 <td>as specified
dbaron@7399 878
dbaron@7399 879 <tr>
dbaron@7399 880 <th>Animatable:
dbaron@7399 881
dbaron@7399 882 <td>no
fantasai@6658 883 </table>
fantasai@6658 884
fantasai@6658 885 <p>This property sets the position of an underline specified on the same
fantasai@6658 886 element: it does not affect underlines specified by ancestor elements.
fantasai@6658 887 Values have the following meanings:
fantasai@6658 888
fantasai@6658 889 <dl>
fantasai@7117 890 <dt><dfn id=underline-auto title="text-underline-position: auto">‘<code
fantasai@7117 891 class=css>auto</code>’</dfn>
fantasai@6658 892
fantasai@6658 893 <dd>The user agent may use any algorithm to determine the underline's
fantasai@6993 894 position; however it must be placed at or under the alphabetic baseline.
fantasai@7117 895 <p class=note>It is suggested that the underline position be ‘<code
fantasai@7117 896 class=css>alphabetic</code>’ unless it crosses either subscripted (or
fantasai@7117 897 otherwise lowered) text, or it affects characters from Asian scripts
fantasai@7117 898 such as Han or Tibetan, for which an alphabetic underline is too high:
fantasai@7117 899 in such cases, aligning to the em box edge as described for ‘<code
fantasai@7117 900 class=css>under left</code>’ is more appropriate.
fantasai@6658 901
fantasai@7117 902 <dt><dfn id=underline-alphabetic
fantasai@7117 903 title="text-underline-position: alphabetic">‘<code
fantasai@7117 904 class=css>alphabetic</code>’</dfn>
fantasai@6658 905
fantasai@6658 906 <dd>The underline is positioned relative to the alphabetic baseline. In
fantasai@6658 907 this case the underline is likely to cross some descenders.
fantasai@6658 908 <div class=figure>
fantasai@6658 909 <p><img
fantasai@6658 910 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'."
fantasai@6658 911 src=underline-position-alphabetic.png
fantasai@6658 912 title="text-underline-position: alphabetic">
fantasai@6658 913
fantasai@7117 914 <p class=caption>‘<a href="#underline-alphabetic"><code
fantasai@7117 915 class=css>text-underline-position: alphabetic</code></a>’
fantasai@6658 916 </div>
fantasai@6658 917
fantasai@7117 918 <dt><dfn id=underline-under
fantasai@7117 919 title="text-underline-position: under">‘<code
fantasai@7117 920 class=css>under</code>’</dfn>
fantasai@6658 921
fantasai@6658 922 <dd>In horizontal writing modes, the underline is positioned relative to
fantasai@6658 923 the under edge of the element's content box. In this case the underline
fantasai@6658 924 usually does not cross the descenders. (This is sometimes called
fantasai@6658 925 "accounting" underline.) If the underline affects descendants with a
fantasai@6658 926 lower content edge, the user agent should shift the underline down
fantasai@6658 927 further to the lowest underlined content box edge. The user agent may
fantasai@6658 928 ignore elements with ‘<code class=css>vertical-align</code>’ values
fantasai@6658 929 given as lengths, percentages, ‘<code class=css>top</code>’, or
fantasai@6658 930 ‘<code class=css>bottom</code>’ when making this adjustment. (Note
fantasai@6658 931 that images that are not affected by the underline per ‘<a
fantasai@6658 932 href="#text-decoration-skip"><code
fantasai@6658 933 class=property>text-decoration-skip</code></a>’ will not affect the
fantasai@6658 934 position of the underline.)
fantasai@6658 935 <div class=figure>
fantasai@6658 936 <p><img
fantasai@6658 937 alt="In a typical Latin font, the underline is far enough below the text that it does not cross the bottom of a 'g'."
fantasai@6993 938 src=underline-position-under.png
fantasai@6993 939 title="text-underline-position: under">
fantasai@6658 940
fantasai@7117 941 <p class=caption>‘<a href="#underline-under"><code
fantasai@7117 942 class=css>text-underline-position: under</code></a>’
fantasai@6658 943 </div>
fantasai@6658 944
fantasai@6658 945 <div class=example>
fantasai@6658 946 <p>Because ‘<a href="#text-underline-position"><code
fantasai@6658 947 class=property>text-underline-position</code></a>’ inherits, and is
fantasai@6658 948 not reset by the ‘<a href="#text-decoration"><code
fantasai@6658 949 class=property>text-decoration</code></a>’ shorthand, the following
fantasai@7117 950 example switches the document to use ‘<code class=css>under</code>’
fantasai@7117 951 underlining, which can be more appropriate for writing systems with
fantasai@7117 952 long, complicated descenders. It is also often useful for mathematical
fantasai@7117 953 or chemical texts that use many subscripts.
fantasai@6658 954
fantasai@6993 955 <pre>:root { text-underline-position: under; }</pre>
fantasai@6658 956 </div>
fantasai@6658 957
fantasai@7117 958 <dt><dfn id=underline-left title="text-underline-position: left">‘<code
fantasai@7117 959 class=css>left</code>’</dfn>
fantasai@6658 960
fantasai@7117 961 <dd>In vertical writing modes, the underline is aligned as for ‘<code
fantasai@7117 962 class=css>under</code>’, except it is always aligned to the left edge
fantasai@7117 963 of the text. If this causes the underline to be drawn on the "over" side
fantasai@7117 964 of the text, then an overline also switches sides and is drawn on the
fantasai@7117 965 "under" side.
fantasai@6658 966
fantasai@7117 967 <dt><dfn id=underline-right
fantasai@7117 968 title="text-underline-position: right">‘<code
fantasai@7117 969 class=css>right</code>’</dfn>
fantasai@6658 970
fantasai@7117 971 <dd>In vertical writing modes, the underline is aligned as for ‘<code
fantasai@7117 972 class=css>under</code>’, except it is always aligned to the right edge
fantasai@7117 973 of the text. If this causes the underline to be drawn on the "over" side
fantasai@7117 974 of the text, then an overline also switches sides and is drawn on the
fantasai@7117 975 "under" side.
fantasai@6658 976 </dl>
fantasai@6658 977
fantasai@7117 978 <p>If ‘<code class=css>under</code>’ is specified alone, ‘<code
fantasai@7117 979 class=css>left</code>’ is also implied. If ‘<code
fantasai@7117 980 class=css>left</code>’ or ‘<code class=css>right</code>’ is
fantasai@7117 981 specified alone, ‘<code class=css>under</code>’ is also implied.
fantasai@6658 982
fantasai@6658 983 <div class=figure id=fig-text-underline-position>
fantasai@6658 984 <table>
fantasai@6658 985 <tbody>
fantasai@6658 986 <tr>
fantasai@6658 987 <td> <img
fantasai@6658 988 alt="In mixed Japanese-Latin vertical text, 'text-underline-position: left' places the underline on the left side of the text."
fantasai@6658 989 src=underline-position-left.png title="text-underline-position: left">
fantasai@6658 990
fantasai@6658 991 <td> <img
fantasai@6658 992 alt="In mixed Japanese-Latin vertical text, 'text-underline-position: right' places the underline on the right side of the text."
fantasai@6658 993 src=underline-position-right.png
fantasai@6658 994 title="text-underline-position: right">
fantasai@6658 995
fantasai@6658 996 <tr>
fantasai@7117 997 <td>‘<code class=css>left</code>’
fantasai@6658 998
fantasai@7117 999 <td>‘<code class=css>right</code>’
fantasai@6658 1000 </table>
fantasai@6658 1001
fantasai@6658 1002 <p class=caption>In vertical writing modes, the ‘<a
fantasai@6658 1003 href="#text-underline-position"><code
fantasai@7117 1004 class=property>text-underline-position</code></a>’ values ‘<code
fantasai@7117 1005 class=css>left</code>’ and ‘<code class=css>right</code>’ allow
fantasai@7117 1006 placing the underline on either side of the text. (In horizontal writing
fantasai@7117 1007 modes, both values are treated as ‘<code class=css>under</code>’.)
fantasai@6658 1008 </div>
fantasai@6658 1009
fantasai@6658 1010 <div class=example>
fantasai@6658 1011 <p>The following example styles modern Chinese, Japanese, and Korean texts
fantasai@6658 1012 with the appropriate underline positions in both horizontal and vertical
fantasai@6658 1013 text:
fantasai@6658 1014
fantasai@6993 1015 <pre>:root:lang(ja), [lang|=ja], :root:lang(ko), [lang|=ko] { text-underline-position: under right; }
fantasai@6993 1016 <!-- -->:root:lang(zh), [lang|=zh] { text-underline-position: under left; }</pre>
fantasai@6658 1017 </div>
fantasai@6658 1018
fantasai@6996 1019 <h3 id=line-position><span class=secno>2.7. </span> Determining the
fantasai@6996 1020 Position and Thickness of Line Decorations</h3>
fantasai@6996 1021
fantasai@6996 1022 <p>In determining the position of text decoration lines, user agents must
fantasai@7012 1023 consider, per line box, the "ideal" positions of all fragments of in-flow
fantasai@7012 1024 inline descendants of the <a href="#decorating-box"><i>decorating
fantasai@7117 1025 box</i></a> on that line as follows (treating <a
fantasai@7117 1026 href="#underline-left"><i>over</i>-positioned underlines</a> as
fantasai@7117 1027 <i>over</i> lines and <a href="#underline-left"><i>under</i>-positioned
fantasai@7117 1028 overlines</a> as <i>under</i> lines):
fantasai@6996 1029
fantasai@6996 1030 <dl>
fantasai@7117 1031 <dt><a
fantasai@7117 1032 href="http://dev.w3.org/csswg/css3-writing-modes/#over"><i>over</i></a>
fantasai@7117 1033 lines
fantasai@6996 1034
fantasai@7012 1035 <dd> Align the line decoration with respect to the highest
fantasai@7117 1036 <!-- <i>text-over</i> baseline of the considered fragments. --> <a
fantasai@7117 1037 href="http://dev.w3.org/csswg/css3-writing-modes/#over"><i>over</i></a>
fantasai@7117 1038 edge of the considered fragments' EM boxes.
fantasai@6996 1039
fantasai@7117 1040 <dt><a href="#underline-alphabetic"><i>alphabetic</i></a> underlines
fantasai@6996 1041
fantasai@7013 1042 <dd> Calculate an average of the ideal underlining offsets (from their
fantasai@7013 1043 respective alphabetic baselines) of the considered fragments, assigning
fantasai@7013 1044 any inline with non-initial ‘<code
fantasai@7013 1045 class=property>vertical-align</code>’ the ideal offset of its parent.
fantasai@7013 1046 Align the line decoration to the lowest alphabetic baseline considered,
fantasai@7013 1047 with that calculated offset. (Alphabetic baselines can differ between
fantasai@7013 1048 ‘<code class=css>baseline</code>’-aligned boxes if the dominant
fantasai@7013 1049 baseline is non-alphabetic.)
fantasai@6996 1050
fantasai@7117 1051 <dt>non-alphabetic <a
fantasai@7117 1052 href="http://dev.w3.org/csswg/css3-writing-modes/#under"><i>under</i></a>
fantasai@7117 1053 lines
fantasai@6996 1054
fantasai@7012 1055 <dd> Position the line decoration with respect to the lowest
fantasai@7117 1056 <!-- <i>text-under</i> baseline of the considered fragments. --> <a
fantasai@7117 1057 href="http://dev.w3.org/csswg/css3-writing-modes/#under"><i>under</i></a>
fantasai@7117 1058 edge of the considered fragments' EM boxes.
fantasai@6996 1059
fantasai@6996 1060 <dt>line-throughs
fantasai@6996 1061
fantasai@7012 1062 <dd> For each set of considered fragments with the same ‘<code
fantasai@6996 1063 class=property>font-size</code>’, compute an ideal position averaged
fantasai@6997 1064 from their direct contents and font metrics, assigning any fragment with
fantasai@7012 1065 non-initial ‘<code class=property>vertical-align</code>’ the ideal
fantasai@6997 1066 position of its parent. Position the portion of the line across each
fantasai@7012 1067 decorated fragment at that fragment's ideal position. (Essentially, this
fantasai@6997 1068 performs the same sort of averaging as for alphabetic underlines, but
fantasai@6997 1069 recomputes the position when drawing across a descendant with a different
fantasai@7154 1070 computed ‘<code class=property>font-size</code>’. This ensures that
fantasai@7154 1071 the text remains effectively "crossed out" despite any font size
fantasai@7154 1072 changes.)
fantasai@6996 1073 </dl>
fantasai@6996 1074
fantasai@6996 1075 <p> CSS does not define the thickness of line decorations. In determining
fantasai@6996 1076 the thickness of text decoration lines, user agents may consider the font
fantasai@6996 1077 sizes, faces, and weights of descendants to provide an appropriately
fantasai@6996 1078 averaged thickness.
fantasai@6996 1079
fantasai@6996 1080 <div class=example>
fantasai@6996 1081 <p>The following figure shows the averaging for underline:
fantasai@6996 1082
fantasai@6996 1083 <p><img
fantasai@6996 1084 alt="In the first rendering of the underlined text '1st a' with 'st' as a superscript, both the '1st' and the 'a' are rendered in a small font. In the second rendering, the 'a' is rendered in a larger font. In the third, both '1st' and 'a' are large."
fantasai@6996 1085 height=105 src=underline-averaging.gif width=326>
fantasai@6996 1086
fantasai@6996 1087 <p>In the three fragments of underlined text, the underline is drawn
fantasai@6996 1088 consecutively lower and thicker as the ratio of large text to small text
fantasai@6996 1089 increases.
fantasai@7154 1090
fantasai@7154 1091 <p>Using the same example, a line-through would in the second fragment,
fantasai@7154 1092 instead of averaging the two font sizes, split the line-through into two
fantasai@7154 1093 segments:
fantasai@7154 1094
fantasai@7154 1095 <p><img alt="" src=linethrough-averaging.gif>
fantasai@7154 1096
fantasai@7154 1097 <p>In both cases, however, the superscript, due to the vertical-alignment
fantasai@7154 1098 shift, has no effect on the position of the line.
fantasai@6996 1099 </div>
fantasai@6996 1100
fantasai@6658 1101 <div class=note>
fantasai@6658 1102 <p>In some cases (such as in OpenType) the font format can offer
fantasai@6658 1103 information about the appropriate position of an underline. Typically
fantasai@7117 1104 this information gives the position of an ‘<code
fantasai@7117 1105 class=css>alphabetic</code>’ underline; in some cases (especially in
fantasai@7117 1106 CJK fonts), it gives the position of a ‘<code class=css>under
fantasai@6658 1107 left</code>’ underline. (In this case, the font's underline metrics
fantasai@6658 1108 typically touch the bottom edge of the em box). The UA is encouraged to
fantasai@6658 1109 use information (such as the underline thickness, or appropriate
fantasai@6658 1110 alphabetic alignment) from the font wherever appropriate.
fantasai@6658 1111 </div>
fantasai@6658 1112
jackalmage@6863 1113 <h2 id=emphasis-marks><span class=secno>3. </span> Emphasis Marks</h2>
fantasai@6658 1114
fantasai@6658 1115 <p>East Asian documents traditionally use small symbols next to each glyph
fantasai@6658 1116 to emphasize a run of text. For example:
fantasai@6658 1117
fantasai@6658 1118 <div class=figure>
fantasai@6993 1119 <p> <img alt="Example of emphasis in Japanese appearing over the text"
fantasai@6658 1120 class=example height=28 src=text-emphasis-ja.gif width=225>
fantasai@6658 1121
fantasai@6658 1122 <p class=caption>Accent emphasis (shown in blue for clarity) applied to
fantasai@6658 1123 Japanese text
fantasai@6658 1124 </div>
fantasai@6658 1125
jackalmage@6863 1126 <h3 id=text-emphasis-style-property><span class=secno>3.1. </span> Emphasis
jackalmage@6863 1127 Mark Style: the ‘<a href="#text-emphasis-style"><code
jackalmage@6863 1128 class=property>text-emphasis-style</code></a>’ property</h3>
fantasai@6658 1129
fantasai@6658 1130 <table class=propdef>
fantasai@6658 1131 <tbody>
fantasai@6658 1132 <tr>
fantasai@6658 1133 <th>Name:
fantasai@6658 1134
fantasai@6658 1135 <td><dfn id=text-emphasis-style>text-emphasis-style</dfn>
fantasai@6658 1136
fantasai@6658 1137 <tr>
fantasai@6658 1138 <th><a href="#values">Value</a>:
fantasai@6658 1139
fantasai@6658 1140 <td>none | [ [ filled | open ] || [ dot | circle | double-circle |
fantasai@6658 1141 triangle | sesame ] ] | <a class=noxref
fantasai@6658 1142 href="http://www.w3.org/TR/CSS21/syndata.html#value-def-string"><span
fantasai@6658 1143 class=value-inst-string>&lt;string&gt;</span></a>
fantasai@6658 1144
fantasai@6658 1145 <tr>
fantasai@6658 1146 <th>Initial:
fantasai@6658 1147
fantasai@6658 1148 <td>none
fantasai@6658 1149
fantasai@6658 1150 <tr>
fantasai@6658 1151 <th>Applies to:
fantasai@6658 1152
fantasai@6658 1153 <td>all elements
fantasai@6658 1154
fantasai@6658 1155 <tr>
fantasai@6658 1156 <th>Inherited:
fantasai@6658 1157
fantasai@6658 1158 <td>yes
fantasai@6658 1159
fantasai@6658 1160 <tr>
fantasai@6658 1161 <th>Percentages:
fantasai@6658 1162
fantasai@6658 1163 <td>N/A
fantasai@6658 1164
fantasai@6658 1165 <tr>
fantasai@6658 1166 <th>Media:
fantasai@6658 1167
fantasai@6658 1168 <td>visual
fantasai@6658 1169
fantasai@6658 1170 <tr>
fantasai@6658 1171 <th>Computed value:
fantasai@6658 1172
fantasai@6658 1173 <td>‘<code class=property>none</code>’, a pair of keywords
fantasai@6658 1174 representing the shape and fill, or a string
dbaron@7399 1175
dbaron@7399 1176 <tr>
dbaron@7399 1177 <th>Animatable:
dbaron@7399 1178
dbaron@7399 1179 <td>no
fantasai@6658 1180 </table>
fantasai@6658 1181
fantasai@6658 1182 <p>This property applies emphasis marks to the element's text. Values have
fantasai@6658 1183 the following meanings:
fantasai@6658 1184
fantasai@6658 1185 <dl>
fantasai@6658 1186 <dt><dfn id=none1 title="text-emphasis:none">‘<code
fantasai@6658 1187 class=css>none</code>’</dfn>
fantasai@6658 1188
fantasai@6658 1189 <dd>No emphasis marks.
fantasai@6658 1190
fantasai@6658 1191 <dt><dfn id=filled title="text-emphasis:filled">‘<code
fantasai@6658 1192 class=css>filled</code>’</dfn>
fantasai@6658 1193
fantasai@6658 1194 <dd>The shape is filled with solid color.
fantasai@6658 1195
fantasai@6658 1196 <dt><dfn id=open title="text-emphasis:open">‘<code
fantasai@6658 1197 class=css>open</code>’</dfn>
fantasai@6658 1198
fantasai@6658 1199 <dd>The shape is hollow.
fantasai@6658 1200
fantasai@6658 1201 <dt><dfn id=dot title="text-emphasis:dot">‘<code
fantasai@6658 1202 class=css>dot</code>’</dfn>
fantasai@6658 1203
fantasai@6658 1204 <dd>Display small circles as marks. The filled dot is U+2022 ‘<code
fantasai@6658 1205 class=css>•</code>’, and the open dot is U+25E6 ‘<code
fantasai@6658 1206 class=css>◦</code>’.
fantasai@6658 1207
fantasai@6658 1208 <dt><dfn id=circle title="text-emphasis:circle">‘<code
fantasai@6658 1209 class=css>circle</code>’</dfn>
fantasai@6658 1210
fantasai@6658 1211 <dd>Display large circles as marks. The filled circle is U+25CF ‘<code
fantasai@6658 1212 class=css>●</code>’, and the open circle is U+25CB ‘<code
fantasai@6658 1213 class=css>○</code>’.
fantasai@6658 1214
fantasai@6658 1215 <dt><dfn id=double-circle title="text-emphasis:double-circle">‘<code
fantasai@6658 1216 class=css>double-circle</code>’</dfn>
fantasai@6658 1217
fantasai@6658 1218 <dd>Display double circles as marks. The filled double-circle is U+25C9
fantasai@6658 1219 ‘<code class=css>◉</code>’, and the open double-circle is U+25CE
fantasai@6658 1220 ‘<code class=css>◎</code>’.
fantasai@6658 1221
fantasai@6658 1222 <dt><dfn id=triangle title="text-emphasis:triangle">‘<code
fantasai@6658 1223 class=css>triangle</code>’</dfn>
fantasai@6658 1224
fantasai@6658 1225 <dd>Display triangles as marks. The filled triangle is U+25B2 ‘<code
fantasai@6658 1226 class=css>▲</code>’, and the open triangle is U+25B3 ‘<code
fantasai@6658 1227 class=css>△</code>’.
fantasai@6658 1228
fantasai@6658 1229 <dt><dfn id=sesame title="text-emphasis:sesame">‘<code
fantasai@6658 1230 class=css>sesame</code>’</dfn>
fantasai@6658 1231
fantasai@6658 1232 <dd>Display sesames as marks. The filled sesame is U+FE45 ‘<code
fantasai@6658 1233 class=css>﹅</code>’, and the open sesame is U+FE46 ‘<code
fantasai@6658 1234 class=css>﹆</code>’.
fantasai@6658 1235
fantasai@6658 1236 <dt><dfn id=ltstringgt title="text-emphasis:sesame">‘<code
fantasai@6658 1237 class=css><var>&lt;string&gt;</var></code>’</dfn>
fantasai@6658 1238
fantasai@6658 1239 <dd>Display the given string as marks. Authors should not specify more
fantasai@6658 1240 than one <a href="#character"><i>character</i></a> in &lt;string&gt;. The
fantasai@6658 1241 UA may truncate or ignore strings consisting of more than one grapheme
fantasai@6658 1242 cluster.
fantasai@6658 1243 </dl>
fantasai@6658 1244
fantasai@6658 1245 <p>If a shape keyword is specified but neither of ‘<code
fantasai@6658 1246 class=css>filled</code>’ nor ‘<code class=css>open</code>’ is
fantasai@6658 1247 specified, ‘<code class=css>filled</code>’ is assumed. If only
fantasai@6658 1248 ‘<code class=css>filled</code>’ or ‘<code class=css>open</code>’
fantasai@6658 1249 is specified, the shape keyword computes to ‘<code
fantasai@6658 1250 class=css>circle</code>’ in horizontal writing mode and ‘<code
fantasai@6658 1251 class=css>sesame</code>’ in vertical writing mode.
fantasai@6658 1252
fantasai@6658 1253 <p>The marks should be drawn using the element's font settings with its
fantasai@6658 1254 size scaled down to 50%. However, not all fonts have all these glyphs, and
fantasai@6658 1255 some fonts use inappropriate sizes for emphasis marks in these code
fantasai@6658 1256 points. The UA may opt to use a font known to be good for emphasis marks,
fantasai@6658 1257 or the marks may instead be synthesized by the UA. Marks must remain
fantasai@6658 1258 upright in vertical writing modes: like CJK characters, they do not rotate
fantasai@6658 1259 to match the writing mode.
fantasai@6658 1260
fantasai@6658 1261 <p class=note> One example of good fonts for emphasis marks is Adobe's
fantasai@6658 1262 opensource project, <a
fantasai@6658 1263 href="http://sourceforge.net/adobe/kenten-generic/">Kenten Generic
fantasai@6658 1264 OpenType Font</a>, which is specially designed for the emphasis marks.
fantasai@6658 1265
fantasai@6658 1266 <p>The marks are drawn once for each <a
fantasai@6658 1267 href="#character"><i>character</i></a>. However, emphasis marks are not
fantasai@6658 1268 drawn for characters that are:
fantasai@6658 1269
fantasai@6658 1270 <ul>
fantasai@6658 1271 <li><a href="http://www.w3.org/TR/css3-text/#word-separator">Word
fantasai@6658 1272 separators</a> or that belong to the Unicode separator classes (Z*). (But
fantasai@6658 1273 note that emphasis marks <em>are</em> drawn for a space that combines
fantasai@6658 1274 with any combining characters.)
fantasai@6658 1275
fantasai@6658 1276 <li>Characters belonging to the Unicode classes for control codes and
fantasai@6658 1277 unassigned characters (Cc, Cf, Cn).
fantasai@6658 1278 </ul>
fantasai@6658 1279
fantasai@6658 1280 <p>If emphasis marks are drawn for characters for which ruby is drawn in
fantasai@6658 1281 the same position as the emphasis mark, the ruby should be stacked between
fantasai@6658 1282 the emphasis marks and the base text. In this case, the position of the
fantasai@6658 1283 emphasis marks for a given element should be determined as if all
fantasai@6658 1284 characters have ruby boxes of the same height as the highest ruby box in
fantasai@6658 1285 the element. If the UA is not capable of drawing ruby and emphasis marks
fantasai@6658 1286 on the same side, the UA may hide ruby and draw only emphasis marks.
fantasai@6658 1287
fantasai@6658 1288 <div class=figure>
fantasai@6658 1289 <p><img
fantasai@6658 1290 alt="Example of emphasis marks applied to 4 characters, and ruby to 2 of them"
fantasai@6658 1291 height=50 src=text-emphasis-ruby.png width=134>
fantasai@6658 1292
fantasai@6658 1293 <p class=caption>Emphasis marks applied to 4 characters, and ruby to 2 of
fantasai@6658 1294 them
fantasai@6658 1295 </div>
fantasai@6658 1296
fantasai@6658 1297 <p class=note>A future level of CSS may define controls to specify what to
fantasai@6658 1298 do when emphasis marks and ruby text coincide.
fantasai@6658 1299
jackalmage@6863 1300 <h3 id=text-emphasis-color-property><span class=secno>3.2. </span> Emphasis
jackalmage@6863 1301 Mark Color: the ‘<a href="#text-emphasis-color"><code
jackalmage@6863 1302 class=property>text-emphasis-color</code></a>’ property</h3>
fantasai@6658 1303
fantasai@6658 1304 <table class=propdef>
fantasai@6658 1305 <tbody>
fantasai@6658 1306 <tr>
fantasai@6658 1307 <th>Name:
fantasai@6658 1308
fantasai@6658 1309 <td><dfn id=text-emphasis-color>text-emphasis-color</dfn>
fantasai@6658 1310
fantasai@6658 1311 <tr>
fantasai@6658 1312 <th><a href="#values">Value</a>:
fantasai@6658 1313
fantasai@6658 1314 <td>&lt;color&gt;
fantasai@6658 1315
fantasai@6658 1316 <tr>
fantasai@6658 1317 <th>Initial:
fantasai@6658 1318
fantasai@6658 1319 <td><a
fantasai@6658 1320 href="http://www.w3.org/TR/css3-color/#currentcolor">currentColor</a>
fantasai@6658 1321
fantasai@6658 1322 <tr>
fantasai@6658 1323 <th>Applies to:
fantasai@6658 1324
fantasai@6658 1325 <td>all elements
fantasai@6658 1326
fantasai@6658 1327 <tr>
fantasai@6658 1328 <th>Inherited:
fantasai@6658 1329
fantasai@6658 1330 <td>yes
fantasai@6658 1331
fantasai@6658 1332 <tr>
fantasai@6658 1333 <th>Percentages:
fantasai@6658 1334
fantasai@6658 1335 <td>N/A
fantasai@6658 1336
fantasai@6658 1337 <tr>
fantasai@6658 1338 <th>Media:
fantasai@6658 1339
fantasai@6658 1340 <td>visual
fantasai@6658 1341
fantasai@6658 1342 <tr>
fantasai@6658 1343 <th>Computed value:
fantasai@6658 1344
fantasai@6658 1345 <td>as specified
dbaron@7399 1346
dbaron@7399 1347 <tr>
dbaron@7399 1348 <th>Animatable:
dbaron@7399 1349
dbaron@7399 1350 <td>as <a
dbaron@7399 1351 href="http://dev.w3.org/csswg/css3-transitions/#animtype-color">color</a>
fantasai@6658 1352 </table>
fantasai@6658 1353
fantasai@6658 1354 <p>This property specifies the foreground color of the emphasis marks.
fantasai@6658 1355
fantasai@7137 1356 <p class=note> The <dfn id=currentcolor>‘<code
fantasai@7137 1357 class=css>currentcolor</code>’</dfn> keyword computes to itself and is
fantasai@7137 1358 resolved to the value of ‘<code class=property>color</code>’ after
fantasai@7137 1359 inheritance is performed. This means ‘<a
fantasai@7137 1360 href="#text-emphasis-color"><code
fantasai@7137 1361 class=property>text-emphasis-color</code></a>’ by default matches the
fantasai@7137 1362 text ‘<code class=property>color</code>’ even as ‘<code
fantasai@7137 1363 class=property>color</code>’ changes across elements.
fantasai@6658 1364
jackalmage@6863 1365 <h3 id=text-emphasis-property><span class=secno>3.3. </span> Emphasis Mark
jackalmage@6863 1366 Shorthand: the ‘<a href="#text-emphasis"><code
jackalmage@6863 1367 class=property>text-emphasis</code></a>’ property</h3>
fantasai@6658 1368
fantasai@6658 1369 <table class=propdef>
fantasai@6658 1370 <tbody>
fantasai@6658 1371 <tr>
fantasai@6658 1372 <th>Name:
fantasai@6658 1373
fantasai@6658 1374 <td><dfn id=text-emphasis>text-emphasis</dfn>
fantasai@6658 1375
fantasai@6658 1376 <tr>
fantasai@6658 1377 <th><a href="#values">Value</a>:
fantasai@6658 1378
fantasai@6658 1379 <td>‘<code class=css>&lt;<a
fantasai@6658 1380 href="#text-emphasis-style">text-emphasis-style</a>&gt;</code>’ ||
fantasai@6658 1381 ‘<code class=css>&lt;<a
fantasai@6658 1382 href="#text-emphasis-color">text-emphasis-color</a>&gt;</code>’
fantasai@6658 1383
fantasai@6658 1384 <tr>
fantasai@6658 1385 <th>Initial:
fantasai@6658 1386
fantasai@6658 1387 <td>see individual properties
fantasai@6658 1388
fantasai@6658 1389 <tr>
fantasai@6658 1390 <th>Applies to:
fantasai@6658 1391
fantasai@6658 1392 <td>all elements
fantasai@6658 1393
fantasai@6658 1394 <tr>
fantasai@6658 1395 <th>Inherited:
fantasai@6658 1396
fantasai@6658 1397 <td>yes
fantasai@6658 1398
fantasai@6658 1399 <tr>
fantasai@6658 1400 <th>Percentages:
fantasai@6658 1401
fantasai@6658 1402 <td>N/A
fantasai@6658 1403
fantasai@6658 1404 <tr>
fantasai@6658 1405 <th>Media:
fantasai@6658 1406
fantasai@6658 1407 <td>visual
fantasai@6658 1408
fantasai@6658 1409 <tr>
fantasai@6658 1410 <th>Computed value:
fantasai@6658 1411
fantasai@6658 1412 <td>see individual properties
dbaron@7399 1413
dbaron@7399 1414 <tr>
dbaron@7399 1415 <th>Animatable:
dbaron@7399 1416
dbaron@7399 1417 <td>see individual properties
fantasai@6658 1418 </table>
fantasai@6658 1419
fantasai@6658 1420 <p>This property is a shorthand for setting ‘<a
fantasai@6658 1421 href="#text-emphasis-style"><code
fantasai@6658 1422 class=property>text-emphasis-style</code></a>’ and ‘<a
fantasai@6658 1423 href="#text-emphasis-color"><code
fantasai@6658 1424 class=property>text-emphasis-color</code></a>’ in one declaration.
fantasai@6658 1425 Omitted values are set to their initial values.
fantasai@6658 1426
fantasai@6658 1427 <p class=note>Note that ‘<a href="#text-emphasis-position"><code
fantasai@6658 1428 class=property>text-emphasis-position</code></a>’ is not reset in this
fantasai@6658 1429 shorthand. This is because typically the shape and color vary, but the
fantasai@6658 1430 position is consistent for a particular language throughout the document.
fantasai@6658 1431 Therefore the position should inherit independently.
fantasai@6658 1432
jackalmage@6863 1433 <h3 id=text-emphasis-position-property><span class=secno>3.4. </span>
fantasai@6658 1434 Emphasis Mark Position: the ‘<a href="#text-emphasis-position"><code
jackalmage@6863 1435 class=property>text-emphasis-position</code></a>’ property</h3>
fantasai@6658 1436
fantasai@6658 1437 <table class=propdef>
fantasai@6658 1438 <tbody>
fantasai@6658 1439 <tr>
fantasai@6658 1440 <th>Name:
fantasai@6658 1441
fantasai@6658 1442 <td><dfn id=text-emphasis-position>text-emphasis-position</dfn>
fantasai@6658 1443
fantasai@6658 1444 <tr>
fantasai@6658 1445 <th><a href="#values">Value</a>:
fantasai@6658 1446
fantasai@6993 1447 <td>[ over | under ] && [ right | left ]
fantasai@6658 1448
fantasai@6658 1449 <tr>
fantasai@6658 1450 <th>Initial:
fantasai@6658 1451
fantasai@6993 1452 <td>over right
fantasai@6658 1453
fantasai@6658 1454 <tr>
fantasai@6658 1455 <th>Applies to:
fantasai@6658 1456
fantasai@6658 1457 <td>all elements
fantasai@6658 1458
fantasai@6658 1459 <tr>
fantasai@6658 1460 <th>Inherited:
fantasai@6658 1461
fantasai@6658 1462 <td>yes
fantasai@6658 1463
fantasai@6658 1464 <tr>
fantasai@6658 1465 <th>Percentages:
fantasai@6658 1466
fantasai@6658 1467 <td>N/A
fantasai@6658 1468
fantasai@6658 1469 <tr>
fantasai@6658 1470 <th>Media:
fantasai@6658 1471
fantasai@6658 1472 <td>visual
fantasai@6658 1473
fantasai@6658 1474 <tr>
fantasai@6658 1475 <th>Computed value:
fantasai@6658 1476
fantasai@6658 1477 <td>as specified
dbaron@7399 1478
dbaron@7399 1479 <tr>
dbaron@7399 1480 <th>Animatable:
dbaron@7399 1481
dbaron@7399 1482 <td>no
fantasai@6658 1483 </table>
fantasai@6658 1484
fantasai@6658 1485 <p>This property describes where emphasis marks are drawn at. The values
fantasai@6658 1486 have following meanings:
fantasai@6658 1487
fantasai@6658 1488 <dl>
fantasai@6993 1489 <dt><dfn id=over title="text-emphasis:over">‘<code
fantasai@6993 1490 class=css>over</code>’</dfn>
fantasai@6658 1491
fantasai@6658 1492 <dd>Draw marks over the text in horizontal writing mode.
fantasai@6658 1493
fantasai@7117 1494 <dt><dfn id=under title="text-emphasis:under">‘<code
fantasai@6993 1495 class=css>under</code>’</dfn>
fantasai@6658 1496
fantasai@6658 1497 <dd>Draw marks under the text in horizontal writing mode.
fantasai@6658 1498
fantasai@7117 1499 <dt><dfn id=right title="text-emphasis:right">‘<code
fantasai@6658 1500 class=css>right</code>’</dfn>
fantasai@6658 1501
fantasai@6658 1502 <dd>Draw marks to the right of the text in vertical writing mode.
fantasai@6658 1503
fantasai@7117 1504 <dt><dfn id=left title="text-emphasis:left">‘<code
fantasai@6658 1505 class=css>left</code>’</dfn>
fantasai@6658 1506
fantasai@6658 1507 <dd>Draw marks to the left of the text in vertical writing mode.
fantasai@6658 1508 </dl>
fantasai@6658 1509
fantasai@6658 1510 <p>Emphasis marks are drawn exactly as if each character was assigned the
fantasai@6658 1511 mark as its ruby annotation text with the ruby position given by ‘<a
fantasai@6658 1512 href="#text-emphasis-position"><code
fantasai@6658 1513 class=property>text-emphasis-position</code></a>’ and the ruby alignment
fantasai@6658 1514 as centered.
fantasai@6658 1515
fantasai@6658 1516 <p>The effect of emphasis marks on the line height is the same as for ruby
fantasai@6658 1517 text.
fantasai@6658 1518
fantasai@6658 1519 <div class=note>
fantasai@6658 1520 <p>Note, the preferred position of emphasis marks depends on the language.
fantasai@6658 1521 In Japanese for example, the preferred position is ‘<code
fantasai@6993 1522 class=css>over right</code>’. In Chinese, on the other hand, the
fantasai@6993 1523 preferred position is ‘<code class=css>under right</code>’. The
fantasai@6658 1524 informative table below summarizes the preferred emphasis mark positions
fantasai@6658 1525 for Chinese and Japanese:
fantasai@6658 1526
fantasai@6658 1527 <table class=data>
fantasai@6658 1528 <caption>Preferred emphasis mark and ruby position</caption>
fantasai@6658 1529
fantasai@6658 1530 <thead>
fantasai@6658 1531 <tr>
fantasai@6658 1532 <th rowspan=2 scope=col>Language
fantasai@6658 1533
fantasai@7162 1534 <th colspan=2 scope=col>Preferred position
fantasai@6658 1535
fantasai@6658 1536 <th colspan=2 rowspan=2 scope=col>Illustration
fantasai@6658 1537
fantasai@6658 1538 <tr>
fantasai@6658 1539 <th>Horizontal
fantasai@6658 1540
fantasai@6658 1541 <th>Vertical
fantasai@6658 1542
fantasai@6658 1543 <tbody>
fantasai@6658 1544 <tr>
fantasai@6658 1545 <td scope=row>Japanese
fantasai@6658 1546
fantasai@7162 1547 <td rowspan=2>over
fantasai@6658 1548
fantasai@7162 1549 <td rowspan=2>right
fantasai@6658 1550
fantasai@7162 1551 <td rowspan=2> <img
fantasai@6993 1552 alt="Emphasis marks appear over each emphasized character in horizontal Japanese text."
fantasai@6658 1553 height=28 src=text-emphasis-ja.gif
fantasai@6658 1554 title="Emphasis (shown in blue for clarity) applied above a fragment of Japanese text"
fantasai@6658 1555 width=225>
fantasai@6658 1556
fantasai@7162 1557 <td rowspan=3> <img
fantasai@6658 1558 alt="Emphasis marks appear on the right of each emphasized character in vertical Japanese text."
fantasai@6658 1559 height=89 src=text-emphasis-v.gif
fantasai@6658 1560 title="Emphasis applied on the right of a fragment of Japanese text"
fantasai@7162 1561 width=34>
fantasai@7162 1562
fantasai@7162 1563 <tr>
fantasai@7162 1564 <td scope=row>Mongolian
fantasai@6658 1565
fantasai@6658 1566 <tr>
fantasai@6658 1567 <td scope=row>Chinese
fantasai@6658 1568
fantasai@6993 1569 <td>under
fantasai@6658 1570
fantasai@6658 1571 <td>right
fantasai@6658 1572
fantasai@6658 1573 <td> <img
fantasai@6658 1574 alt="Emphasis marks appear below each emphasized character in horizontal Simplified Chinese text."
fantasai@6658 1575 height=28 src=text-emphasis-zh.gif
fantasai@6658 1576 title="Emphasis (shown in blue for clarity) applied below a fragment of Chinese text"
fantasai@6658 1577 width=133>
fantasai@6658 1578 </table>
fantasai@6658 1579 </div>
fantasai@6658 1580
jackalmage@6863 1581 <h2 id=text-shadow-property><span class=secno>4. </span> Text Shadows: the
jackalmage@6863 1582 ‘<a href="#text-shadow"><code class=property>text-shadow</code></a>’
jackalmage@6863 1583 property</h2>
fantasai@6658 1584
fantasai@6658 1585 <table class=propdef>
fantasai@6658 1586 <tbody>
fantasai@6658 1587 <tr>
fantasai@6658 1588 <th>Name:
fantasai@6658 1589
fantasai@6658 1590 <td><dfn id=text-shadow>text-shadow</dfn>
fantasai@6658 1591
fantasai@6658 1592 <tr>
fantasai@6658 1593 <th><a href="#values">Value</a>:
fantasai@6658 1594
fantasai@6658 1595 <td>none | [ &lt;length>{2,3} && &lt;color>? ]#
fantasai@6658 1596
fantasai@6658 1597 <tr>
fantasai@6658 1598 <th>Initial:
fantasai@6658 1599
fantasai@6658 1600 <td>none
fantasai@6658 1601
fantasai@6658 1602 <tr>
fantasai@6658 1603 <th>Applies to:
fantasai@6658 1604
fantasai@6658 1605 <td>all elements
fantasai@6658 1606
fantasai@6658 1607 <tr>
fantasai@6658 1608 <th>Inherited:
fantasai@6658 1609
fantasai@6658 1610 <td>yes
fantasai@6658 1611
fantasai@6658 1612 <tr>
fantasai@6658 1613 <th>Percentages:
fantasai@6658 1614
fantasai@6658 1615 <td>N/A
fantasai@6658 1616
fantasai@6658 1617 <tr>
fantasai@6658 1618 <th>Media:
fantasai@6658 1619
fantasai@6658 1620 <td>visual
fantasai@6658 1621
fantasai@6658 1622 <tr>
fantasai@6658 1623 <th>Computed value:
fantasai@6658 1624
fantasai@6658 1625 <td>a color plus three absolute &lt;length&gt;s
dbaron@7399 1626
dbaron@7399 1627 <tr>
dbaron@7399 1628 <th>Animatable:
dbaron@7399 1629
dbaron@7399 1630 <td>as <a
dbaron@7399 1631 href="http://dev.w3.org/csswg/css3-transitions/#animtype-shadow-list">shadow
dbaron@7399 1632 list</a>
fantasai@6658 1633 </table>
fantasai@6658 1634
fantasai@6658 1635 <p>This property accepts a comma-separated list of shadow effects to be
fantasai@6658 1636 applied to the text of the element. Values are interpreted as for <a
fantasai@6658 1637 href="http://www.w3.org/TR/css3-background/#the-box-shadow">‘<code
fantasai@6658 1638 class=property>box-shadow</code>’</a> <a href="#CSS3BG"
fantasai@6658 1639 rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>. (But note that spread
fantasai@6658 1640 values are not allowed.) The shadow is applied to all of the element's
fantasai@6658 1641 text as well as any text decorations it specifies.
fantasai@6658 1642
fantasai@6658 1643 <p>The shadow effects are applied front-to-back: the first shadow is on
fantasai@6658 1644 top. The shadows may thus overlay each other, but they never overlay the
fantasai@6658 1645 text itself. The shadow must be painted at a stack level between the
fantasai@6658 1646 element's border and/or background, if present, and the elements text and
fantasai@6658 1647 text decoration. UAs should avoid painting text shadows over text in
fantasai@6658 1648 adjacent elements belonging to the same stack level and stacking context.
fantasai@6658 1649 (This may mean that the exact stack level of the shadows depends on
fantasai@6658 1650 whether the element has a border or background: the exact stacking
fantasai@6658 1651 behavior of text shadows is thus UA-defined.)
fantasai@6658 1652
fantasai@6658 1653 <p>Unlike ‘<code class=property>box-shadow</code>’, text shadows are
fantasai@6658 1654 not clipped to the shadowed shape and may show through if the text is
fantasai@6658 1655 partially-transparent. Like ‘<code class=property>box-shadow</code>’,
fantasai@6658 1656 text shadows do not influence layout, and do not trigger scrolling or
fantasai@6658 1657 increase the size of the scrollable area.
fantasai@6658 1658
fantasai@6658 1659 <p class=note>The painting order of shadows defined here is the opposite of
fantasai@6658 1660 that defined in the 1998 <a
fantasai@6658 1661 href="http://www.w3.org/TR/1998/REC-CSS2-19980512">CSS2
fantasai@6658 1662 Recommendation</a>.
fantasai@6658 1663
fantasai@6658 1664 <p>The ‘<a href="#text-shadow"><code class=css>text-shadow</code></a>’
fantasai@6658 1665 property applies to both the <code>::first-line</code> and
fantasai@6658 1666 <code>::first-letter</code> pseudo-elements.
fantasai@6658 1667
jackalmage@6863 1668 <h2 id=conformance><span class=secno>5. </span> Conformance</h2>
fantasai@6658 1669
jackalmage@6863 1670 <h3 id=conventions><span class=secno>5.1. </span> Document Conventions</h3>
fantasai@6658 1671
fantasai@6658 1672 <p>Conformance requirements are expressed with a combination of descriptive
fantasai@6658 1673 assertions and RFC 2119 terminology. The key words “MUST”, “MUST
fantasai@6658 1674 NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
fantasai@6658 1675 “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
fantasai@6658 1676 normative parts of this document are to be interpreted as described in RFC
fantasai@6658 1677 2119. However, for readability, these words do not appear in all uppercase
fantasai@6658 1678 letters in this specification.
fantasai@6658 1679
fantasai@6658 1680 <p>All of the text of this specification is normative except sections
fantasai@6658 1681 explicitly marked as non-normative, examples, and notes. <a
fantasai@6658 1682 href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
fantasai@6658 1683
fantasai@6658 1684 <p>Examples in this specification are introduced with the words “for
fantasai@6658 1685 example” or are set apart from the normative text with
fantasai@6658 1686 <code>class="example"</code>, like this:
fantasai@6658 1687
fantasai@6658 1688 <div class=example>
fantasai@6658 1689 <p>This is an example of an informative example.
fantasai@6658 1690 </div>
fantasai@6658 1691
fantasai@6658 1692 <p>Informative notes begin with the word “Note” and are set apart from
fantasai@6658 1693 the normative text with <code>class="note"</code>, like this:
fantasai@6658 1694
fantasai@6658 1695 <p class=note>Note, this is an informative note.
fantasai@6658 1696
jackalmage@6863 1697 <h3 id=conformance-classes><span class=secno>5.2. </span> Conformance
fantasai@6658 1698 Classes</h3>
fantasai@6658 1699
fantasai@6658 1700 <p>Conformance to CSS Text Level 3 is defined for three conformance
fantasai@6658 1701 classes:
fantasai@6658 1702
fantasai@6658 1703 <dl>
fantasai@6658 1704 <dt><dfn id=style-sheet title="style sheet!!as conformance class">style
fantasai@6658 1705 sheet</dfn>
fantasai@6658 1706
fantasai@6658 1707 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
fantasai@6658 1708 style sheet</a>.
fantasai@6658 1709
fantasai@6658 1710 <dt><dfn id=renderer>renderer</dfn>
fantasai@6658 1711
fantasai@6658 1712 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
fantasai@6658 1713 that interprets the semantics of a style sheet and renders documents that
fantasai@6658 1714 use them.
fantasai@6658 1715
fantasai@6658 1716 <dt><dfn id=authoring-tool>authoring tool</dfn>
fantasai@6658 1717
fantasai@6658 1718 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
fantasai@6658 1719 that writes a style sheet.
fantasai@6658 1720 </dl>
fantasai@6658 1721
fantasai@6658 1722 <p>A style sheet is conformant to CSS Text Level 3 if all of its
fantasai@6658 1723 declarations that use properties defined in this module have values that
fantasai@6658 1724 are valid according to the generic CSS grammar and the individual grammars
fantasai@6658 1725 of each property as given in this module.
fantasai@6658 1726
fantasai@6658 1727 <p>A renderer is conformant to CSS Text Level 3 if, in addition to
fantasai@6658 1728 interpreting the style sheet as defined by the appropriate specifications,
fantasai@6658 1729 it supports all the features defined by CSS Text Level 3 by parsing them
fantasai@6658 1730 correctly and rendering the document accordingly. However, the inability
fantasai@6658 1731 of a UA to correctly render a document due to limitations of the device
fantasai@6658 1732 does not make the UA non-conformant. (For example, a UA is not required to
fantasai@6658 1733 render color on a monochrome monitor.)
fantasai@6658 1734
fantasai@6658 1735 <p>An authoring tool is conformant to CSS Text Level 3 if it writes style
fantasai@6658 1736 sheets that are syntactically correct according to the generic CSS grammar
fantasai@6658 1737 and the individual grammars of each feature in this module, and meet all
fantasai@6658 1738 other conformance requirements of style sheets as described in this
fantasai@6658 1739 module.
fantasai@6658 1740
jackalmage@6863 1741 <h3 id=partial><span class=secno>5.3. </span> Partial Implementations</h3>
fantasai@6658 1742
fantasai@6658 1743 <p>So that authors can exploit the forward-compatible parsing rules to
fantasai@6658 1744 assign fallback values, CSS renderers <strong>must</strong> treat as
fantasai@6658 1745 invalid (and <a
fantasai@6658 1746 href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
fantasai@6658 1747 appropriate</a>) any at-rules, properties, property values, keywords, and
fantasai@6658 1748 other syntactic constructs for which they have no usable level of support.
fantasai@6658 1749 In particular, user agents <strong>must not</strong> selectively ignore
fantasai@6658 1750 unsupported component values and honor supported values in a single
fantasai@6658 1751 multi-value property declaration: if any value is considered invalid (as
fantasai@6658 1752 unsupported values must be), CSS requires that the entire declaration be
fantasai@6658 1753 ignored.
fantasai@6658 1754
jackalmage@6863 1755 <h3 id=experimental><span class=secno>5.4. </span> Experimental
fantasai@6658 1756 Implementations</h3>
fantasai@6658 1757
fantasai@6658 1758 <p>To avoid clashes with future CSS features, the CSS2.1 specification
fantasai@6658 1759 reserves a <a
fantasai@6658 1760 href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
fantasai@6658 1761 syntax</a> for proprietary and experimental extensions to CSS.
fantasai@6658 1762
fantasai@6658 1763 <p>Prior to a specification reaching the Candidate Recommendation stage in
fantasai@6658 1764 the W3C process, all implementations of a CSS feature are considered
fantasai@6658 1765 experimental. The CSS Working Group recommends that implementations use a
fantasai@6658 1766 vendor-prefixed syntax for such features, including those in W3C Working
fantasai@6658 1767 Drafts. This avoids incompatibilities with future changes in the draft.
fantasai@6658 1768
jackalmage@6863 1769 <h3 id=testing><span class=secno>5.5. </span>Non-Experimental
fantasai@6658 1770 Implementations</h3>
fantasai@6658 1771
fantasai@6658 1772 <p>Once a specification reaches the Candidate Recommendation stage,
fantasai@6658 1773 non-experimental implementations are possible, and implementors should
fantasai@6658 1774 release an unprefixed implementation of any CR-level feature they can
fantasai@6658 1775 demonstrate to be correctly implemented according to spec.
fantasai@6658 1776
fantasai@6658 1777 <p>To establish and maintain the interoperability of CSS across
fantasai@6658 1778 implementations, the CSS Working Group requests that non-experimental CSS
fantasai@6658 1779 renderers submit an implementation report (and, if necessary, the
fantasai@6658 1780 testcases used for that implementation report) to the W3C before releasing
fantasai@6658 1781 an unprefixed implementation of any CSS features. Testcases submitted to
fantasai@6658 1782 W3C are subject to review and correction by the CSS Working Group.
fantasai@6658 1783
fantasai@6658 1784 <p>Further information on submitting testcases and implementation reports
fantasai@6658 1785 can be found from on the CSS Working Group's website at <a
fantasai@6658 1786 href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
fantasai@6658 1787 Questions should be directed to the <a
fantasai@6658 1788 href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
fantasai@6658 1789 mailing list.
fantasai@6658 1790
jackalmage@6863 1791 <h3 id=cr-exit-criteria><span class=secno>5.6. </span> CR Exit Criteria</h3>
fantasai@6658 1792
fantasai@6658 1793 <p> For this specification to be advanced to Proposed Recommendation, there
fantasai@6658 1794 must be at least two independent, interoperable implementations of each
fantasai@6658 1795 feature. Each feature may be implemented by a different set of products,
fantasai@6658 1796 there is no requirement that all features be implemented by a single
fantasai@6658 1797 product. For the purposes of this criterion, we define the following
fantasai@6658 1798 terms:
fantasai@6658 1799
fantasai@6658 1800 <dl>
fantasai@6658 1801 <dt>independent
fantasai@6658 1802
fantasai@6658 1803 <dd>each implementation must be developed by a different party and cannot
fantasai@6658 1804 share, reuse, or derive from code used by another qualifying
fantasai@6658 1805 implementation. Sections of code that have no bearing on the
fantasai@6658 1806 implementation of this specification are exempt from this requirement.
fantasai@6658 1807
fantasai@6658 1808 <dt>interoperable
fantasai@6658 1809
fantasai@6658 1810 <dd>passing the respective test case(s) in the official CSS test suite,
fantasai@6658 1811 or, if the implementation is not a Web browser, an equivalent test. Every
fantasai@6658 1812 relevant test in the test suite should have an equivalent test created if
fantasai@6658 1813 such a user agent (UA) is to be used to claim interoperability. In
fantasai@6658 1814 addition if such a UA is to be used to claim interoperability, then there
fantasai@6658 1815 must one or more additional UAs which can also pass those equivalent
fantasai@6658 1816 tests in the same way for the purpose of interoperability. The equivalent
fantasai@6658 1817 tests must be made publicly available for the purposes of peer review.
fantasai@6658 1818
fantasai@6658 1819 <dt>implementation
fantasai@6658 1820
fantasai@6658 1821 <dd>a user agent which:
fantasai@6658 1822 <ol class=inline>
fantasai@6658 1823 <li>implements the specification.
fantasai@6658 1824
fantasai@6658 1825 <li>is available to the general public. The implementation may be a
fantasai@6658 1826 shipping product or other publicly available version (i.e., beta
fantasai@6658 1827 version, preview release, or “nightly build”). Non-shipping product
fantasai@6658 1828 releases must have implemented the feature(s) for a period of at least
fantasai@6658 1829 one month in order to demonstrate stability.
fantasai@6658 1830
fantasai@6658 1831 <li>is not experimental (i.e., a version specifically designed to pass
fantasai@6658 1832 the test suite and is not intended for normal usage going forward).
fantasai@6658 1833 </ol>
fantasai@6658 1834 </dl>
fantasai@6658 1835
fantasai@6658 1836 <p>The specification will remain Candidate Recommendation for at least six
fantasai@6658 1837 months.
fantasai@6658 1838
fantasai@6658 1839 <h2 class=no-num id=acknowledgements> Appendix A: Acknowledgements</h2>
fantasai@6658 1840
fantasai@6658 1841 <p>This specification would not have been possible without the help from:
fantasai@6658 1842 Ayman Aldahleh, Bert Bos, Tantek Çelik, Stephen Deach, John Daggett,
fantasai@6658 1843 Martin Dürst, Laurie Anna Edlund, Ben Errez, Yaniv Feinberg, Arye
fantasai@6658 1844 Gittelman, Ian Hickson, Martin Heijdra, Richard Ishida, Masayasu Ishikawa,
fantasai@6658 1845 Michael Jochimsen, Eric LeVine, Ambrose Li, Håkon Wium Lie, Chris Lilley,
fantasai@6658 1846 Ken Lunde, Nat McCully, Shinyu Murakami, Paul Nelson, Chris Pratley,
fantasai@6658 1847 Marcin Sawicki, Arnold Schrijver, Rahul Sonnad, Michel Suignard, Takao
fantasai@6658 1848 Suzuki, Frank Tang, Chris Thrasher, Etan Wexler, Chris Wilson, Masafumi
fantasai@6658 1849 Yabe and Steve Zilles.
fantasai@6658 1850
fantasai@6658 1851 <h2 class=no-num id=appendix-b-references>Appendix B: References</h2>
fantasai@6658 1852
fantasai@6658 1853 <h3 class=no-num id=normative-ref>Normative references</h3>
fantasai@6658 1854 <!--begin-normative-->
fantasai@6658 1855 <!-- Sorted by label -->
fantasai@6658 1856
fantasai@6658 1857 <dl class=bibliography>
fantasai@6658 1858 <dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
fantasai@6658 1859 <!---->
fantasai@6658 1860
fantasai@6658 1861 <dt id=CSS21>[CSS21]
fantasai@6658 1862
fantasai@6658 1863 <dd>Bert Bos; et al. <a
fantasai@7137 1864 href="http://www.w3.org/TR/2011/REC-CSS2-20110607/"><cite>Cascading Style
fantasai@6658 1865 Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
fantasai@6658 1866 2011. W3C Recommendation. URL: <a
fantasai@7137 1867 href="http://www.w3.org/TR/2011/REC-CSS2-20110607/">http://www.w3.org/TR/2011/REC-CSS2-20110607/</a>
fantasai@6658 1868 </dd>
fantasai@6658 1869 <!---->
fantasai@6658 1870
fantasai@6658 1871 <dt id=CSS3-WRITING-MODES>[CSS3-WRITING-MODES]
fantasai@6658 1872
fantasai@6658 1873 <dd>Elika J. Etemad; Koji Ishii. <a
fantasai@7117 1874 href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/"><cite>CSS
fantasai@7117 1875 Writing Modes Module Level 3.</cite></a> 15 November 2012. W3C Working
fantasai@7117 1876 Draft. (Work in progress.) URL: <a
fantasai@7117 1877 href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/">http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a>
fantasai@6658 1878 </dd>
fantasai@6658 1879 <!---->
fantasai@6658 1880
fantasai@6658 1881 <dt id=CSS3BG>[CSS3BG]
fantasai@6658 1882
fantasai@6658 1883 <dd>Bert Bos; Elika J. Etemad; Brad Kemper. <a
fantasai@6658 1884 href="http://www.w3.org/TR/2012/CR-css3-background-20120724/"><cite>CSS
fantasai@6658 1885 Backgrounds and Borders Module Level 3.</cite></a> 24 July 2012. W3C
fantasai@6658 1886 Candidate Recommendation. (Work in progress.) URL: <a
fantasai@6658 1887 href="http://www.w3.org/TR/2012/CR-css3-background-20120724/">http://www.w3.org/TR/2012/CR-css3-background-20120724/</a>
fantasai@6658 1888 </dd>
fantasai@6658 1889 <!---->
fantasai@6658 1890
fantasai@6658 1891 <dt id=CSS3TEXT>[CSS3TEXT]
fantasai@6658 1892
fantasai@6658 1893 <dd>Elika J. Etemad; Koji Ishii. <a
bert@7028 1894 href="http://www.w3.org/TR/2012/WD-css3-text-20121113/"><cite>CSS Text
bert@7028 1895 Module Level 3.</cite></a> 13 November 2012. W3C Working Draft. (Work in
fantasai@6658 1896 progress.) URL: <a
bert@7028 1897 href="http://www.w3.org/TR/2012/WD-css3-text-20121113/">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
fantasai@6658 1898 </dd>
fantasai@6658 1899 <!---->
fantasai@6658 1900
fantasai@6658 1901 <dt id=RFC2119>[RFC2119]
fantasai@6658 1902
fantasai@6658 1903 <dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
fantasai@6658 1904 words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
fantasai@6658 1905 RFC 2119. URL: <a
fantasai@6658 1906 href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
fantasai@6658 1907 </dd>
fantasai@6658 1908 <!---->
fantasai@6658 1909 </dl>
fantasai@6658 1910 <!--end-normative-->
fantasai@6658 1911
fantasai@6658 1912 <h3 class=no-num id=informative-ref>Informative references</h3>
fantasai@6658 1913 <!--begin-informative-->
fantasai@6658 1914 <!-- Sorted by label -->
fantasai@6658 1915
fantasai@6658 1916 <dl class=bibliography>
fantasai@6658 1917 <dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
fantasai@6658 1918 <!---->
fantasai@6658 1919
jackalmage@6858 1920 <dt id=CSS3-ANIMATIONS>[CSS3-ANIMATIONS]
jackalmage@6858 1921
jackalmage@6858 1922 <dd>Dean Jackson; et al. <a
jackalmage@6858 1923 href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/"><cite>CSS
jackalmage@6858 1924 Animations.</cite></a> 3 April 2012. W3C Working Draft. (Work in
jackalmage@6858 1925 progress.) URL: <a
jackalmage@6858 1926 href="http://www.w3.org/TR/2012/WD-css3-animations-20120403/">http://www.w3.org/TR/2012/WD-css3-animations-20120403/</a>
jackalmage@6858 1927 </dd>
jackalmage@6858 1928 <!---->
jackalmage@6858 1929
fantasai@7153 1930 <dt id=CSS3-FONTS>[CSS3-FONTS]
fantasai@7153 1931
fantasai@7153 1932 <dd>John Daggett. <a
fantasai@7286 1933 href="http://www.w3.org/TR/2012/WD-css3-fonts-20121211/"><cite>CSS Fonts
fantasai@7286 1934 Module Level 3.</cite></a> 11 December 2012. W3C Working Draft. (Work in
fantasai@7153 1935 progress.) URL: <a
fantasai@7286 1936 href="http://www.w3.org/TR/2012/WD-css3-fonts-20121211/">http://www.w3.org/TR/2012/WD-css3-fonts-20121211/</a>
fantasai@7153 1937 </dd>
fantasai@7153 1938 <!---->
fantasai@7153 1939
fantasai@6658 1940 <dt id=CSS3COLOR>[CSS3COLOR]
fantasai@6658 1941
fantasai@6658 1942 <dd>Tantek Çelik; Chris Lilley; L. David Baron. <a
fantasai@6658 1943 href="http://www.w3.org/TR/2011/REC-css3-color-20110607"><cite>CSS Color
fantasai@6658 1944 Module Level 3.</cite></a> 7 June 2011. W3C Recommendation. URL: <a
fantasai@6658 1945 href="http://www.w3.org/TR/2011/REC-css3-color-20110607">http://www.w3.org/TR/2011/REC-css3-color-20110607</a>
fantasai@6658 1946 </dd>
fantasai@6658 1947 <!---->
fantasai@6658 1948 </dl>
fantasai@6658 1949 <!--end-informative-->
fantasai@6658 1950
fantasai@6658 1951 <h2 class=no-num id=changes>Appendix C: Changes</h2>
jackalmage@6858 1952
fantasai@7011 1953 <h3 class=no-num id=recent-changes> Changes since the <a
fantasai@7011 1954 href="http://www.w3.org/TR/2012/WD-css3-writing-modes-20120501/">May 2012
fantasai@7011 1955 CSS Writing Modes Module Level 3 <abbr title="Working Draft">WD</abbr></a></h3>
fantasai@7011 1956
fantasai@7011 1957 <p>Significant changes include:
fantasai@7011 1958
fantasai@7011 1959 <ul>
fantasai@7011 1960 <li>Changed line decorations to not skip margins/padding/borders of
fantasai@7011 1961 descendents' inline boxes.
fantasai@7011 1962
fantasai@7011 1963 <li>Clarified and corrected the definitions for <a
fantasai@7011 1964 href="#line-decoration">line decoration propagation</a>
fantasai@7011 1965
fantasai@7012 1966 <li>Changed the definitions for averaging <a href="#line-position">line
fantasai@7011 1967 decoration positions</a> to better accommodate changes in font size.
fantasai@7011 1968
fantasai@7011 1969 <li>Changed ‘<code class=css>above</code>’ and ‘<code
fantasai@7011 1970 class=css>below</code>’ values of ‘<a
fantasai@7011 1971 href="#text-emphasis-position"><code
fantasai@7011 1972 class=property>text-emphasis-position</code></a>’ and ‘<a
fantasai@7011 1973 href="#text-underline-position"><code
fantasai@7011 1974 class=property>text-underline-position</code></a>’ to ‘<code
fantasai@7117 1975 class=css>over</code>’ and ‘<code class=css>under</code>’ to match
fantasai@7117 1976 terminology in ‘<a href="#text-decoration-line"><code
fantasai@7011 1977 class=property>text-decoration-line</code></a>’.
fantasai@7011 1978
fantasai@7011 1979 <li>Define interaction of ‘<a href="#text-shadow"><code
fantasai@7011 1980 class=property>text-shadow</code></a>’ and ‘<a
fantasai@7011 1981 href="#text-decoration"><code
fantasai@7011 1982 class=property>text-decoration</code></a>’.
fantasai@7011 1983 </ul>
fantasai@7011 1984
jackalmage@6858 1985 <h2 class=no-num id=default-stylesheet> Appendix D: Default UA Stylesheet</h2>
jackalmage@6858 1986
jackalmage@6858 1987 <p> This appendix is informative, and is to help UA developers to implement
jackalmage@6858 1988 default stylesheet, but UA developers are free to ignore or change.
jackalmage@6858 1989
jackalmage@6858 1990 <div class=example>
jackalmage@6858 1991 <pre><code class=css>
jackalmage@6859 1992 <!-- -->s, strike, del {
jackalmage@6859 1993 <!-- --> text-decoration: line-through;
jackalmage@6859 1994 <!-- -->}
jackalmage@6859 1995 <!-- -->
jackalmage@6859 1996 <!-- -->u, ins, :link, :visited {
jackalmage@6859 1997 <!-- --> text-decoration: underline;
jackalmage@6859 1998 <!-- -->}
jackalmage@6859 1999 <!-- -->
jackalmage@6859 2000 <!-- -->abbr[title], acronym[title] {
jackalmage@6859 2001 <!-- --> text-decoration: dotted underline;
jackalmage@6859 2002 <!-- -->}
jackalmage@6859 2003 <!-- -->
jackalmage@6858 2004 <!-- -->/* disable inheritance of text-emphasis marks to ruby text:
jackalmage@6858 2005 <!-- --> emphasis marks should only apply to base text */
jackalmage@6858 2006 <!-- -->rt { text-emphasis: none; }
jackalmage@6858 2007 <!-- -->
jackalmage@6858 2008 <!-- -->:root:lang(zh), [lang|=zh] {
fantasai@6993 2009 <!-- -->/* default emphasis mark position is 'under right' for Chinese */
fantasai@6993 2010 <!-- --> text-emphasis-position: under right;
jackalmage@6858 2011 <!-- -->}
jackalmage@6858 2012 <!-- -->
jackalmage@6858 2013 <!-- -->:root:lang(ja), [lang|=ja], :root:lang(ko), [lang|=ko] {
fantasai@6993 2014 <!-- -->/* default underline position is 'under right' for Japanese and Korean */
fantasai@6993 2015 <!-- --> text-underline-position: under right;
jackalmage@6858 2016 <!-- -->}
jackalmage@6858 2017 <!-- -->
jackalmage@6858 2018 <!-- -->:root:lang(zh), [lang|=zh] {
fantasai@6993 2019 <!-- -->/* default underline position is 'under left' for Chinese */
fantasai@6993 2020 <!-- --> text-underline-position: under left;
jackalmage@6858 2021 <!-- -->}
jackalmage@6858 2022 <!-- -->
jackalmage@6858 2023 <!-- -->blink {
jackalmage@6858 2024 <!-- --> text-decoration-line: blink;
jackalmage@6858 2025 <!-- -->}
jackalmage@6858 2026 </code></pre>
jackalmage@6858 2027 </div>
jackalmage@6858 2028
jackalmage@6858 2029 <p class=issue> If you find any issues, recommendations to add, or
jackalmage@6858 2030 corrections, please send the information to <a
jackalmage@6858 2031 href="mailto:www-style@w3.org">www-style@w3.org</a> with
fantasai@7014 2032 <kbd>[css-text-decor-3]</kbd> in the subject line.
jackalmage@6858 2033
jackalmage@6858 2034 <div class=example>
jackalmage@6858 2035 <p> While ‘<code class=css>text-decoration-line: blink</code>’ can't
jackalmage@6858 2036 be fully reproduced with other existing properties, authors can achieve a
jackalmage@6858 2037 very similar effect with the following CSS:
jackalmage@6858 2038
jackalmage@6858 2039 <pre>
jackalmage@6858 2040 <!-- -->@keyframes blink {
jackalmage@6858 2041 <!-- --> 0% {
jackalmage@6858 2042 <!-- --> visibility: hidden;
jackalmage@6858 2043 <!-- --> animation-timing-function: step-end;
jackalmage@6858 2044 <!-- --> }
jackalmage@6858 2045 <!-- --> 25%, 100% {
jackalmage@6858 2046 <!-- --> visibility: visible;
jackalmage@6858 2047 <!-- --> }
jackalmage@6858 2048 <!-- -->}
jackalmage@6858 2049 <!-- -->blink {
jackalmage@6858 2050 <!-- --> animation: blink 1s infinite;
jackalmage@6858 2051 <!-- -->}</pre>
jackalmage@6858 2052 </div>

mercurial