-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.src.html
More file actions
executable file
·2553 lines (2161 loc) · 117 KB
/
Overview.src.html
File metadata and controls
executable file
·2553 lines (2161 loc) · 117 KB
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 PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!-- the command line to process is this is:
num -l 2 template.html | toc -l 2 | perl bin/htmlindex | perl \
bin/propindex | perl bin/addcite -r '' template.html \
>template-processed.html
To do: add longdesc
-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Language" content="en">
<meta name="author" lang="tr" content="Tantek Çelik">
<title>CSS Basic User Interface Module Level 3 (CSS3 UI)</title>
<link href="default.css" rel="stylesheet" type="text/css" title="Default">
<style type="text/css">
.subtoc ul,.subtoc ol { list-style-type: none }
ol.objectives { list-style: decimal }
ol.issues { list-style: decimal }
.html4ss { font-size:90%}
table.twod { border: solid 2px #777; font-family:sans-serif; font-size:9px }
table.twod td { border: solid 1px #777; font-family:sans-serif; font-size:9px }
table.twod th { font-size:10px; font-weight:bold }
h1 {font-size:200%; clear:both}
h2 {font-size:170%; clear:both}
h3 {font-size:150%; clear:both}
h4 {font-size:130%}
h5 {font-size:120%}
h6 {font-size:110%}
h1+h2 {page-break-before: avoid}
h2 {page-break-before: always}
dd p:first-child { margin-top:0 }
table.tprofile th.title {background:gray; color:white}
table.tprofile th { width:29%;padding:2px }
table.tprofile td { width:71%;padding:2px }
table#egappearance td:first-child { text-align:center; line-height:1.5 }
table#egappearance label { white-space:nowrap }
table#egappearance fieldset { line-height:1.4 }
table#egappearance legend { line-height:1.1 }
</style>
<link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-ED">
</head>
<body>
<div class="head">
<a href="http://www.w3.org/"><img height="48" width="72" alt="W3C"
src="http://www.w3.org/Icons/w3c_home">
</a>
<h1>CSS Basic User Interface Module Level 3</h1>
<h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
<dl>
<dt>This version:</dt>
<!-- <dd><a href="http://www.w3.org/TR/[YEAR]/[STATUS]-[SHORTNAME]-[CDATE]">http://www.w3.org/TR/[YEAR]/[STATUS]-[SHORTNAME]-[CDATE]</a></dd> -->
<dd><a href="http://dev.w3.org/csswg/css3-ui/">http://dev.w3.org/csswg/css3-ui/</a></dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/[SHORTNAME]">http://www.w3.org/TR/[SHORTNAME]</a></dd>
<dt>Latest editor's draft:</dt>
<dd><a href="http://dev.w3.org/csswg/css3-ui/">http://dev.w3.org/csswg/css3-ui/</a></dd>
<dt>Issues list:</dt>
<dd><a href="http://wiki.csswg.org/spec/css3-ui">http://wiki.csswg.org/spec/css3-ui</a></dd>
<dt>Previous version:</dt>
<dd><a href="http://www.w3.org/TR/2004/CR-css3-ui-20040511/">http://www.w3.org/TR/2004/CR-css3-ui-20040511/</a></dd>
<dt>Editor:</dt>
<dd class="vcard"><span lang="tr" class="fn">Tantek Çelik</span>
(<a class="company role url" href="http://tantek.com/">invited expert</a>,
and before at <a href="http://www.microsoft.com/">Microsoft Corporation</a>)
<<a class="email"
href="mailto:tantek@cs.stanford.edu">tantek@cs.stanford.edu</a>>
</dd>
</dl>
<!--copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id="abstract">Abstract</h2>
<p>This section is <em>informative</em>.</p>
<p>CSS (Cascading Style Sheets) is a language for describing the rendering of
HTML and XML documents on screen, on paper, in speech, etc. It uses various selectors, properties and values to style basic user interface elements in a document. This specification describes those user interface related selectors, properties and values that are proposed for CSS level 3 to style HTML and XML (including XHTML and XForms). It includes and extends user interface related features from the selectors, properties and values of CSS level 2 revision 1 and Selectors specifications.
</p>
<h2 style="page-break-before:auto" class="no-num no-toc" id="status">Status of this document</h2>
<!--status-->
<p>This specification is a <strong>Last Call Working
Draft</strong>, although it was previously a Candidate Recommendation.
It has been returned to Last Call Working Draft because this draft removes
features that were not implemented sufficiently to advance to Proposed
Recommendation, and had not been previously listed as at risk, as <a
href="http://www.w3.org/2005/10/Process-20051014/tr.html#cfi">required</a>
by the W3C Process.
<!-- This specification may advance directly to Proposed
Recommendation following the last call, depending on comments and
implementation reports. -->
All persons are encouraged to review this
document and send comments to the <a
href="http://lists.w3.org/Archives/Public/www-style/">www-style
mailing list</a> as described above. The <strong>deadline for
comments</strong> is
<strong>SOMETIME IN THE FUTURE AFTER A PUBLIC LCWD IS PUBLISHED</strong>.
</p>
<h3 class="no-num no-toc" id="crec">Candidate Recommendation Exit Criteria</h3>
<p>For this specification to enter the Proposed Recommendation stage,
the following conditions shall be met:</p>
<ol>
<li>
<p>There must be at least two interoperable implementations
for every feature. For the purposes of this criterion,
we define the following terms:</p>
<dl>
<dt>feature</dt>
<dd>
<p>
A section or subsection of the specification.
</p>
</dd>
<dt>interoperable</dt>
<dd>
<p>passing the respective test cases in the test suite, or,
if the implementation is not a web browser, equivalent tests.
Every relevant test in the test suite should have an equivalent
test created if such a user agent (UA) is to be used to claim interoperability.
In addition if such a UA is to be used to claim interoperability,
then there must one or more additional UAs which can also pass
those equivalent tests in the same way for the purpose of
interoperability. The equivalent tests must be made publicly
available for the purposes of peer review.</p>
</dd>
<dt>implementation</dt>
<dd>
<p>a user agent which:</p>
<ol class=inline>
<li>implements the feature.</li>
<li>is available (i.e. publicly downloadable or available
through some other public point of sale mechanism). This is the
"show me" requirement.</li>
<li>is shipping (i.e. development, private or unofficial
versions are insufficient).</li>
<li>is not experimental (i.e. is intended for a wide audience
and could be used on a daily basis).</li>
</ol>
</dd>
</dl>
</li>
<li><p>A minimum of six months of the CR period must have elapsed.
This is to ensure that enough time is given for any remaining major
errors to be caught.</p></li>
<li><p>The CR period will be extended if implementations are slow to
appear.</p></li>
<li><p>Features that are <em>at risk</em> (see the below list) will be dropped (thus reducing the list of "all" features mentioned above) if two or more
interoperable implementations of those features are not found by
the end of the CR period, or if sufficient and adequate
tests (by judgment of the Working Group) have not been produced for
those features by the end of the CR period.</p></li>
</ol>
<p>A <a href="/Style/CSS/Test/">test suite</a> and a <a
href="/Style/css3-updates/css3-ui-implementations">report on
implementations</a> will be provided before the document becomes a
Proposed Recommendation.
</p>
<h3 class="no-num no-toc" id="atrisk">Features at risk</h3>
<p>The Working Group has identified the following features as at risk of being removed from CSS Basic User Interface Module Level 3 when exiting CR. Implementors are urged to implement these features, if they wish to see these features remain in this specification. All other features are either defined in a normative reference (e.g. CSS 2.1 [[!CSS21]] or Selectors [[!SELECT]]), or dependencies for another specification (e.g. XForms [[XFORMS10]]) or are believed to have one or more implementations (perhaps experimental), and thus will not be dropped without returning to last call.</p>
<ul>
<!-- Not at risk:
<li>CSS2.1: :hover :active :focus</li>
<li>Selectors: :enabled :disabled :checked :indeterminate ::selection</li>
<li>XForms needs: :default :valid :invalid :in-range :out-of-range :required :optional :read-only :read-write ::value ::choices ::repeat-item ::repeat-index</li>
<li>appearance:
Moz implements:
checkbox tab tooltip window dialog menubar
none(same as normal) button(same as push-buttom) radio(same as radio-button) menupopup(same as pop-up-menu) menuitem(same as menu-item)
checkboxcontainer(same as checkbox-group?) radiocontainer(same as radio-group?)
treeview(same as outline-tree?) textfield(same as field) menulist(same as list-menu?) slider(same as range?) menulist(same as pull-down-menu?)
listbox? listitem?
hyperlink (with a different mechanism?)
XForms asked for and/or needs:
combo-box signature password
Required generic values:
icon button menu
Necessary to replace old CSS3 Color values, so they can be deprecated
document workspace desktop
</li>
<li>box-sizing implemented by IE5/Mac, Opera
-moz-box-sizing implemented by Mozilla
</li>
<li>outline, outline-width, outline-color, outline-style all in CSS 2.1</li>
<li>outline-offset property
implemented by Safari 1.2
</li>
<li>cursor property:
CSS2.1: auto | default | help | pointer | wait | crosshair | text |
e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize
IE5/Mac implements: none | progress | cell
IE6/Windows implements: <uri> | progress | not-allowed | no-drop | vertical-text | all-scroll | col-resize | row-resize | move |
Mozilla implements: progress | cell(as -moz-cell) | alias(as -moz-alias) | copy(as -moz-copy) | context-menu(as -moz-context-menu) |
freedesktop.org copied all the cursors from the CSS3-UI LC Working Draft
by FredrikHoeglund - 14 Oct 2003
http://freedesktop.org/Standards/cursor-spec
</li>
<li>'cursor' property values: ew-resize | ns-resize | nesw-resize | nwse-resize
implemented by Firefox and Safari
</li>
<li>pointer-events property:
implemented by Firefox 3.6 and later, Safari 4 and later, Opera v?
</li>
<li>nav-* properties
implemented by Opera, Tasman v1 internal implementation
required (depended on) by DVB-HTML, ATSC standards
</li>
<li>'resize' property
implemented by Firefox 4 and Safari
</li>
-->
<li>'font' property values: window | document | workspace | desktop | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password
</li>
<li>'content' property value: icon</li>
<li>'icon' property</li>
</ul>
<h2 class="no-num no-toc" id="summary">Overview</h2>
<p>This section is <em>informative</em>.</p>
<p>This document is one of the "modules" for the upcoming CSS3
specification. It not only describes the user interface related
properties and values that already exist in
<a href="http://www.w3.org/TR/REC-CSS1">CSS1</a> [[CSS1]]
and <a href="http://www.w3.org/TR/CSS21">CSS2.1</a> [[!CSS21]], but introduces
new properties and values for CSS3 as well.
The Working Group doesn't expect that all implementations of CSS3 will implement
all properties or values. Instead, there will probably be a small number of variants of CSS3, so-called "profiles".
</p>
<p>This document is the result of the merging of relevant parts of
the following Recommendations and Working Drafts, and the addition of some new features.
</p>
<ul>
<li>Cascading Style Sheets, level 2, revision 1 [[!CSS21]]</li>
<li>User Interface for CSS3 (16 February 2000) [[CSSUI]]</li>
</ul>
<p>This specification contains:
</p>
<ul>
<li>Pseudo-classes and pseudo-elements to style
user interface states and element fragments respectively.
</li>
<li>Additions to the user interface features in
<a href="http://www.w3.org/TR/CSS21">CSS2.1</a>.</li>
<li>The ability to style the appearance of various standard
form elements in languages such as HTML/XHTML/XForms (and
properties to augment or replace some of the remaining stylistic attributes in HTML4/XHTML1).</li>
<li>Directional focus navigation properties.</li>
<li>A mechanism to allow the styling of elements as icons for accessibility.</li>
</ul>
<h2 class="no-num no-toc" id="contents">Table of contents</h2>
<!--toc-->
<hr>
<h2 id="intro">Introduction</h2>
<p>This section is <em>normative</em>.</p>
<p>
CSS3 is a set of modules, divided up and profiled in order to
simplify the specification, and to allow implementors the flexibility of supporting the particular modules appropriate for their implementations.
</p>
<p>
This module describes selectors and CSS properties which enable authors
to style user interface related states, element fragments, properties
and values.
</p>
<p><a href="http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes">Section 2.1 of CSS1</a> [[CSS1]]
and <a href="http://www.w3.org/TR/CSS2/ui.html">Chapter 18 of CSS2</a> [[CSS2]]
introduced several user interface related pseudo-classes, properties and values.
<a href="http://www.w3.org/TR/css3-selectors/#UIstates">Section 6.6.4 of Selectors</a> [[!SELECT]] also describes several additional user interface related pseudo-classes (and one pseudo-element).
</p>
<p>
This Working Draft extends them to provide the ability, through CSS,
to style elements based upon additional user interface states,
to style fragments of user interface elements, and to alter the
dynamic presentation of elements in ways previously only available through specific HTML4/XHTML1 elements and attributes.
</p>
<h3 id="purpose">Purpose</h3>
<p>The purpose of this specification is to achieve the following objectives:
</p>
<ul>
<li>Extend the user interface features in CSS2.1.</li>
<li>Provide additional CSS mechanisms to simulate the appearance
of various standard form elements.</li>
<li>Provide additional CSS mechanisms to augment or replace other
dynamic presentation related features in HTML4/XHTML1.</li>
<li>Introduce directional navigation properties to assist in the construction of
user interfaces which make use of a directional navigation model.</li>
<li>Introduce properties and values to specify icon presentations for
elements to enhance accessibility.</li>
</ul>
<h3 id="scope">Scope</h3>
<p>This proposal specifies how to alter the look and feel of various elements,
and specifically does not address the meaning behind what a specific look and feel may imply.
For example, with the additions in the proposal, an author can make any element look and even feel like a submit button. Yet, that arbitrary element is not afforded any additional meaning,
so pushing it does nothing by default, and certainly does not submit a form.
</p>
<p>
Similarly, the HTML4 <code><SELECT></code> element for example, provides a list or menu of choices to the user.
The meaning of the HTML4 <code><SELECT></code> element is that it allows the user to make a choice, to choose
something among several alternatives. This says nothing about its look and feel, and
in fact, the "concept" of a HTML4 <code><SELECT></code> could be visually implemented as a list-box,
a popup-menu, or a group of radio-buttons.
Or a group of HTML4 checkboxes (<code><INPUT type="checkbox"></code>) could be styled to appear as a group of radio-buttons, and yet, since those elements are still semantic checkboxes, they can still be individually checked or unchecked, rather than acquiring any kind of radio-button group semantic where only one can be checked.
</p>
<p>
Each example of presentation has a different look and feel, but maintains its original meaning, a choice (or choices) among several alternatives.
This proposal addresses only the former (look and feel), not the latter (meaning).
</p>
<p>
Since this proposal serves to simulate the appearance of various user interface and forms elements in HTML4/XHTML, it is perhaps useful to call out what specifically is believed to be outside the scope of CSS, or better suited to document structure rather than style and therefore not addressed by this proposal:
</p>
<ul>
<li>Form semantics, including, but not limited to, submission, resetting,
naming, what determines a successful or valid form control,
and how to process form data.
</li>
<li>Form contents, including, but not limited to initial value, current value, and form content types. The HTML4 '<code>maxlength</code>' attribute, for example, determines the maximum number of characters the user can enter into an <code><INPUT type="text"></code> or <code><INPUT type="password"></code> field, and as such is a content constraint rather than a presentational suggestion.
</li>
<li>Form control dependencies, including, but not limited to, whether only one option from a set of choices may be chosen, or whether multiple options may be chosen.
</li>
<li>The HTML4/XHTML1 <code><form></code> element and its unique attributes ('<code>action</code>', '<code>method</code>', '<code>enctype</code>', '<code>accept</code>', '<code>accept-charset</c
8027
ode>').
</li>
</ul>
<p>In addition, this document does not attempt to solve all user interface
related issues / features that can be found in modern user interfaces. Perhaps future versions may attempt to solve these. For example:
</p>
<ul><li>Complex or composite controls (e.g. the HTML4 <code><INPUT type="file"></code> and the <code><ISINDEX></code> elements).</li>
<li>The appearance, styling and coloring of scrollbars.</li>
<li>Window layering. There is no attempt made to distinguish the appearance
of elements in the front-most window versus non-front-most windows.
The semantics of window layering must be addressed
before it is appropriate to attempt to style such concepts.</li>
<li>Palettes and floating windows. Along with the concept of "frontmost" window, windows that float but do not receive focus are also not addressed.</li>
<li>Browser window chrome and toolbars.</li>
<li>The default styling of the HTML4/XHTML1 <code><fieldset></code>, <code><legend></code>, <code><frame></code> and <code><frameset></code> elements.</li>
<li>Frame-resizing behavior. The behavior of <code><frame></code> and <code><frameset></code>, specifically the ability to "share" resizability when elements share a border, perhaps by leveraging the border-collapse property is also not addressed.
</li>
</ul>
<h2>Conformance</h2>
<p>This section is <em>normative</em>.</p>
<h3>Definitions</h3>
<p>The key words <span class="index-def" title="MUST">"MUST"</span>,
<span class="index-def" title="MUST NOT">"MUST NOT"</span>, <span
class="index-def" title="REQUIRED">"REQUIRED"</span>, <span
class="index-def" title="SHALL">"SHALL"</span>, <span
class="index-def" title="SHALL NOT">"SHALL NOT"</span>, <span
class="index-def" title="SHOULD">"SHOULD"</span>, <span
class="index-def" title="SHOULD NOT">"SHOULD NOT"</span>, <span
class="index-def" title="RECOMMENDED">"RECOMMENDED"</span>, <span
class="index-def" title="MAY">"MAY"</span>, and <span
class="index-def" title="OPTIONAL">"OPTIONAL"</span> in this document
are to be interpreted as described in RFC 2119 (see [[!RFC2119]]).
However, for readability, these words do not typically appear in all uppercase
letters in this specification.
</p>
<p>Additional key words, e.g. "User agent (UA)", are <a href="http://www.w3.org/TR/CSS21/conform.html#q1">defined by CSS 2.1</a> ([[!CSS21]], section 3.1).</p>
<h3>Classes of products</h3>
<p>The following classes of products (many of which overlap) should consider implementing this specification:</p>
<ul>
<li>Web browsers</li>
<li>User agents that implement one or more of the following types of content: HTML (e.g. [[HTML401]]), XHTML (e.g. [[XHTML10]], [[XHTML11]]), XForms (e.g. [[XFORMS10]]), SVG (e.g. [[SVG10]], [[SVG11]]) or other content languages that contain forms controls or are intended for user interaction</li>
<li>User agents that implement one or more levels, modules and or profiles of CSS (e.g. [[CSS1]], [[!CSS21]])</li>
</ul>
<h3>Profiles</h3>
<p>This specification contains a number of informative profiles. These profiles are not mandatory for conformance.</p>
<h3>Extensions</h3>
<p>This specification does not define any explicit extension mechanisms. If an implementation needs to extend the functionality of this specification, it must follow any/all guidelines and requirements of extensions as defined in CSS2.1, e.g. <a href="http://www.w3.org/TR/CSS21/syndata.html#q4">Vendor-specific extensions</a> ([[!CSS21]], section 4.1.2).
</p>
<h2>Dependencies on other modules</h2>
<p>This section is <em>normative</em>.</p>
<p>This CSS3 module depends on the following other specifications. Some of these specifications may be in their "Candidate Recommendation" phase. If this module depends on feature or portion of such a specification which ends up being dropped during their "CR" phase(s), then such feature or portion thereof will be presumed to be incorporated into this specification. For example, if the ":indeterminate" selector was dropped from Selectors, then the definition and description of ":indeterminate" would be incorporated into the next draft of this specification.</p>
<ul>
<li>[[!SELECT]]</li>
<li>[[!CSS3COLOR]]</li>
<li>[[!CSS21]]</li>
</ul>
<!--
<p>It has non-normative (informative) references to the following
other specifications:</p>
<ul>
</ul>
-->
<p>
The following work is related to the CSS Basic User Interface Module Level 3 (CSS3 Basic UI).
</p>
<ul>
<li>[[HTML401]]</li>
<li>[[UAAG10]]</li>
<li>[[XML10]]</li>
<li>[[XHTML10]]</li>
<li>[[XHTML11]]</li>
<li>[[XFORMS10]]</li>
</ul>
<p>This specification does not define what is a form element.</p>
<h2>User Interface Selectors</h2>
<p>This section is <em>normative</em>.</p>
<h3 id="pseudo-classes">User interface states: pseudo-classes</h3>
<p>The Selectors specification <a href="http://www.w3.org/TR/css3-selectors/#UIstates">defines several user interface selectors</a> ([[!SELECT]], sections 6.6.1 and 6.6.4) which represent
user interface states:</p>
<ul><li id="psuedo-hover"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:hover</a></li>
<li id="pseudo-active"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:active</a></li>
<li id="pseudo-focus"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:focus</a></li>
<li id="pseudo-enabled"><a href="http://www.w3.org/TR/css3-selectors/#enableddisabled">:enabled</a></li>
<li id="pseudo-disabled"><a href="http://www.w3.org/TR/css3-selectors/#enableddisabled">:disabled</a></li>
<li id="pseudo-checked"><a href="http://www.w3.org/TR/css3-selectors/#checked">:checked</a></li>
<li id="pseudo-indeterminate"><a href="http://www.w3.org/TR/css3-selectors/#indeterminate">:indeterminate</a></li>
</ul>
<p>These pseudo-classes as defined by [[!SELECT]] are included in this specification by reference.</p>
<p>CSS 2.1 [[!CSS21]] specifies additional details for some of the selectors mentioned, above and beyond Selectors.
</p>
<h4 id="active">:active details</h4>
<p>In addition, on systems with more than one mouse button, :active is clarified to apply only to the primary or primary activation button (typically the "left" mouse button), and any
10477
aliases thereof.</p>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">restyling a checkbox</h4>
<p>
Authors may wish to completely redo the styling of a form control, such as a checkbox. This can be achieved using several of the above pseudo-classes and the '<span class="value">normal</span>' value for the <span class="property">'appearance'</span> property which is explained later in this specification. In this example, checkboxes with a class of "redone" are styled with specific background images according to their respective user interface states using one or more pseudo-classes.
</p>
<pre><code class="css">
input[type=checkbox] {
appearance:checkbox; /* expected from UA defaults */
}
input[type=checkbox].redone {
appearance:normal; /* resets various properties */
display:inline-block;
width:20px; height:20px;
background:url(customuncheckedimage.png);
}
input[type=checkbox].redone:active {
background:url(customuncheckedactiveimage.png);
}
input[type=checkbox].redone:checked {
background:url(customcheckedimage.png);
}
input[type=checkbox].redone:checked:active {
background:url(customcheckedactiveimage.png);
}
input[type=checkbox].redone:disabled {
background:url(customdisableduncheckedimage.png);
}
input[type=checkbox].redone:disabled:checked {
background:url(customdisabledcheckedimage.png);
}
</code></pre>
</div>
<h4 class="no-num no-toc">New user interface state pseudo-classes</h4>
<p>In addition to the above-mentioned pseudo-classes, this specification introduces several new pseudo-classes to define additional user interface states.
</p>
<ul><li>:default</li>
<li>:valid</li>
<li>:invalid</li>
<li>:in-range</li>
<li>:out-of-range</li>
<li>:required</li>
<li>:optional</li>
<li>:read-only</li>
<li>:read-write</li>
</ul>
<p>Specifically, these new states (except for :default) are provided as a way to style elements which are in the respective states as defined by XForms [[XFORMS10]].</p>
<h4 id="pseudo-default">:default</h4>
<p>The :default selector applies to the one or more UI elements that are the default among a set of similar elements. Typically applies to context menu items, buttons and select lists/menus.
</p>
<p>
One example is the default submit button among a set of buttons. Another example is the default option from a popup menu. Multiple elements in a select-many group could have multiple :default elements, like a selection of pizza toppings for example.
</p>
<h4 id="pseudo-validity"><span id="pseudo-valid">:valid</span>
and <span id="pseudo-invalid">:invalid</span></h4>
<p>An element is :valid or :invalid when it is,
respectively, valid or invalid with respect to data validity semantics
defined by a different specification (e.g. [[XFORMS10]]).
An element which lacks data validity semantics is neither :valid nor :invalid. This is different from an element which otherwise has no constraints. Such an element would always be :valid.
</p>
<h4 id="pseudo-range"><span id="pseudo-in-range">:in-range</span> and <span id="pseudo-out-of-range">:out-of-range</span></h4>
<p>
The :in-range and :out-of-range pseudo-classes apply only to elements that have range limitations. An element is :in-range or :out-of-range when the value that the element is bound to is in range or out of range of the presentation (e.g. visual or spoken representation) of the element respectively. An element that lacks data range limits or is not a form control is neither :in-range nor
:out-of-range. E.g. a slider element with a value of 11 presented as a slider control that only represents the values from 1-10 is :out-of-range. Another example is a menu element with a value of "E" that happens to be presented as a popup menu that only has choices "A", "B" and "C".
</p>
<h4 id="pseudo-required-value"><span id="pseudo-required">:required</span>
and <span id="pseudo-optional">:optional</span></h4>
<p>A form element is :required or :optional if a value for it
is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.
</p>
<h4 id="pseudo-ro-rw"><span id="pseudo-read-only">:read-only</span>
and <span id="pseudo-read-write">:read-write</span></h4>
<p>An element whose contents are not user-alterable is :read-only.
However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents,
most elements are :read-only. However it may be possible (e.g. in the context of an editor) for any element to become :read-write.</p>
<h3 id="pseudo-elements">User interface element fragments: pseudo-elements</h3>
<p>Selectors ([[!SELECT]], section 7.3) also defines one user interface element fragment selector:</p>
<ul><li id="pseudo-selection"><a href="http://www.w3.org/TR/css3-selectors/#selection">::selection</a></li>
</ul>
<p>This pseudo-element is included in this specification as defined by [[!SELECT]] by reference.</p>
<p>In addition to the above-mentioned pseudo-element, this specification introduces four new pseudo-elements to provide access to additional user interface element fragments.
</p>
<ul><li>::value</li>
<li>::choices</li>
<li>::repeat-item</li>
<li>::repeat-index</li>
</ul>
<p>Specifically, these new pseudo-elements are provided as a way to style user interface fragments as defined by XForms [[XFORMS10]].</p>
<h4 id="pseudo-value">::value</h4>
<p>A form element may contain both a label for its data value,
and the data value itself. For such elements, the ::value pseudo-element
selects the representation of just the data value itself, in order to
style its appearance.
</p>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">fictional markup and illustration</h4>
<p>
Here is an example which illustrates the ::value of a text input field with fictional markup which is then styled with CSS.
</p>
<h5 class="no-num no-toc">sample XForms fragment with fictional markup:</h5>
<pre><code>
<input>
<label>Zip code<label>
<em><input::value/></em>
</input>
</code></pre>
<h5 class="no-num no-toc">sample CSS:</h5>
<pre><code class="css">
input { border:dashed }
label { border:dotted }
input::value { border:solid }
</code></pre>
<h5 class="no-num no-toc">an HTML+CSS approximation of this example</h5>
<p>
<span style="border:dashed;display:inline-block;padding:10px">
<label
style="border:dotted;display:inline-block;padding:2px;margin:0;font-size:1em"
>Zip code</label>
<input type="text"
style="border:solid;display:inline-block;padding:2px;margin:0;font-size:1em"
value="94117">
</span>
</p>
<p>Spacing (in the form of padding) has been added to the above approximation to separate the borders and make the individual (pseudo-)elements easier to distinguish.
</p>
</div>
<p>The ::value pseudo-element is similar to an inline-level element, but with certain restrictions.
The following properties apply to <code>::value</code>
pseudo-element: font properties, color property, background properties,
'word-spacing', 'letter-spacing', 'text-decoration', 'vertical-align',
'text-transform', 'line-height'. UAs may apply other properties as well.
</p>
<h4 id="pseudo-choices">::choices</h4>
<p>Similarly, a form element which represents a list of options may contain
both a label for the list, and the list of choices itself. For such elements, the ::choices pseudo-element selects the representation of just the list of choices themselves, in order to style their appearance.
</p>
<p>A list of radio buttons can also be selected with the ::choices pseudo-element, and the currently chosen radio button can be selected with the ::value pseudo-element.</p>
<h4 id="pseudo-repeat-item">::repeat-item</h4>
<p>
The ::repeat-item pseudo-element represents a single item from a repeating sequence. It is generated as a parent to all the elements in a single repeating item. Each ::repeat-item is associated with a particular instance data node, and is affected by the model item properties (e.g. '<code>relevant</code>') found there, as the related style properties will cascade to the child elements.
</p>
<h4 id="pseudo-repeat-index">::repeat-index</h4>
<p>
The ::repeat-index pseudo-element represents the current item of a repeating sequence. It takes the place of the ::repeat-item as a parent of all the elements in the index repeating item.
</p>
<div class="note"><p>
<em><strong>Note.</strong>
Any style declarations that an author wants to apply to all repeat items, including the index, must be done so by using both ::repeat-item and ::repeat-index selectors. Styles that are only applied to ::repeat-item will not automatically be applied to the respective ::repeat-index.
</em></p>
</div>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">::repeat-item and ::repeat-index fictional markup</h4>
<p>
Here is an example that illustrates both ::repeat-item and ::repeat-index, since they are often both available and used at the same time. Assume appropriate namespace declarations were made in a header somewhere preceding the code in the example.
</p>
<p>The following markup snippet uses XHTML and XForms:</p>
<pre><code lang="x-xhtml">
<html:table xforms:repeat-nodeset="...">
<html:tr>
<html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
</html:tr>
</html:table>
</code></pre>
<p>
The following style rules are used to style all the repeated items and the current repeated item.
</p>
<pre><code class="css" lang="x-css">
html|tr::repeat-item { outline: medium solid; color:gray }
html|tr::repeat-index { outline: medium dashed; color:black }
</code></pre>
<p>
The following fictional markup shows the state of the above markup when through user interaction the XForm contains three of the repeated items, where the third item is current.
</p>
<pre><code lang="x-xhtml">
<html:table xforms:repeat-nodeset="...">
<em><html:tr::repeat-item></em>
<html:tr>
<html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
</html:tr>
<em></html:tr::repeat-item></em>
<em><html:tr::repeat-item></em>
<html:tr>
<html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
</html:tr>
<em></html:tr::repeat-item></em>
<em><html:tr::repeat-index></em>
<html:tr>
<html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
</html:tr>
<em></html:tr::repeat-index></em>
</html:table>
</code></pre>
</div>
<div class="note"><p>
<em><strong>Note.</strong>
The ::repeat-index pseudo-element takes the place of the ::repeat-item rather than being nested inside as a separate element. Thus just like :link or :visited are mutually exclusive for selecting hyperlinks, only one will exist and apply to a particular repeated item at any point.</em></p>
</div>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">UI selectors example from XForms 1.0</h4>
<p>
The following <a href="http://www.w3.org/TR/xforms/sliceF.html#id2645356">example from XForms 1.0</a> ([[XFORMS10]], section F.3) shows how basic styling can be accomplished on form controls and repeating structures using the new pseudo-classes and XForms elements.
</p>
<pre><code class="css">
<
78D5
div>
@namespace xforms url(http://www.w3.org/2002/xforms);
/* Display a red background on all invalid form controls */
*:invalid { background-color:red; }
/* Display a red asterisk after all required form controls */
*:required::after { content: "*"; color:red; }
/* Do not render non-relevant form controls */
*:disabled { visibility: hidden; }
/* The following declarations cause form controls and their labels
to align neatly, as if a two-column table were used */
xforms|group { display: table; }
xforms|input { display: table-row; }
xforms|input > xforms|label { display: table-cell; }
xforms|input::value { border: thin black solid; display: table-cell; }
/* Display an alert message when appropriate */
*:valid > xforms|alert { display: none; }
*:invalid > xforms|alert { display: inline; }
/* Display repeat-items with a dashed border */
*::repeat-item,*::repeat-index { border: dashed; }
/* Display a teal highlight behind the current repeat item */
*::repeat-index { background-color: teal; }
</code></pre>
</div>
<h2>System Appearance</h2>
<p>This section is <em>normative</em>.</p>
<h3 id="appearance-val">Appearance values</h3>
<p>
CSS2 introduced the concept of system colors, which is a set of keywords that allows authors to specify colors in a manner that integrates them into the user's graphic environment. However, color is not the only property for which native form controls have a default.
</p>
<p>The properties defined and extended in this section refer to the <dfn><appearance></dfn> value type, which may take one of the following values which have been derived from the <a href="http://www.w3.org/TR/CSS21/ui.html#system-colors">list of CSS2.1 System Colors</a> ([[!CSS21]], section 18.2), the list of <a href="http://www.w3.org/TR/html401/interact/forms.html">HTML4 form controls</a> ([[HTML401]], section 17), and additional typical platform user interface (UI) controls (e.g. dialog window, icon):
</p>
<dl>
<dt><strong title="">icon</strong></dt>
<dd>a small picture representing an object, often with a name or label.</dd>
<dt><strong>window</strong></dt>
<dd>a viewport, a framed surface used to present objects and content for user viewing and interaction. There are several specific types of windows:
<dl><dt><strong>desktop</strong></dt>
<dd>a window used to represent a system as a whole that often contains other windows.</dd>
<dt><strong>workspace</strong></dt>
<dd>a window used to represent a project or application that may contain other windows, typically with a titlebar that shows the name of the project or application.</dd>
<dt><strong>document</strong></dt>
<dd>a window used to represent a user document, typically with a titlebar that shows its name. May also be used to represent folders or directories in a file system.</dd>
<dt><strong>tooltip</strong></dt>
<dd>a window that is used to temporarily display information or help about an object. Also called "info" in the CSS2 system colors.</dd>
<dt><strong>dialog</strong></dt>
<dd>a window used to present a notification or alternatives for the user to choose as part of an action taken by the user. Also called "message-box" in the CSS2 system fonts.</dd>
</dl>
</dd>
<dt><strong>button</strong></dt>
<dd>a small object usually labeled with text that represents a user choice
<dl><dt><strong>push-button</strong></dt>
<dd>a button that has a border surrounding it, often beveled to appear three dimensional, as if it is raised. Also called "caption" in CSS2 system fonts.</dd>
<dt><strong>hyperlink</strong></dt>
<dd>a button that represents a hypertext link, often as simple as normal text that is underlined and perhaps colored differently.</dd>
<dt><strong>radio-button</strong></dt>
<dd>a button that displays whether or not it is checked with a small circle next to the button label. There may be a disc inside the circle when the button is checked. An indeterminate (neither checked nor unchecked) state may be indicated with some other graphic in the circle.</dd>
<dt><strong>checkbox</strong></dt>
<dd>a button that displays whether or not it is checked with a small box next to the button label. There may be an 'x' or check mark inside the box when the button is checked. An indeterminate (neither checked nor unchecked) state may be indicated with a dash '-' or a square or some other graphic in the box.</dd>
<dt><strong>menu-item</strong></dt>
<dd>a choice within a menu, which may also act as a label for a nested (hierarchical) menu.</dd>
<dt><strong>tab</strong></dt>
<dd>a button representing the label for a pane in a tabbed interface.</dd>
</dl>
</dd>
<dt><strong>menu</strong></dt>
<dd>a set of options for the user to choose from, perhaps more than one at a time. There are several specific types of menus.
<dl><dt><strong>menubar</strong></dt>
<dd>a menu of menus, typically arranged linearly, in a horizontal bar.</dd>
<dt><strong>pull-down-menu</strong></dt>
<dd>a menu where the name of the menu is displayed and the options remain hidden until the user activates the menu. When the user releases or deactivates the menu, the options are hidden again.</dd>
<dt><strong>pop-up-menu</strong></dt>
<dd>a menu where all but the currently selected option remains hidden until the user activates the menu. When the user releases or deactivates the menu, all but the selected option are hidden again.</dd>
<dt><strong>list-menu</strong></dt>
<dd>a list of options for the user to choose from, perhaps more than one at a time.</dd>
<dt><strong>radio-group</strong></dt>
<dd>a menu where the options are displayed as radio-buttons.</dd>
<dt><strong>checkbox-group</strong></dt>
<dd>a menu where the options are displayed as checkboxes.</dd>
<dt><strong>outline-tree</strong></dt>
<dd>a menu where the options can be shown or hidden with small widgets, often represented by a small triangle or plus and minus signs.</dd>
<dt><strong>range</strong></dt>
<dd>a control that displays the current option, perhaps graphically and allows the user to select other options, perhaps by dragging a slider or turning a knob.</dd>
</dl>
</dd>
<dt><strong>field</strong></dt>
<dd>an area provided for a user to enter or edit a value, typically using a keyboard. There are several special fields.
<dl><dt><strong>combo-box</strong></dt>
<dd>a field which is accompanied by a menu of preset values that can be used to quickly enter common or typical values.</dd>
<dt><strong>signature</strong></dt>
<dd>a field for entering a signature.</dd>
<dt><strong>password</strong></dt>
<dd>a field for entering a password. Typically the text is rendered as a set of bullets or boxes to obscure the value.</dd>
</dl>
</dd>
</dl>
<p>
Conforming user agents must support the five generic appearance values: '<span class="value" title="">icon</span>', '<span class="value">window</span>', '<span class="value">button</span>', '<span class="value">menu</span>' and '<span class="property">field</span>'. If a user agent or platform does not support a specific user interface element (e.g. '<span class="value">dialog</span>'), it may apply the values for the respective generic user interface element (e.g. '<span class="value">window</span>').
</p>
<p class="note"><em><strong>Note.</strong>
This specification recommends that user agents allow users to override system appearance and font selections with their own choices or proportions, within the user agent. See the User Agent Accessibility Guidelines, specifically <a href="http://www.w3.org/TR/UAAG10/guidelines.html#gl-user-control-styles">Ensure user control of rendering</a> ([[UAAG10]], section 2 guideline 4).
</em>
</p>
<h3 id="appearance"><span class="property">'appearance'</span> property</h3>
<table class="propdef"><tbody>
<tr><th>Name:</th><td><dfn>appearance</dfn></td></tr>
<tr><th>Value: </th><td>normal | <a href="#appearance-val"><appearance></a> | inherit</td></tr>
<tr><th>Initial:</th><td>normal</td></tr>
<tr><th>Applies to:</th><td>all elements</td></tr>
<tr><th>Inherited:</th><td>no</td></tr>
<tr><th>Percentages:</th><td>N/A</td></tr>
<tr><th>Media:</th><td>visual, interactive</td></tr>
<tr><th>Computed value:</th><td>specified value</td></tr>
</tbody></table>
<p>This document introduces the <span class="property">'appearance'</span> property which can be used to make an element look like a standard user interface element on the platform.
</p>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">A few <span class="property">'appearance'</span> values demonstrated using HTML4</h4>
<table border="1" id="egappearance">
<thead><tr><th style="width:10em"><span class="property">'appearance'</span></th><th>HTML4 demonstration</th></tr></thead>
<tbody>
<tr><td>normal</td><td><span>hello</span></td></tr>
<tr><td>button</td><td><button>Search</button></td></tr>
<tr><td>push-button</td><td><input type="button" value="Sign up"></td></tr>
<tr><td>hyperlink</td><td><a href="http://www.w3.org/Style/CSS/">CSS home page</a></td></tr>
<tr><td>radio-button</td><td><input type="radio" id="sticky"><label for="sticky">Sticky</label></td></tr>
<tr><td>checkbox</td><td><input type="checkbox" id="giftwrap"><label for="giftwrap">Gift wrap</label></td></tr>
<tr><td>pop-up-menu</td><td><label for="pophoney">Honey</label> <select id="pophoney" size="1">
<option>Water White</option>
<option>Extra White</option>
<option>White</option>
<option>Extra Light Amber</option>
<option>Light Amber</option>
<option selected>Amber</option>
<option>Dark Amber</option>
</select>
</td></tr>
<tr><td>list-menu</td><td>
<label for="listhoney">Honey</label> <select id="listhoney" size="5">
<option>Water White</option>
<option>Extra White</option>
<option>White</option>
<option>Extra Light Amber</option>
<option>Light Amber</option>
<option selected>Amber</option>
<option>Dark Amber</option>
</select>
</td>
</tr>
<tr><td>radio-group</td><td>
<fieldset><legend>tea</legend>
<input type="radio" name="teachoice" id="earl" checked><label for="earl">Earl Grey</label>
<input type="radio" name="teachoice" id="lemon"><label for="lemon">lemon ginger</label>
<input type="radio" name="teachoice" id="green"><label for="green">green tea</label>
<input type="radio" name="teachoice" id="jasmine"><label for="jasmine">jasmine tea</label>
</fieldset>
</td>
</tr>
<tr><td>checkbox-group</td><td>
<fieldset><legend>pizza toppings</legend>
<input type="checkbox" id="freshbasil"><label for="freshbasil">fresh basil</label>
<input type="checkbox" id="freshgarlic"><label for="freshgarlic">fresh garlic</label>
<input type="checkbox" id="freshspinach"><label for="freshspinach">fresh spinach</label>
<input type="checkbox" id="greenpeppers"><label for="greenpeppers">green peppers</label>
<input type="checkbox" id="mushroom" checked><label for="mushroom">mushrooms</label>
<input type="checkbox" id="olives"><label for="olives">olives</label>
<input type="checkbox" id="onions" checked><label for="onions">onions</label>
<input type="checkbox" id="pineapple"><label for="pineapple">pineapple</label>
<input type="checkbox" id="tomatoes" checked><label for="tomatoes">tomatoes</label>
</fieldset>
</td>
</tr>
<tr><td>field</td><td><textarea rows="3" cols="20">Note to self.</textarea></td></tr>
<tr><td>password</td><td><input type="password" value="secret"></td></tr>
</tbody>
</table>
</div>
<h4 class="no-num no-toc"><span class="property">'appearance'</span> property details</h4>
<p>
The <span class="property">'appearance'</span> property is a shorthand for <span class="property">'appearance</span>', <span class="property">'color</span>', <span class="property">'font</span>',
and <span class="property">'cursor</span>'. It sets <span class="property">'appearance'</span> to the specified value and the other
properties to their appropriate system value; '<span class="value">normal</span>' resets
<span class="property">'appearance'</span> to '<span class="value">normal</span>' and the others to '<span class="value">inherit</span>'. The <span class="property">'appearance'</span> property does not affect the specified or computed values of any other
properties.
</p><p>
If <span class="property">'appearance'</span> is not '<span class="value">normal</span>', the UA must render the element as if
it was the specified user interface (UI) control from the platform. The UA should use the
computed values of the <span class="property">'background-*'</span>, <span class="property">'border-*'</span>, <span class="property">'padding-*'</span>,
<span class="property">'outline-*'</span>, and <span class="property">'text-decoration'</span> properties when they do not have
their initial values and the computed values of <span class="property">'color'</span>, <span class="property">'font'</span>, and
<span class="property">'cursor'</span> (whatever their values) to influence the rendering where
possible. Any values from those properties that cannot be used to
influence the rendering of the UI control must not affect the rendering at all.
</p><p class="example">
For example, the UA should not draw a second border around a
UI control that already has a border.
</p><p>
If <span class="property">'background-color'</span> or <span class="property">'background-image'</span> have non-initial values
and the UA is using their values for influencing the rendering of
the UI control, then the UA must ensure that the <span class="property">'color'</span> property is
also used to influence the rendering.
<!--
Similarly if <span class="property">'color'</span> is used to influence the rendering, then <span class="property">'background-color'</span> must be used to influence the rendering, and the other <span class="property">'background-*'</span> properties should be used to influence the rendering as well.
-->
</p><p>
Other properties must not affect the handling of <span class="property">'appearance'</span> and
must instead be applied according to normal CSS rules. In particular
<span class="property">'margin'</span>, <span class="property">'display'</span>, <span class="property">'float'</span>, <span class="property">'height'</span>, <span class="property">'width'</span>, and <span class="property">'line-height'</span>,
are not ignored and affect the element as normal.
</p><p>
This specification does not define the term "platform".
</p><p class="example">
For example, it could be the native graphical rendering engine of
the operating system, or it could be a user-agent-specific skin.
In addition, which of several toolkits to use could also be
decided on an element-by-element basis depending on the values of
the <span class="property">'background-color'</span>, <span class="property">'background-image'</span>, <span class="property">'border-*-style'</span>, and
<span class="property">'outline-style'</span> properties, so that the author styles could be
honored while still honoring <span class="property">'appearance'</span> even though the UA is
unable to influence the rendering of OS native UI controls.
</p>
<p class="note"><em><strong>Note.</strong>
The exact list of properties set by, influencing, and not affected by
<span class="property">'appearance'</span> given in the lists above
may be adjusted based on UA implementor feedback.
</em></p>
<p>Appearance values take into account the user interface state (if any) of the element; thus there is no need for separate values for enabled vs. disabled checkboxes for example.
</p>
<div class="example"><p style="display:none">Example(s):</p>
<h4 class="no-num no-toc">Influencing the color and background-color of a button</h4>
<p>This example demonstrates setting the color and background-color of an element that is set to '<code class="css">appearance:push-button</code>'.
</p>
<h5 class="no-num no-toc">sample CSS:</h5>
<pre><code class="css">
input[type=button] {
appearance:push-button; /* expected from UA defaults */
}
input[type=button].custom {
color: #393;
background-color: #9cf;
}
</code></pre>
<h5 class="no-num no-toc">sample HTML fragment:</h5>
<pre><code>
<input type="button" value="Plain button" />
<input type="button" value="With color" class="custom" />
</code></pre>
<h5 class="no-num no-toc">A graphical browser might render these buttons as follows:</h5>
<p><object type="image/png" data="plainbutton.png">
First, a rounded button with black text on a white background, with shades of gray being used near the edges to give the impression of depth.
</object>