-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathOverview.html
2610 lines (1793 loc) · 102 KB
/
Overview.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Text Decoration Module Level 3</title>
<meta content="[workstatus]" name="csswg-work-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<script defer="" src="//test.csswg.org/harness/annotate.js#css-text-decor-3_dev/css-text-decor-3" type="text/javascript"></script>
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/">
<img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72">
</a>
</p>
<h1 class="p-name no-ref" id="title">CSS Text Decoration Module Level 3</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
<time class="dt-updated" datetime="2014-03-20">20 March 2014</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="http://dev.w3.org/csswg/css-text-decor-3/">http://dev.w3.org/csswg/css-text-decor-3/</a>
<dt>Latest version:
<dd><a href="http://www.w3.org/TR/css-text-decor-3/">http://www.w3.org/TR/css-text-decor-3/</a>
<dt>Previous Versions:
<dd><a href="http://www.w3.org/TR/2012/WD-css-text-decor-3-20121113/" rel="previous">http://www.w3.org/TR/2012/WD-css-text-decor-3-20121113/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-text-decor%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-text-decor] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Test Suite:
<dd><a href="http://test.csswg.org/suites/css-text-decor-3_dev/nightly-unstable/">http://test.csswg.org/suites/css-text-decor-3_dev/nightly-unstable/</a>
<dt>Issue Tracking:
<dd><a href="https://github.com/frivoal/csswg-drafts/issues/">GitHub</a>
<dd><a href="#issues-index">Inline In Spec</a>
<dd><span><a href="http://www.w3.org/Style/CSS/Tracker/products/10">http://www.w3.org/Style/CSS/Tracker/products/10</a></span>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">fantasai</a> (<span class="p-org org">Invited Expert</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:kojiishi@gmail.com">Koji Ishii</a> (<span class="p-org org">Google</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2014 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>This module contains the features of CSS relating to text decoration, such as underlines, text shadows, and emphasis marks.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p>
This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress.
</p>
<p>
The (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list
<a href="mailto:www-style@w3.org?Subject=%5Bcss-text-decor%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>
(see <a href="http://www.w3.org/Mail/Request">instructions</a>)
is preferred for discussion of this specification.
When sending e-mail,
please put the text “css-text-decor” in the subject,
preferably like this:
“[css-text-decor] <em>…summary of comment…</em>”
</p>
<p>
This document was produced by the <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a>
(part of the <a href="http://www.w3.org/Style/">Style Activity</a>).
</p>
<p>
This document was produced by a group operating under
the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>.
W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a>
made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a>
must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.
</p>
<p>
This document is governed by the <a href="http://www.w3.org/2014/Process-20140801/" id="w3c_process_revision">1 August 2014 W3C Process Document</a>.
</p>
<p>
</p></div>
<div data-fill-with="at-risk">
<p>The following features are at-risk, and may be dropped during the CR period:
</p>
<ul>
<li>The <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-skip">text-decoration-skip</a> property.
<li>The line positioning rules.
<li>The ability to place both emphasis marks and ruby on the same base text.
</ul></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#intro"><span class="secno">1</span> <span class="content">
Introduction</span></a>
<ul class="toc">
<li><a href="#placement"><span class="secno">1.1</span> <span class="content">
Module Interactions</span></a>
<li><a href="#values"><span class="secno">1.2</span> <span class="content">
Values</span></a>
<li><a href="#terms"><span class="secno">1.3</span> <span class="content">Terminology</span></a>
</ul>
<li><a href="#line-decoration"><span class="secno">2</span> <span class="content">
Line Decoration: Underline, Overline, and Strike-Through</span></a>
<ul class="toc">
<li><a href="#text-decoration-line-property"><span class="secno">2.1</span> <span class="content">
Text Decoration Lines: the <span class="property">text-decoration-line</span> property</span></a>
<li><a href="#text-decoration-color-property"><span class="secno">2.2</span> <span class="content">
Text Decoration Color: the <span class="property">text-decoration-color</span> property</span></a>
<li><a href="#text-decoration-style-property"><span class="secno">2.3</span> <span class="content">
Text Decoration Style: the <span class="property">text-decoration-style</span> property</span></a>
<li><a href="#text-decoration-property"><span class="secno">2.4</span> <span class="content">
Text Decoration Shorthand: the <span class="property">text-decoration</span> property</span></a>
<li><a href="#text-decoration-skip-property"><span class="secno">2.5</span> <span class="content">
Text Decoration Line Continuity: the <span class="property">text-decoration-skip</span> property</span></a>
<li><a href="#text-underline-position-property"><span class="secno">2.6</span> <span class="content">
Text Underline Position: the <span class="property">text-underline-position</span> property</span></a>
</ul>
<li><a href="#emphasis-marks"><span class="secno">3</span> <span class="content">
Emphasis Marks</span></a>
<ul class="toc">
<li><a href="#text-emphasis-style-property"><span class="secno">3.1</span> <span class="content">
Emphasis Mark Style: the <span class="property">text-emphasis-style</span> property</span></a>
<li><a href="#text-emphasis-color-property"><span class="secno">3.2</span> <span class="content">
Emphasis Mark Color: the <span class="property">text-emphasis-color</span> property</span></a>
<li><a href="#text-emphasis-property"><span class="secno">3.3</span> <span class="content">
Emphasis Mark Shorthand: the <span class="property">text-emphasis</span> property</span></a>
<li><a href="#text-emphasis-position-property"><span class="secno">3.4</span> <span class="content">
Emphasis Mark Position: the <span class="property">text-emphasis-position</span> property</span></a>
</ul>
<li><a href="#text-shadow-property"><span class="secno">4</span> <span class="content">
Text Shadows: the <span class="property">text-shadow</span> property</span></a>
<li><a href="#painting-order"><span class="secno">5</span> <span class="content">
Painting Order of Text Decorations</span></a>
<li><a href="#acknowledgements"><span class="secno"></span> <span class="content">
Appendix A: Acknowledgements</span></a>
<li><a href="#changes"><span class="secno"></span> <span class="content">Appendix B:
Changes</span></a>
<ul class="toc">
<li><a href="#recent-changes"><span class="secno"></span> <span class="content">
Changes since the <span>January 2013 Last Call Working Draft</span></span></a>
</ul>
<li><a href="#default-stylesheet"><span class="secno"></span> <span class="content">
Appendix C: Default UA Stylesheet</span></a>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<ul class="toc">
<li><a href="#conventions"><span class="secno"></span> <span class="content">
Document conventions</span></a>
<li><a href="#conformance-classes"><span class="secno"></span> <span class="content">
Conformance classes</span></a>
<li><a href="#partial"><span class="secno"></span> <span class="content">
Partial implementations</span></a>
<li><a href="#experimental"><span class="secno"></span> <span class="content">
Experimental implementations</span></a>
<li><a href="#testing"><span class="secno"></span> <span class="content">
Non-experimental implementations</span></a>
</ul>
<li><a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul></div>
<main>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">
Introduction</span><a class="self-link" href="#intro"></a></h2>
<p><em>This subsection is non-normative.</em>
</p>
<p>This module covers text decoration, i.e. decorating the glyphs
of the text once typeset according to font and typographic rules.
(See <a data-link-type="biblio" href="#biblio-css3text">[CSS3TEXT]</a> and <a data-link-type="biblio" href="#biblio-css3-fonts">[CSS3-FONTS]</a>.)
Such features are traditionally used not only for purely decorative purposes,
but also in some cases to show emphasis, for honorifics,
and to indicate editorial changes such as insertions, deletions, and misspellings.
</p>
<p>CSS Levels 1 and 2 only defined very basic <a href="#line-decoration">line decorations</a>
(underlines, overlines, and strike-throughs)
appropriate to Western typographical traditions.
Level 3 of this module adds the ability to change
the color, style, position, and continuity of these decorations,
and also introduces
<a href="#emphasis-marks">emphasis marks</a> (traditionally used in East Asian typography),
and <a href="#text-shadow-property">shadows</a> (which were proposed then deferred from Level 2).
</p>
<h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content">
Module Interactions</span><a class="self-link" href="#placement"></a></h3>
<p>This module replaces and extends the text-decorating
features defined in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> chapter 16.
</p>
<h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </span><span class="content">
Values</span><a class="self-link" href="#values"></a></h3>
<p>This specification follows the
<a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
definition conventions</a> from <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>. Value types not defined in
this specification are defined in CSS Level 2 Revision 1 <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.
Other CSS modules may expand the definitions of these value types: for
example <a data-link-type="biblio" href="#biblio-css3color">[CSS3COLOR]</a>, when combined with this module, expands the
definition of the <color> value type as used in this specification.</p>
<p>In addition to the property-specific values listed in their definitions,
all properties defined in this specification also accept the
<a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
keyword as their property value. For readability it has not been repeated
explicitly.
</p>
<h3 class="heading settled" data-level="1.3" id="terms"><span class="secno">1.3. </span><span class="content">Terminology</span><a class="self-link" href="#terms"></a></h3>
<p>The terms <dfn data-dfn-type="dfn" data-noexport="" id="character"><a href="http://www.w3.org/TR/css3-text/#grapheme-cluster">character</a><a class="self-link" href="#character"></a></dfn>,
<dfn data-dfn-type="dfn" data-noexport="" id="letter"><a href="http://www.w3.org/TR/css3-text/#letter">letter</a><a class="self-link" href="#letter"></a></dfn>, and
<dfn data-dfn-type="dfn" data-noexport="" id="content-language"><a href="http://www.w3.org/TR/css3-text/#content-language">content language</a><a class="self-link" href="#content-language"></a></dfn>
as used in this specification are defined in <a data-link-type="biblio" href="#biblio-css3text">[CSS3TEXT]</a>.
Other terminology and concepts used in this specification are defined
in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> and <a data-link-type="biblio" href="#biblio-css3-writing-modes">[CSS3-WRITING-MODES]</a>.
</p>
<h2 class="heading settled" data-level="2" id="line-decoration"><span class="secno">2. </span><span class="content">
Line Decoration: Underline, Overline, and Strike-Through</span><a class="self-link" href="#line-decoration"></a></h2>
<p>
The following properties describe line decorations that are added to the content of an element.
When specified on or propagated to an inline box,
that box becomes a <dfn data-dfn-type="dfn" data-noexport="" id="decorating-box">decorating box<a class="self-link" href="#decorating-box"></a></dfn> for that decoration,
applying the decoration to all its fragments.
The decoration is then further propagated to any in-flow block-level boxes that split the inline
(see <a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level">CSS2.1 section 9.2.1.1</a>).
When specified on or propagated to a block container that establishes an inline formatting context,
the decorations are propagated to an anonymous inline box that wraps all the in-flow inline-level children of the block container.
When specified on or propagated to a ruby box,
the decorations are propagated only to the ruby base.
For all other box types,
the decorations are propagated to all in-flow children.
</p>
<p class="note" role="note">
Note that text decorations are not propagated to any out-of-flow descendants,
nor to the contents of atomic inline-level descendants such as inline blocks and inline tables.
They are also not propagated to inline children of inline boxes,
although the decoration is <em>applied</em> to such boxes.
</p>
<p>
By default underlines, overlines, and line-throughs are applied only to non-replaced inline boxes,
and are drawn across all text (including white space, letter spacing, and word spacing).
Atomic inlines, such as images, are not decorated.
The <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-skip">text-decoration-skip</a> property can be used to modify this behavior,
for example allowing atomic inlines to be underlined
or requiring that white space be skipped.
Margins, borders, and padding of the <i>decorating box</i> are always skipped.
</p>
<p>Relatively positioning a descendant moves all text decorations
applied to it along with the descendant’s text; it does not affect
calculation of the decoration’s initial position on that line.
The <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/visufx.html#propdef-visibility">visibility</a> property, <a class="property" data-link-type="propdesc" href="#propdef-text-shadow">text-shadow</a>, filters, and other graphical transformations
likewise affect text decorations as part of the text they’re drawn on,
even if the decorations were specified on an ancestor box,
and do not affect the calculation of their initial positions or thicknesses.
(In the case of line decorations drawn over an atomic inline
or across the margins/borders/padding of a non-replaced inline box,
they are analogously associated with the affected atomic inline / non-replaced inline box
rather than with the <i>decorating box</i>.)
</p>
<div class="example" id="example-0cf84204"><a class="self-link" href="#example-0cf84204"></a>
<p>In the following style sheet and document fragment:</p>
<pre> blockquote { text-decoration: underline; color: blue; }
em { display: block; }
cite { color: fuchsia; }</pre>
<pre> <blockquote>
<p>
<span>
Help, help!
<em> I am under a hat! </em>
<cite> —GwieF </cite>
</span>
</p>
</blockquote></pre>
<p>...the underlining for the blockquote element is propagated to an
anonymous inline box that surrounds the span element, causing
the text "Help, help!" to be blue, with the blue underlining from
the anonymous inline underneath it, the color being taken from the
blockquote element. The <code><em>text</em></code>
in the em block is also underlined, as it is in an in-flow block to
which the underline is propagated. The final line of text is fuchsia,
but the underline underneath it is still the blue underline from the
anonymous inline element.</p>
<p><img alt="Sample rendering of the above underline example" src="underline-example.png"></p>
<p>This diagram shows the boxes involved in the example above. The
rounded aqua line represents the anonymous inline element wrapping
the inline contents of the paragraph element, the rounded blue line
represents the span element, and the orange lines represent the
blocks.</p>
</div>
<h3 class="heading settled" data-level="2.1" id="text-decoration-line-property"><span class="secno">2.1. </span><span class="content">
Text Decoration Lines: the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-line">text-decoration-line</a> property</span><a class="self-link" href="#text-decoration-line-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-decoration-line">text-decoration-line<a class="self-link" href="#propdef-text-decoration-line"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>none | [ underline || overline || line-through || blink ]
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no (but see prose)
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
</table>
<p>Specifies what line decorations, if any, are added to the element.
Values have the following meanings:</p>
<dl>
<dt><dfn class="css" data-dfn-for="text-decoration-line" data-dfn-type="value" data-export="" id="valdef-text-decoration-line-none">none<a class="self-link" href="#valdef-text-decoration-line-none"></a></dfn>
<dd>Neither produces nor inhibits text decoration.
<dt><dfn class="css" data-dfn-for="text-decoration-line" data-dfn-type="value" data-export="" id="valdef-text-decoration-line-underline">underline<a class="self-link" href="#valdef-text-decoration-line-underline"></a></dfn>
<dd>Each line of text is underlined.
<dt><dfn class="css" data-dfn-for="text-decoration-line" data-dfn-type="value" data-export="" id="valdef-text-decoration-line-overline">overline<a class="self-link" href="#valdef-text-decoration-line-overline"></a></dfn>
<dd>Each line of text has a line over it (i.e. on the opposite
side from an underline).
<dt><dfn class="css" data-dfn-for="text-decoration-line" data-dfn-type="value" data-export="" id="valdef-text-decoration-line-line-through">line-through<a class="self-link" href="#valdef-text-decoration-line-line-through"></a></dfn>
<dd>Each line of text has a line through the middle.
<dt><dfn class="css" data-dfn-for="text-decoration-line" data-dfn-type="value" data-export="" id="valdef-text-decoration-line-blink">blink<a class="self-link" href="#valdef-text-decoration-line-blink"></a></dfn>
<dd>
The text blinks (alternates between visible and invisible).
Conforming user agents may simply not blink the text.
Note that not blinking the text is one technique to satisfy <a href="http://www.w3.org/TR/UAAG/guidelines.html#tech-on-off-blinking-text">checkpoint 3.3 of WAI-UAAG</a>.
This value is <strong>deprecated</strong> in favor of Animations <a data-link-type="biblio" href="#biblio-css3-animations">[CSS3-ANIMATIONS]</a>.
</dl>
<h3 class="heading settled" data-level="2.2" id="text-decoration-color-property"><span class="secno">2.2. </span><span class="content">
Text Decoration Color: the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-color">text-decoration-color</a> property</span><a class="self-link" href="#text-decoration-color-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-decoration-color">text-decoration-color<a class="self-link" href="#propdef-text-decoration-color"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td><a href="http://www.w3.org/TR/css3-color/#color0"><span class="value-inst-color"><color></span></a>
<tr>
<th>Initial:
<td><a href="http://www.w3.org/TR/css3-color/#currentcolor">currentColor</a>
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>the computed color
<tr>
<th>Animatable:
<td>as <a href="http://www.w3.org/TR/css3-transitions/#animtype-color">color</a>
</table>
<p>This property specifies the color of text decoration (underlines
overlines, and line-throughs) set on the element with
<a class="property" data-link-type="propdesc" href="#propdef-text-decoration-line">text-decoration-line</a>.</p>
<p>
The color of text decorations must remain the same on all decorations originating from a given element,
even if descendant boxes have different specified colors.
</p>
<h3 class="heading settled" data-level="2.3" id="text-decoration-style-property"><span class="secno">2.3. </span><span class="content">
Text Decoration Style: the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-style">text-decoration-style</a> property</span><a class="self-link" href="#text-decoration-style-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-decoration-style">text-decoration-style<a class="self-link" href="#propdef-text-decoration-style"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>solid | double | dotted | dashed | wavy
<tr>
<th>Initial:
<td>solid
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
</table>
<p>This property specifies the style of the line(s) drawn for
text decoration specified on the element. Values have the
same meaning as for the
<a href="http://www.w3.org/TR/css3-background/#the-border-style">border-style
properties</a> <a data-link-type="biblio" href="#biblio-css3bg">[CSS3BG]</a>. <span class="css">wavy</span> indicates a wavy line.</p>
<p>
The style of text decorations must remain the same on all decorations originating from a given element,
even if descendant boxes have different specified styles.
</p>
<h3 class="heading settled" data-level="2.4" id="text-decoration-property"><span class="secno">2.4. </span><span class="content">
Text Decoration Shorthand: the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration">text-decoration</a> property</span><a class="self-link" href="#text-decoration-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-decoration">text-decoration<a class="self-link" href="#propdef-text-decoration"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td><var><a class="production" data-link-type="propdesc" href="#propdef-text-decoration-line"><‘text-decoration-line’></a></var> ||
<var><a class="production" data-link-type="propdesc" href="#propdef-text-decoration-style"><‘text-decoration-style’></a></var> ||
<var><a class="production" data-link-type="propdesc" href="#propdef-text-decoration-color"><‘text-decoration-color’></a></var>
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>see individual properties
<tr>
<th>Animatable:
<td>see individual properties
</table>
<p>This property is a shorthand for setting <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-line">text-decoration-line</a>,
<a class="property" data-link-type="propdesc" href="#propdef-text-decoration-color">text-decoration-color</a>, and <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-style">text-decoration-style</a> in one declaration.
Omitted values are set to their initial values. A <a class="property" data-link-type="propdesc" href="#propdef-text-decoration">text-decoration</a>
declaration that omits both the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-color">text-decoration-color</a>
and <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-style">text-decoration-style</a> values is backwards-compatible
with CSS Levels 1 and 2.</p>
<div class="example" id="example-496701f7"><a class="self-link" href="#example-496701f7"></a>
<p>The following example underlines unvisited links with a solid blue
underline in CSS1 and CSS2 UAs and a navy dotted underline in CSS3 UAs.</p>
<pre><code>:link {
color: blue;
text-decoration: underline;
text-decoration: navy dotted underline; /* <a href="http://www.w3.org/TR/CSS21/syndata.html#ignore">Ignored</a> in CSS1/CSS2 UAs */
}</code></pre>
</div>
<h3 class="heading settled" data-level="2.5" id="text-decoration-skip-property"><span class="secno">2.5. </span><span class="content">
Text Decoration Line Continuity: the <a class="property" data-link-type="propdesc" href="#propdef-text-decoration-skip">text-decoration-skip</a> property</span><a class="self-link" href="#text-decoration-skip-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-decoration-skip">text-decoration-skip<a class="self-link" href="#propdef-text-decoration-skip"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>none | [ objects || spaces || ink || edges || box-decoration ]
<tr>
<th>Initial:
<td>objects
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
</table>
<p class="note" role="note">Note: Level 4 of this specification
defines additional values (<span class="css">leading-spaces</span> and <span class="css">trailing-spaces</span>),
and uses them in the initial value of this property.
At the time of writing,
this is experimental and may still change,
which is why it has not been incorporated into this level.</p>
<p>This property specifies what parts of the element’s content
any text decoration affecting the element must skip over. It
controls all text decoration lines drawn by the element
and also any text decoration lines drawn by its ancestors.
Values have the following meanings:</p>
<dl>
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-none">none<a class="self-link" href="#valdef-text-decoration-skip-none"></a></dfn>
<dd>Skip nothing: text-decoration is drawn for all text content
and across atomic inline-level boxes.
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-objects">objects<a class="self-link" href="#valdef-text-decoration-skip-objects"></a></dfn>
<dd>Skip this element (its entire margin box) if it is an atomic inline
(such as an image or inline-block).
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-spaces">spaces<a class="self-link" href="#valdef-text-decoration-skip-spaces"></a></dfn>
<dd>Skip all spacing, i.e. all <i>characters</i> with the Unicode White_Space property <a data-link-type="biblio" href="#biblio-uax44">[UAX44]</a>
and all <a href="http://www.w3.org/TR/css3-text/#word-separator">word separators</a>,
plus any adjacent <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-text-3/#propdef-letter-spacing">letter-spacing</a> or <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-text-3/#propdef-word-spacing">word-spacing</a>.
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-ink">ink<a class="self-link" href="#valdef-text-decoration-skip-ink"></a></dfn>
<dd>Skip over where glyphs are drawn:
interrupt the decoration line to let the shape of the text show through
where the text decoration would otherwise cross over a glyph.
The UA must skip a small distance to either side of the glyph outline.
<div class="figure">
<p><img alt="An alphabetic underline through Myanmar text skips around descenders and the vertical strokes of combining characters that drop below the alphabetic baseline." src="decoration-skip-ink.png" title="text-decoration-skip: ink">
</p>
<p class="caption"><a class="css" data-link-type="propdesc" href="#propdef-text-decoration-skip">text-decoration-skip: ink</a></p>
</div>
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-edges">edges<a class="self-link" href="#valdef-text-decoration-skip-edges"></a></dfn>
<dd>The UA should place the start and end of the line inwards slightly
(e.g. by half a line thickness)
from the content edge of the <i>decorating box</i> so that,
e.g. two underlined elements side-by-side do not appear to have a single underline.
(This is important in Chinese, where underlining is a form of punctuation.)
<div class="figure">
<p><img alt="An underline below a series of Chinese characters has a gap between two adjacent underlining elements." src="decoration-skip-edges.png" title="text-decoration-skip: edges">
</p>
<p class="caption"><a class="css" data-link-type="propdesc" href="#propdef-text-decoration-skip">text-decoration-skip: edges</a> for <code><u>石井</u><u>艾俐俐</u></code>
</p>
</div>
<dt><dfn class="css" data-dfn-for="text-decoration-skip" data-dfn-type="value" data-export="" id="valdef-text-decoration-skip-box-decoration">box-decoration<a class="self-link" href="#valdef-text-decoration-skip-box-decoration"></a></dfn>
<dd>
Skip over the box’s margin, border, and padding areas.
Note that this only has an effect on decorations imposed by an ancestor;
a <i>decorating box</i> never draws over its own box decoration.
</dl>
<p class="note" role="note">Note that this property inherits and that descendant
elements can have a different setting.</p>
<p class="note" role="note">
Note that CSS 2.1 required skipping margins, borders, and padding always.
In this level, by default only the margins, borders, and padding of the <i>decorating box</i> are skipped.
In the future CSS2.1 may be updated to match this new default.
</p>
<h3 class="heading settled" data-level="2.6" id="text-underline-position-property"><span class="secno">2.6. </span><span class="content">
Text Underline Position: the <a class="property" data-link-type="propdesc" href="#propdef-text-underline-position">text-underline-position</a> property</span><a class="self-link" href="#text-underline-position-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-underline-position">text-underline-position<a class="self-link" href="#propdef-text-underline-position"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>auto | [ under || [ left | right ] ]
<tr>
<th>Initial:
<td>auto
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
</table>
<p>This property sets the position of an underline specified on the element.
(It does not affect underlines specified by ancestor elements.)
If <a class="css" data-link-type="maybe" href="#underline-left">left</a> or <a class="css" data-link-type="maybe" href="#underline-right">right</a> is specified alone,
<a class="css" data-link-type="maybe" href="#underline-under">under</a> is also implied.
</p>
<div class="example" id="example-affafc32"><a class="self-link" href="#example-affafc32"></a>