Thu, 07 Feb 2013 23:25:50 -0800
[css3-ui] Add "Animatable:" lines to propdef tables.
Note that the line for nav-index matches the current value, which may
be incorrect (number vs. integer).
Required manual adjustment for preprocessor (pre- and post-processing)
to deal with New Value(s): line for 'content' property.
The Animatable lines are as resolved in Tucson face-to-face at
2013-02-04 11:40:47 -0700, and edited by me per discussion starting at
2013-02-05 11:11:38 -0700.
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
4 <html><head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <meta http-equiv="Content-Style-Type" content="text/css">
7 <meta http-equiv="Content-Language" content="en">
8 <meta name="author" lang="tr" content="Tantek Çelik">
9 <title>CSS Basic User Interface Module Level 3 (CSS3 UI)</title>
10 <link href="../default.css" rel="stylesheet" type="text/css" title="Default">
11 <style type="text/css">
12 .subtoc ul,.subtoc ol { list-style-type: none }
13 ol.objectives { list-style: decimal }
14 ol.issues { list-style: decimal }
15 .html4ss { font-size:90%}
16 h1 {font-size:200%; clear:both}
17 h2 {font-size:170%; clear:both}
18 h3 {font-size:150%; clear:both}
19 h4 {font-size:130%}
20 h5 {font-size:120%}
21 h6 {font-size:110%}
22 h1+h2 {page-break-before: avoid}
23 h2 {page-break-before: always}
24 dd p:first-child { margin-top:0 }
26 </style>
27 <link rel="stylesheet" type="text/css"
28 href="http://www.w3.org/StyleSheets/TR/W3C-ED">
29 <!-- toggle to W3C-WD for TR publication, W3C-ED for editing -->
30 </head>
31 <body class="h-entry">
33 <div class="head">
34 <a href="http://www.w3.org/"><img height="48" width="72" alt="W3C"
35 src="http://www.w3.org/Icons/w3c_home">
36 </a>
38 <h1 class="p-name">CSS Basic User Interface Module Level 3 (CSS3 UI)</h1>
40 <h2 class="no-num no-toc">[LONGSTATUS] <time class="dt-updated" datetime="[CDATE]">[DATE]</time></h2>
41 <dl>
42 <dt>This version:</dt>
43 <!-- TR "This version". Update "WD" below as needed to CR/PR/REC -->
44 <!-- <dd><a href="http://www.w3.org/TR/[YEAR]/WD-[SHORTNAME]-[CDATE]/">
45 http://www.w3.org/TR/[YEAR]/WD-[SHORTNAME]-[CDATE]/</a>
46 </dd> -->
47 <!-- editor's draft "This version" -->
48 <dd><a class="u-url" href="http://dev.w3.org/csswg/css3-ui/">
49 http://dev.w3.org/csswg/css3-ui/</a>
50 </dd>
51 <dt>Latest version:</dt>
52 <dd><a href="http://www.w3.org/TR/[SHORTNAME]/"
53 >http://www.w3.org/TR/[SHORTNAME]/</a></dd>
55 <dt>Editor's draft:</dt>
56 <dd><a href="http://dev.w3.org/csswg/css3-ui/"
57 >http://dev.w3.org/csswg/css3-ui/</a></dd>
59 <dt>Previous version:</dt>
60 <dd><a rel="previous"
61 href="http://www.w3.org/TR/2012/WD-css3-ui-20120117/"
62 >http://www.w3.org/TR/2012/WD-css3-ui-20120117/</a></dd>
64 <dt>Issues list:</dt>
65 <dd><a rel="issues" href="http://wiki.csswg.org/spec/css3-ui"
66 >http://wiki.csswg.org/spec/css3-ui</a></dd>
68 <dt>Discussion:</dt>
69 <dd><a href="mailto:www-style@w3.org?subject=%5B[SHORTNAME]%5D%20feedback"
70 >www-style@w3.org</a>
71 with subject line “<kbd>[[SHORTNAME]]
72 <var>… message topic …</var></kbd>”
73 (<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/"
74 >archives</a>)
75 </dd>
77 <dt>Editor:</dt>
78 <dd class="p-author h-card vcard">
79 <a lang="tr" class="p-name fn u-url url" rel="author"
80 href="http://tantek.com">
81 Tantek Çelik</a>
82 (<a class="company h-org org" href="http://www.mozilla.org/">Mozilla
83 Foundation</a>,
84 and before at
85 <a href="http://www.microsoft.com/">Microsoft Corporation</a>)
86 <<a class="u-email email" href="mailto:tantek@cs.stanford.edu"
87 >tantek@cs.stanford.edu</a>>
88 </dd>
89 </dl>
91 <!--copyright-->
93 <hr title="Separator for header">
95 </div>
97 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
99 <p>This section is <em>informative</em>.</p>
101 <p>CSS (Cascading Style Sheets) is a language for describing
102 the rendering of HTML and XML documents on screen, on paper, in speech, etc.
103 It uses various selectors, properties and values to style basic user interface elements in a document.
104 <span class="p-summary">
105 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).
106 It includes and extends user interface related features from the selectors, properties and values of CSS level 2 revision 1 and Selectors specifications.
107 </span>
108 </p>
110 <h2 style="page-break-before:auto" class="no-num no-toc" id="status">Status of this document</h2>
112 <!--status-->
114 <p>This specification is a <strong>Last Call Working
115 Draft</strong>, although it was previously a Candidate Recommendation.
116 It has been returned to Last Call Working Draft
117 because this draft removes features
118 that were not implemented sufficiently to advance
119 to Proposed Recommendation,
120 and had not been previously listed as at risk,
121 as <a href="http://www.w3.org/2005/10/Process-20051014/tr.html#cfi"
122 >required</a>
123 by the W3C Process.
124 This draft also adds a couple of new properties and values.
125 See <a href="#changes">Appendix C. Changes</a> for further details.
126 <!-- This specification may advance directly to Proposed
127 Recommendation following the last call, depending on comments and
128 implementation reports. -->
129 All persons are encouraged to review this
130 document and send comments to the <a
131 href="http://lists.w3.org/Archives/Public/www-style/">www-style
132 mailing list</a> as described above. The <strong>deadline for
133 comments</strong>
134 is four weeks after the date of publication in the header or
135 14 February 2012, whichever is sooner.
136 </p>
138 <h3 class="no-num no-toc" id="crec">Candidate Recommendation Exit Criteria</h3>
140 <p>For this specification to enter the Proposed Recommendation stage,
141 the following conditions shall be met:</p>
143 <ol>
144 <li>
145 <p>There must be at least two interoperable implementations
146 for every feature. For the purposes of this criterion,
147 we define the following terms:</p>
148 <dl>
149 <dt>feature</dt>
150 <dd>
151 <p>
152 A section or subsection of the specification.
153 </p>
154 </dd>
155 <dt>interoperable</dt>
156 <dd>
157 <p>passing the respective test cases in the test suite, or,
158 if the implementation is not a web browser, equivalent tests.
159 Every relevant test in the test suite should have an equivalent
160 test created if such a user agent (UA) is to be used to claim interoperability.
161 In addition if such a UA is to be used to claim interoperability,
162 then there must one or more additional UAs which can also pass
163 those equivalent tests in the same way for the purpose of
164 interoperability. The equivalent tests must be made publicly
165 available for the purposes of peer review.</p>
166 </dd>
167 <dt>implementation</dt>
168 <dd>
169 <p>a user agent which:</p>
170 <ol class=inline>
171 <li>implements the feature.</li>
172 <li>is available (i.e. publicly downloadable or available
173 through some other public point of sale mechanism). This is the
174 "show me" requirement.</li>
175 <li>is shipping (i.e. development, private or unofficial
176 versions are insufficient).</li>
177 <li>is not experimental (i.e. is intended for a wide audience
178 and could be used on a daily basis).</li>
179 </ol>
180 </dd>
181 </dl>
182 </li>
183 <li><p>A minimum of six months of the CR period must have elapsed.
184 This is to ensure that enough time is given for any remaining major
185 errors to be caught.</p></li>
186 <li><p>The CR period will be extended if implementations are slow to
187 appear.</p></li>
188 <li><p>Features that are <em>at risk</em> (see the below list)
189 will be dropped (thus reducing the list of "all" features
190 mentioned above)
191 if two or more interoperable implementations of those features
192 are not found by the end of the CR period,
193 or if sufficient and adequate tests
194 (by judgment of the Working Group)
195 have not been produced
196 for those features by the end of the CR period.</p></li>
197 </ol>
199 <p>A <a href="/Style/CSS/Test/">test suite</a> and a <a
200 href="/Style/css3-updates/css3-ui-implementations">report on
201 implementations</a> will be provided before the document becomes a
202 Proposed Recommendation.
203 </p>
206 <h3 class="no-num no-toc" id="atrisk">Features at risk</h3>
208 <p>The Working Group has identified the following features as at risk
209 of being removed from CSS Basic User Interface Module Level 3
210 when exiting CR.
211 Implementors are urged to implement these features,
212 if they wish to see these features remain in this specification.
213 All other features are either defined in a normative reference
214 (e.g. CSS 2.1 [[!CSS21]] or Selectors [[!SELECT]])
215 or are believed to have two or more implementations,
216 and thus will not be dropped without returning to last call.</p>
217 <ul>
218 <!--
219 At risk due to only one implementation, or obsolete dependency:
220 XForms is defunct on the web.
221 <li>XForms needs: :default :valid :invalid :in-range :out-of-range :required :optional :read-only :read-write ::value ::choices ::repeat-item ::repeat-index</li>
223 <li>box-sizing: padding-box - only FF supports in prefixed version</li>
225 <li>ime-mode: new - not sure about IE5+ vs FF3+ interop
226 </li>
228 <li>nav-index, nav-up, nav-down, nav-right, nav-left, properties
229 implemented for sure only by Opera, http://www.opera.com/docs/specs/presto22/#css
230 possibly obsolete: Tasman v1 internal implementation
231 possibly current: MSTV Tasman
232 required (depended on) by non-web DVB-HTML, ATSC standards
233 - unknown if any DVB-HTML or ATSC simulators
234 </li>
236 Not at risk:
237 <li>CSS2.1: :hover :active :focus</li>
238 <li>Selectors: :enabled :disabled :checked</li>
239 <li>:indeterminate implemented by FF3.6, IE9, Opera 10.6, Saf3</li>
241 <li>box-sizing implemented by IE5/Mac, Opera
242 -moz-box-sizing implemented by Mozilla
243 </li>
244 <li>outline, outline-width, outline-color, outline-style all in CSS 2.1</li>
245 <li>outline-offset property
246 implemented by Safari 1.2
247 </li>
248 <li>cursor property:
249 CSS2.1: auto | default | help | pointer | wait | crosshair | text |
250 e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize
251 IE5/Mac implements: none | progress | cell
252 IE6/Windows implements: <uri> | progress | not-allowed | no-drop | vertical-text | all-scroll | col-resize | row-resize | move |
253 Mozilla implements: progress | cell(as -moz-cell) | alias(as -moz-alias) | copy(as -moz-copy) | context-menu(as -moz-context-menu) |
254 freedesktop.org copied all the cursors from the CSS3-UI LC Working Draft
255 by FredrikHoeglund - 14 Oct 2003
256 http://freedesktop.org/Standards/cursor-spec
257 </li>
258 <li>'cursor' property values: ew-resize | ns-resize | nesw-resize | nwse-resize
259 implemented by Firefox and Safari
260 </li>
261 <li>'resize' property
262 implemented by Firefox 4 and Safari
263 </li>
264 -->
265 <li>::value ::choices ::repeat-item ::repeat-index pseudo-elements</li>
266 <li>'box-sizing' property value: padding-box</li>
267 <li>'content' property value: icon</li>
268 <li>'icon' property</li>
269 <li>'ime-mode' property</li>
270 <li>'nav-index', 'nav-up', 'nav-down', 'nav-right', 'nav-left'
271 properties</li>
272 <li>'text-overflow' property value: <string></li>
273 <li>'text-overflow' property 2-value syntax and definition.</li>
274 </ul>
278 <h2 class="no-num no-toc" id="summary">Overview</h2>
280 <p>This section is <em>informative</em>.</p>
282 <p>This document is one of the "modules" for the upcoming CSS3
283 specification. It not only describes the user interface related
284 properties and values that already exist in
285 <a href="http://www.w3.org/TR/REC-CSS1">CSS1</a> [[CSS1]]
286 and <a href="http://www.w3.org/TR/CSS21">CSS2.1</a> [[!CSS21]], but introduces
287 new properties and values for CSS3 as well.
288 The Working Group doesn't expect that all implementations of CSS3 will implement
289 all properties or values. Instead, there will probably be a small number of variants of CSS3, so-called "profiles".
290 </p>
292 <p>This document is the result of the merging of relevant parts of
293 the following Recommendations and Working Drafts, and the addition of some new features.
294 </p>
295 <ul>
296 <li>Cascading Style Sheets, level 2, revision 1 [[!CSS21]]</li>
297 <li><a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> [[CSSUI]]</li>
298 </ul>
300 <p>This specification contains:
301 </p>
302 <ul>
303 <li>Pseudo-classes and pseudo-elements to style
304 user interface states and element fragments respectively.
305 </li>
306 <li>Additions to the user interface features in
307 <a href="http://www.w3.org/TR/CSS21">CSS2.1</a>.</li>
308 <li>Directional focus navigation properties.</li>
309 <li>A mechanism to allow the styling of elements as icons for accessibility.</li>
310 </ul>
313 <h2 class="no-num no-toc" id="contents">Table of contents</h2>
315 <!--toc-->
317 <hr>
319 <h2 id="intro">Introduction</h2>
321 <p>
322 CSS3 is a set of modules, divided up and profiled in order to
323 simplify the specification,
324 and to allow implementors the flexibility of supporting
325 the particular modules appropriate for their implementations.
326 </p>
327 <p>
328 This module describes selectors and CSS properties which enable authors
329 to style user interface related states, element fragments, properties
330 and values.
331 </p>
333 <p><a href="http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes">Section 2.1 of CSS1</a> [[CSS1]]
334 and <a href="http://www.w3.org/TR/CSS2/ui.html">Chapter 18 of CSS2</a> [[CSS2]]
335 introduced several user interface related pseudo-classes, properties and values.
336 <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).
337 </p>
338 <p>
339 This Working Draft extends them to provide the ability, through CSS,
340 to style elements based upon additional user interface states,
341 to style fragments of user interface elements, and to alter the
342 dynamic presentation of elements in ways previously only available through specific HTML4/XHTML1 elements and attributes.
343 </p>
345 <h3 id="purpose">Purpose</h3>
347 <p>The purpose of this specification is to achieve the following objectives:
348 </p>
349 <ul>
350 <li>Extend the user interface features in CSS2.1.</li>
351 <li>Provide additional CSS mechanisms to augment or replace other
352 dynamic presentation related features in HTML4/XHTML1.</li>
353 <li>Introduce directional navigation properties to assist in the construction of
354 user interfaces which make use of a directional navigation model.</li>
355 <li>Introduce properties and values to specify icon presentations for
356 elements to enhance accessibility.</li>
357 </ul>
359 <h2>Conformance</h2>
361 <h3>Definitions</h3>
363 <p>The key words <span class="index-def" title="MUST">"MUST"</span>,
364 <span class="index-def" title="MUST NOT">"MUST NOT"</span>, <span
365 class="index-def" title="REQUIRED">"REQUIRED"</span>, <span
366 class="index-def" title="SHALL">"SHALL"</span>, <span
367 class="index-def" title="SHALL NOT">"SHALL NOT"</span>, <span
368 class="index-def" title="SHOULD">"SHOULD"</span>, <span
369 class="index-def" title="SHOULD NOT">"SHOULD NOT"</span>, <span
370 class="index-def" title="RECOMMENDED">"RECOMMENDED"</span>, <span
371 class="index-def" title="MAY">"MAY"</span>, and <span
372 class="index-def" title="OPTIONAL">"OPTIONAL"</span> in this document
373 are to be interpreted as described in RFC 2119 (see [[!RFC2119]]).
374 However, for readability, these words do not typically appear
375 in all uppercase letters in this specification.
376 </p>
378 <p>Additional key words, e.g. "User agent (UA)", are
379 <a href="http://www.w3.org/TR/CSS21/conform.html#defs">defined
380 by CSS 2.1</a> ([[!CSS21]], section 3.1).</p>
382 <h3>Classes of products</h3>
384 <p>The following classes of products (many of which overlap)
385 should consider implementing this specification:</p>
387 <ul>
388 <li>Web browsers</li>
389 <li>User agents that implement one or more of the following types of
390 content: HTML ([[HTML401]], [[HTML5]]), XHTML ([[XHTML10]],
391 [[XHTML11]]), XForms (e.g. [[XFORMS11]]), SVG (e.g. [[SVG10]],
392 [[SVG11]]) or other content languages that contain forms controls
393 or are intended for user interaction
394 </li>
395 <li>User agents that implement one or more levels or modules of CSS
396 (e.g. [[CSS1]], [[!CSS21]])</li>
397 </ul>
399 <h3>Extensions</h3>
401 <p>This specification does not define
402 any explicit extension mechanisms.
403 If an implementation needs to extend the functionality
404 of this specification, it must follow any/all guidelines
405 and requirements of extensions as defined in CSS2.1, e.g.
406 <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords"
407 >Vendor-specific extensions</a>
408 ([[!CSS21]], section 4.1.2.1).
409 </p>
412 <h2>Dependencies on other modules</h2>
414 <p>
415 This CSS3 module depends on the following other specifications.
416 </p>
418 <ul>
419 <li>[[!SELECT]]</li>
420 <li>[[!CSS3COLOR]]</li>
421 <li>[[!CSS21]]</li>
422 </ul>
424 <!--
425 <p>It has non-normative (informative) references to the following
426 other specifications:</p>
427 <ul>
428 </ul>
429 -->
431 <p>
432 The following work is related to the CSS Basic User Interface Module Level 3 (CSS3 Basic UI).
433 </p>
435 <ul>
436 <li>[[HTML401]]</li>
437 <li>[[HTML5]]</li>
438 <li>[[UAAG10]]</li>
439 <li>[[XML10]]</li>
440 <li>[[XHTML10]]</li>
441 <li>[[XHTML11]]</li>
442 <li>[[XFORMS11]]</li>
443 </ul>
445 <p>This specification does not define what is a form element.</p>
447 <h2>User Interface Selectors</h2>
449 <h3 id="pseudo-classes">User interface states: pseudo-classes</h3>
450 <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
451 user interface states:</p>
452 <ul><li id="psuedo-hover"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:hover</a></li>
453 <li id="pseudo-active"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:active</a></li>
454 <li id="pseudo-focus"><a href="http://www.w3.org/TR/css3-selectors/#useraction-pseudos">:focus</a></li>
455 <li id="pseudo-enabled"><a href="http://www.w3.org/TR/css3-selectors/#enableddisabled">:enabled</a></li>
456 <li id="pseudo-disabled"><a href="http://www.w3.org/TR/css3-selectors/#enableddisabled">:disabled</a></li>
457 <li id="pseudo-checked"><a href="http://www.w3.org/TR/css3-selectors/#checked">:checked</a></li>
458 <li id="pseudo-indeterminate"><a href="http://www.w3.org/TR/css3-selectors/#indeterminate">:indeterminate</a></li>
459 </ul>
461 <p>These pseudo-classes as defined by [[!SELECT]] are
462 included in this specification by reference.</p>
464 <p>CSS 2.1 [[!CSS21]] specifies additional details
465 for some of the selectors mentioned, above and beyond Selectors.
466 </p>
469 <h4 id="active">:active details</h4>
471 <p>In addition, on systems with more than one mouse button,
472 :active is clarified to apply only to the primary
473 or primary activation button (typically the "left" mouse button),
474 and any aliases thereof.
475 </p>
477 <h4 id="indeterminate">
478 The indeterminate-value pseudo-class '':indeterminate''</h4>
480 <p>The <code>:indeterminate</code> pseudo-class applies
481 to UI elements whose value is in an indeterminate state.
482 For example, radio and checkbox elements
483 can be toggled between checked and unchecked states,
484 but are sometimes in an indeterminate state,
485 neither checked nor unchecked.
486 Similarly a progress meter can be in an indeterminate state
487 when the percent completion is unknown.
488 </p>
490 <p>Like the <code>:checked</code> pseudo-class,
491 <code>:indeterminate</code> applies to all media.
492 Components of a radio-group initialized with no pre-selected choice,
493 for example, would be <code>:indeterminate</code>
494 even in a static display.
495 </p>
498 <h4 class="no-num no-toc">New user interface state pseudo-classes</h4>
500 <p>In addition to the above-mentioned pseudo-classes, this specification introduces several new pseudo-classes to define additional user interface states.
501 </p>
502 <ul>
503 <li>:default</li>
504 <li>:valid</li>
505 <li>:invalid</li>
506 <li>:in-range</li>
507 <li>:out-of-range</li>
508 <li>:required</li>
509 <li>:optional</li>
510 <li>:read-only</li>
511 <li>:read-write</li>
512 </ul>
514 <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 [[XFORMS11]].</p>
516 <h4 id="pseudo-default">:default</h4>
517 <p>The :default selector applies to the one or more UI elements
518 that are the default among a set of similar elements.
519 This selector typically applies to context menu items,
520 buttons, and select lists/menus.
521 </p>
522 <p>
523 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.
524 </p>
526 <h4 id="pseudo-validity"><span id="pseudo-valid">:valid</span>
527 and <span id="pseudo-invalid">:invalid</span></h4>
529 <p>An element is :valid or :invalid when it is,
530 respectively, valid or invalid with respect to data validity semantics
531 defined by a different specification (e.g. [[XFORMS11]]).
532 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.
533 </p>
535 <h4 id="pseudo-range"><span id="pseudo-in-range">:in-range</span> and <span id="pseudo-out-of-range">:out-of-range</span></h4>
536 <p>
537 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
538 :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".
539 </p>
541 <h4 id="pseudo-required-value"><span id="pseudo-required">:required</span>
542 and <span id="pseudo-optional">:optional</span></h4>
544 <p>A form element is :required or :optional if a value for it
545 is, respectively, required or optional before the form it belongs to is submitted. Elements that are not form elements are neither required nor optional.
546 </p>
548 <h4 id="pseudo-ro-rw"><span id="pseudo-read-only">:read-only</span>
549 and <span id="pseudo-read-write">:read-write</span></h4>
551 <p>An element whose contents are not user-alterable is :read-only.
552 However, elements whose contents are user-alterable (such as text input fields) are considered to be in a :read-write state. In typical documents,
553 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>
556 <h3 id="pseudo-elements">User interface element fragments: pseudo-elements</h3>
558 <p>
559 In addition to the above-mentioned pseudo-element,
560 this specification introduces four new pseudo-elements
561 to provide access to additional user interface element fragments.
562 </p>
563 <ul><li>::value</li>
564 <li>::choices</li>
565 <li>::repeat-item</li>
566 <li>::repeat-index</li>
567 </ul>
569 <p>Specifically, these new pseudo-elements are provided
570 as a way to style user interface fragments
571 as defined by XForms [[XFORMS11]].</p>
573 <p class="note">
574 Note: The ::value, ::choices, ::repeat-item, and ::repeat-index
575 pseudo-elements are all at risk.
576 </p>
578 <h4 id="pseudo-value">::value</h4>
580 <p>A form element may contain both a label for its data value,
581 and the data value itself. For such elements, the ::value pseudo-element
582 selects the representation of just the data value itself, in order to
583 style its appearance.
584 </p>
586 <div class="example"><p style="display:none">Example(s):</p>
587 <h4 class="no-num no-toc">fictional markup and illustration</h4>
588 <p>
589 Here is an example which illustrates the ::value of a text input field with fictional markup which is then styled with CSS.
590 </p>
591 <h5 class="no-num no-toc">sample XForms fragment with fictional markup:</h5>
592 <pre><code>
593 <input>
594 <label>Zip code<label>
595 <em><input::value/></em>
596 </input>
597 </code></pre>
599 <h5 class="no-num no-toc">sample CSS:</h5>
600 <pre><code class="css">
601 input { border:dashed }
602 label { border:dotted }
603 input::value { border:solid }
604 </code></pre>
606 <h5 class="no-num no-toc">an HTML+CSS approximation of this example</h5>
607 <p>
608 <span style="border:dashed;display:inline-block;padding:10px">
609 <label
610 style="border:dotted;display:inline-block;padding:2px;margin:0;font-size:1em"
611 >Zip code</label>
612 <input type="text"
613 style="border:solid;display:inline-block;padding:2px;margin:0;font-size:1em"
614 value="94117">
615 </span>
616 </p>
617 <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.
618 </p>
619 </div>
621 <p>The ::value pseudo-element is similar to an inline-level element, but with certain restrictions.
622 The following properties apply to <code>::value</code>
623 pseudo-element: font properties, color property, background properties,
624 'word-spacing', 'letter-spacing', 'text-decoration', 'vertical-align',
625 'text-transform', 'line-height'. UAs may apply other properties as well.
626 </p>
629 <h4 id="pseudo-choices">::choices</h4>
631 <p>Similarly, a form element which represents a list of options may contain
632 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.
633 </p>
634 <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>
636 <h4 id="pseudo-repeat-item">::repeat-item</h4>
637 <p>
638 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.
639 </p>
641 <h4 id="pseudo-repeat-index">::repeat-index</h4>
642 <p>
643 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.
644 </p>
646 <div class="note"><p>
647 <em><strong>Note.</strong>
648 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.
649 </em></p>
650 </div>
652 <div class="example"><p style="display:none">Example(s):</p>
653 <h4 class="no-num no-toc">::repeat-item and ::repeat-index fictional markup</h4>
654 <p>
655 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.
656 </p>
657 <p>The following markup snippet uses XHTML and XForms:</p>
658 <pre><code lang="x-xhtml">
659 <html:table xforms:repeat-nodeset="...">
660 <html:tr>
661 <html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
662 </html:tr>
663 </html:table>
664 </code></pre>
665 <p>
666 The following style rules are used to style all the repeated items and the current repeated item.
667 </p>
668 <pre><code class="css" lang="x-css">
669 html|tr::repeat-item { outline: medium solid; color:gray }
670 html|tr::repeat-index { outline: medium dashed; color:black }
671 </code></pre>
672 <p>
673 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.
674 </p>
675 <pre><code lang="x-xhtml">
676 <html:table xforms:repeat-nodeset="...">
677 <em><html:tr::repeat-item></em>
678 <html:tr>
679 <html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
680 </html:tr>
681 <em></html:tr::repeat-item></em>
682 <em><html:tr::repeat-item></em>
683 <html:tr>
684 <html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
685 </html:tr>
686 <em></html:tr::repeat-item></em>
687 <em><html:tr::repeat-index></em>
688 <html:tr>
689 <html:td><xforms:input ref="..."/><xforms:input ref="..."/></html:td>
690 </html:tr>
691 <em></html:tr::repeat-index></em>
692 </html:table>
693 </code></pre>
694 </div>
696 <div class="note"><p>
697 <em><strong>Note.</strong>
698 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>
699 </div>
702 <h2>Element icons</h2>
704 <h3><span class="property">'content'</span> property addition</h3>
706 <table class="propdef"><tbody>
707 <tr><th>Name:</th><td><dfn>content</dfn></td></tr>
708 <tr><th>New Value(s):</th><td title="">icon</td></tr>
710 <tr><th>Initial:</th><td>same as CSS 2.1</td></tr>
711 <tr><th>Applies to:</th><td>same as CSS 2.1</td></tr>
712 <tr><th>Inherited:</th><td>same as CSS 2.1</td></tr>
713 <tr><th>Percentages:</th><td>same as CSS 2.1</td></tr>
714 <tr><th>Media:</th><td>same as CSS 2.1</td></tr>
715 <tr><th>Computed value:</th><td>the keyword '<span class="value" title="">icon</span>' if specified as such, otherwise same as CSS 2.1</td></tr>
716 <tr><th>Animatable:</th><td>no</td></tr>
717 </tbody></table>
719 <dl>
720 <dt>icon</dt>
721 <dd>The (pseudo-)element is replaced in its entirety by the resource referenced by its <span class="property">'icon'</span> property, and treated as a replaced element.
722 </dd>
723 </dl>
725 <p class="note"><em><strong>Note.</strong>
726 It is expected that the next draft of the CSS3 Generated Content module [[CSS3GENCON]] will include and superset this functionality.
727 </em></p>
729 <p class="note">
730 Note: The 'icon' value is at risk.
731 </p>
733 <h3><span class="property">'icon'</span> property</h3>
735 <table class="propdef"><tbody>
736 <tr><th>Name:</th><td><dfn>icon</dfn></td></tr>
737 <tr><th>Value:</th><td>auto | <uri> [, <uri>]* | inherit</td></tr>
738 <tr><th>Initial:</th><td>auto</td></tr>
739 <tr><th>Applies to:</th><td>all elements</td></tr>
740 <tr><th>Inherited:</th><td>no</td></tr>
741 <tr><th>Percentages:</th><td>N/A</td></tr>
742 <tr><th>Media:</th><td>all</td></tr>
743 <tr><th>Computed value:</th><td>as specified, except with any relative URLs converted to absolute</td></tr>
744 <tr><th>Animatable:</th><td>no</td></tr>
745 </tbody></table>
747 <dl>
748 <dt>auto</dt>
749 <dd>Use a default generic icon provided by the user agent.</dd>
750 <dt><uri></dt>
751 <dd>URIs (see [[!URI]], [[!RFC1738]] and [[!RFC1808]]) provide a way of identifying resources. The <uri> value(s) in this property refer to one or more icons in a comma delimited list. The user agent loads the referenced icons one by one until it finds one that it is able to render. This permits the usage of multiple different icon formats for various platforms, and various media for that matter.</dd>
752 </dl>
754 <p>The <span class="property">'icon'</span> property provides the author the ability to style any arbitrary element with an iconic equivalent. An element's icon is not used/rendered unless the <span class="property">'content'</span> property is set to the value '<span class="value" title="">icon</span>' (see above). Documents whose elements have icons assigned to them can be more easily viewed by users who find too much text distracting.
755 </p>
757 <div class="example"><p style="display:none">Example(s):</p>
758 <h4 class="no-num no-toc">Representing elements with icons</h4>
759 <p>This example uses the above icon features to display icons in place of images and objects.</p>
760 <pre><code class="css">
761 img,object { content:icon }
762 /* note that the CSS3 Generated Content module [[CSS3GENCON]]
763 expands the <span class="property">'content'</span> property to apply to all elements. */
765 img { icon:url(imgicon.png); }
766 /* provide a custom icon for images */
768 object { icon:url(objicon.png); }
769 /* provide a different custom icon for objects */
770 </code></pre>
771 </div>
773 <p class="note">
774 Note: The 'icon' property is at risk.
775 </p>
777 <h2>Box Model addition</h2>
779 <h3 id="box-sizing"><span class="property">'box-sizing'</span> property</h3>
781 <table class="propdef"><tbody>
782 <tr><th>Name:</th><td><dfn>box-sizing</dfn></td></tr>
783 <tr><th>Value:</th><td>
784 content-box |
785 padding-box |
786 border-box |
787 inherit</td></tr>
788 <tr><th>Initial:</th><td>content-box</td></tr>
789 <tr><th>Applies to:</th><td>all elements that accept width or height</td></tr>
790 <tr><th>Inherited:</th><td>no</td></tr>
791 <tr><th>Percentages:</th><td>N/A</td></tr>
792 <tr><th>Media:</th><td>visual</td></tr>
793 <tr><th>Computed value:</th><td>specified value</td></tr>
794 <tr><th>Animatable:</th><td>no</td></tr>
795 </tbody></table>
797 <dl>
798 <dt>content-box</dt>
799 <dd>This is the behavior of width and height as specified by CSS2.1.
800 The specified width and height (and respective min/max properties) apply to the width and height respectively of the content box of the element. The padding
801 and border of the element are laid out and drawn outside the
802 specified width and height.</dd>
803 <dt>padding-box</dt>
804 <dd>
805 The specified width and height (and respective min/max properties)
806 on this element determine the padding box of the element.
807 That is, any padding specified on the element is laid out and
808 drawn inside this specified width and height.
809 The content width and height are calculated by
810 subtracting the padding widths of the respective sides
811 from the specified <span class="property">'width'</span> and
812 <span class="property">'height'</span> properties.
813 As the content width and height
814 <a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">
815 cannot be negative</a> ([[!CSS21]], section 10.2),
816 this computation is floored at 0.
817 </dd>
818 <dt>border-box</dt>
819 <dd>The specified width and height (and respective min/max properties) on this element determine the border box of the element. That is, any padding or border
820 specified on the element is laid out and drawn inside this specified
821 width and height. The content width and height are calculated by
822 subtracting the border and padding widths of the respective sides
823 from the specified <span class="property">'width'</span> and <span class="property">'height'</span> properties. As the content width and height <a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">cannot be negative</a> ([[!CSS21]], section 10.2), this computation is floored at 0.
825 <p class="note"><em><strong>Note.</strong>
826 This is the behavior of width and height as commonly implemented by legacy HTML user agents for replaced elements and input elements.</em>
827 </p>
828 </dd>
829 </dl>
832 <div class="example"><p style="display:none">Example(s):</p>
833 <h4 class="no-num no-toc">Using box-sizing to evenly share space</h4>
834 <p>This example uses box-sizing to evenly horizontally split two divs with fixed size borders inside a div container, which would otherwise require additional markup.
835 </p>
836 <h5 class="no-num no-toc">sample CSS:</h5>
837 <pre><code class="css">
838 div.container {
839 width:38em;
840 border:1em solid black;
841 }
843 div.split {
844 box-sizing:border-box;
845 width:50%;
846 border:1em silver ridge;
847 float:left;
848 }
849 </code></pre>
850 <h5 class="no-num no-toc">sample HTML fragment:</h5>
851 <pre><code>
852 <div class="container">
853 <div class="split">This div occupies the left half.</div>
854 <div class="split">This div occupies the right half.</div>
855 </div>
856 </code></pre>
857 <h5 class="no-num no-toc">demonstration of sample CSS and HTML:</h5>
858 <div style="width:38em; border:1em solid black"><div style="box-sizing:border-box; width:50%; border:1em silver ridge; float:left">This div should occupy the left half.</div><div style="box-sizing:border-box; width:50%; border:1em silver ridge; float:left">This div should occupy the right half.</div>The two divs above should appear side by side, each (including borders) 50% of the content width of their container. If instead they are stacked one on top of the other then your browser does not support <span class="property">'box-sizing'</span>.
859 </div>
860 </div>
862 <p class="note">
863 Note: The 'padding-box' value is at risk.
864 </p>
867 <h2>Outline properties</h2>
869 <p>At times, style sheet authors may want to create outlines around
870 visual objects such as buttons, active form fields, image maps, etc.,
871 to make them stand out. Outlines differ from borders in the following
872 ways:</p>
874 <ol>
875 <li>Outlines do not take up space. </li>
876 <li>Outlines may be non-rectangular. </li>
877 </ol>
879 <p>The outline properties control the style of these dynamic outlines.
880 </p>
882 <h3 id="outline"><span class="property">'outline'</span> property</h3>
884 <table class="propdef" id="propdef-outline"><tbody>
885 <tr><th>Name:</th><td><dfn>outline</dfn></td></tr>
886 <tr><th>Value:</th><td>
887 [ <span class=property><'outline-color'></span> || <span class=property><'outline-style'></span> ||
888 <span class=property><'outline-width'></span> ] |
889 inherit
890 </td></tr>
891 <tr><th>Initial:</th><td>see individual properties</td></tr>
892 <tr><th>Applies to:</th><td>all elements</td></tr>
893 <tr><th>Inherited:</th><td>no</td></tr>
894 <tr><th>Percentages:</th><td>N/A</td></tr>
895 <tr><th>Media:</th><td>visual</td></tr>
896 <tr><th>Computed value:</th><td>see individual properties</td></tr>
897 <tr><th>Animatable:</th><td>see individual properties</td></tr>
898 </tbody></table>
900 <h3 id="outline-width"><span class="property">'outline-width'</span> property</h3>
902 <table class="propdef" id="propdef-outline-width"><tbody>
903 <tr><th>Name:</th><td><dfn>outline-width</dfn></td></tr>
904 <tr><th>Value:</th><td><a href="http://www.w3.org/TR/CSS21/box.html#value-def-border-width" class="noxref"><span class="value-inst-border-width"><border-width></span></a> | inherit</td></tr>
905 <tr><th>Initial:</th><td>medium</td></tr>
906 <tr><th>Applies to:</th><td>all elements</td></tr>
907 <tr><th>Inherited:</th><td>no</td></tr>
908 <tr><th>Percentages:</th><td>N/A</td></tr>
909 <tr><th>Media:</th><td>visual</td></tr>
910 <tr><th>Computed value:</th><td>absolute length; '0' if the outline style is 'none'.</td></tr>
911 <tr><th>Animatable:</th><td>as <a href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a></td></tr>
912 </tbody></table>
914 <h3 id="outline-style"><span class="property">'outline-style'</span> property</h3>
916 <table class="propdef" id="propdef-outline-style"><tbody>
917 <tr><th>Name:</th><td><dfn>outline-style</dfn></td></tr>
918 <tr><th>Value:</th><td>auto | <a href="http://www.w3.org/TR/CSS21/box.html#value-def-border-style" class="noxref"><span class="value-inst-border-style"><border-style></span></a> | inherit</td></tr>
919 <tr><th>Initial:</th><td>none</td></tr>
920 <tr><th>Applies to:</th><td>all elements</td></tr>
921 <tr><th>Inherited:</th><td>no</td></tr>
922 <tr><th>Percentages:</th><td>N/A</td></tr>
923 <tr><th>Media:</th><td>visual</td></tr>
924 <tr><th>Computed value:</th><td>specified value</td></tr>
925 <tr><th>Animatable:</th><td>no</td></tr>
926 </tbody></table>
928 <h3 id="outline-color"><span class="property">'outline-color'</span> property</h3>
930 <table class="propdef" id="propdef-outline-color"><tbody>
931 <tr><th>Name:</th><td><dfn>outline-color</dfn></td></tr>
932 <tr><th>Value:</th><td><a href="http://www.w3.org/TR/css3-color/#colorunits" class="noxref"><span class="value-inst-color"><color></span></a> | invert | inherit</td></tr>
933 <tr><th>Initial:</th><td>invert</td></tr>
934 <tr><th>Applies to:</th><td>all elements</td></tr>
935 <tr><th>Inherited:</th><td>no</td></tr>
936 <tr><th>Percentages:</th><td>N/A</td></tr>
937 <tr><th>Media:</th><td>visual</td></tr>
938 <tr><th>Computed value:</th><td>The computed value for '<span class="value">invert</span>' is '<span class="value">invert</span>'. For <color> values, the computed value is as defined for the [[!CSS3COLOR]] <span class="property">'color'</span> property.</td></tr>
939 <tr><th>Animatable:</th><td>as <a href="http://dev.w3.org/csswg/css3-transitions/#animtype-color">color</a></td></tr>
940 </tbody></table>
942 <p>The outline created with the outline properties is drawn "over" a
943 box, i.e., the outline is always on top, and doesn't influence the
944 position or size of the box, or of any other boxes. Therefore,
945 displaying or suppressing outlines does not cause reflow.
946 </p>
948 <p>Outlines may be non-rectangular.
949 For example, if the element is broken across several lines, the
950 outline should be an outline or minimum set of outlines that encloses all
951 the element's boxes. Each part of the outline should be fully connected
952 rather than open on some sides (as borders on inline elements are when
953 lines are broken). The parts of the outline are not required to be
954 rectangular. The position of the outline may be affected by
955 descendant boxes. User agents should use an algorithm for determining
956 the outline that encloses a region appropriate for conveying the
957 concept of focus to the user.
958 </p>
960 <p>The <span class=property>'outline-width'</span> property accepts
961 the same values as <a href="http://www.w3.org/TR/CSS21/box.html#propdef-border-width" class="noxref"><span
962 class="propinst-border-width">'border-width'</span></a> ([[!CSS21]], section 8.5.1).
963 </p>
965 <p>The <span class=property>'outline-style'</span> property accepts
966 the same values as
967 <a href="http://www.w3.org/TR/CSS21/box.html#propdef-border-style"
968 class="noxref"
969 ><span class="propinst-border-style"
970 >'border-style'</span></a>
971 ([[!CSS21]], section 8.5.3), except that
972 '<span class="value">hidden</span>' is not a legal outline style.
973 In addition, in CSS3,
974 <span class=property>'outline-style'</span>
975 accepts the value '<span class="value">auto</span>'.
976 The '<span class="value">auto</span>' value permits the user agent
977 to render a custom outline style,
978 typically a style which is either a user interface default
979 for the platform, or perhaps a style that is richer
980 than can be described in detail in CSS,
981 e.g. a rounded edge outline with semi-translucent outer pixels
982 that appears to glow.
983 As such, this specification does not define how the
984 <span class="property">'outline-color'</span>
985 is incorporated or used (if at all) when rendering
986 '<span class="value">auto</span>' style outlines.
987 User agents may treat '<span class="value">auto</span>' as
988 '<span class="value">solid</span>'.
989 </p>
991 <p>The <span class="property">'outline-color'</span> property
992 accepts all colors, as well as the keyword '<dfn>invert</dfn>'. 'Invert' is expected to perform a color inversion on the pixels on the screen. This is a
993 common trick to ensure the focus border is visible, regardless of
994 color background.
995 </p>
997 <p>
998 Conformant UAs may ignore the '<span class="value">invert</span>' value on platforms that do not support color inversion of the pixels on the screen. If the UA does not support the '<span class="value">invert</span>' value then the initial value of the <span class="property">'outline-color'</span>
999 property is the '<span class="value">currentColor</span>' [[!CSS3COLOR]] keyword.
1000 </p>
1002 <p>The <span class=property>'outline'</span> property is a
1003 shorthand property, and sets all three of <span class=property>'outline-style'</span>, <span class=property>'outline-width'</span>, and <span class=property>'outline-color'</span>.
1004 </p>
1006 <p class="note"><em><strong>Note.</strong>
1007 The outline is the same on all sides. In contrast to borders, there are no 'outline-top' or 'outline-left' etc. properties.</em>
1008 </p>
1010 <p>
1011 This specification does not define how multiple overlapping
1012 outlines are drawn, or how outlines are drawn for boxes that are
1013 partially obscured behind other elements.
1014 </p>
1016 <div class="example"><p style="display:none">Example(s):</p><p>
1017 Here's an example of drawing a
1018 thick outline around a BUTTON element:
1019 </p>
1020 <pre><code class="css">
1021 button { outline: thick solid }
1022 </code></pre>
1023 </div>
1025 <p>Graphical user interfaces may use outlines around elements to tell
1026 the user which element on the page has the focus. These outlines are in addition
1027 to any borders, and switching outlines on and off should not cause
1028 the document to reflow. The focus is the subject of user interaction
1029 in a document (e.g., for entering text, selecting a button,
1030 etc.).
1031 </p>
1033 <div class="example"><p style="display:none">Example(s):</p>
1034 <p>For example, to draw a thick black line around an element when it
1035 has the focus, and a thick red line when it is active, the following
1036 rules can be used:
1037 </p>
1038 <pre><code class="css">
1039 :focus { outline: thick solid black }
1040 :active { outline: thick solid red }
1041 </code></pre>
1042 </div>
1044 <div class="note"><p>
1045 <em><strong>Note.</strong>
1046 Since the outline does not affect formatting (i.e., no
1047 space is left for it in the box model), it may well overlap
1048 other elements on the page.
1049 </em></p>
1050 </div>
1054 <h3 id="outline-offset"><span class="property">'outline-offset'</span> property</h3>
1056 <p>By default, the outline is drawn starting just outside the border edge.
1057 However, it is possible to offset the outline and draw it beyond the border edge.</p>
1059 <table class="propdef" id="propdef-outline-offset"><tbody>
1060 <tr><th>Name:</th><td><dfn>outline-offset</dfn></td></tr>
1061 <tr><th>Value:</th><td><length> | inherit</td></tr>
1062 <tr><th>Initial:</th><td>0</td></tr>
1063 <tr><th>Applies to:</th><td>all elements</td></tr>
1064 <tr><th>Inherited:</th><td>no</td></tr>
1065 <tr><th>Percentages:</th><td>N/A</td></tr>
1066 <tr><th>Media:</th><td>visual</td></tr>
1067 <tr><th>Computed value:</th><td><length> value in absolute units (px or physical).</td></tr>
1068 <tr><th>Animatable:</th><td>as <a href="http://dev.w3.org/csswg/css3-transitions/#animtype-length">length</a></td></tr>
1069 </tbody></table>
1071 <p>If the computed value of <span class="property">'outline-offset'</span> is anything other than 0, then the outline is outset from the border edge by that amount.</p>
1074 <div class="example"><p style="display:none">Example(s):</p>
1075 <p>For example, to leave 2 pixels of space between a focus outline and the element that has the focus, or is active, the following rule can be used:
1076 </p>
1077 <pre><code class="css">
1078 :focus,:active { outline-offset: 2px }
1079 </code></pre>
1080 </div>
1084 <h2>Resizing & Overflow</h2>
1086 <p>CSS2.1 provides a mechanism for controlling the appearance of a scrolling mechanism (e.g. scrollbars) on block container elements.
1087 This specification adds to that a mechanism for controlling
1088 user resizability of elements as well as the ability to specify text overflow behavior.</p>
1090 <h3 id="resize"><span class="property">'resize'</span> property</h3>
1091 <p>The <span class="property">'resize'</span> property allows the author to specify whether or not an element is resizable by the user, and if so, along which axis/axes.</p>
1093 <table class="propdef" id="propdef-resize"><tbody>
1094 <tr><th>Name:</th><td><dfn>resize</dfn></td></tr>
1095 <tr><th>Value: </th><td>none | both | horizontal | vertical | inherit</td></tr>
1096 <tr><th>Initial:</th><td>none</td></tr>
1097 <tr><th>Applies to:</th><td>elements with <span class="property">'overflow'</span> other than visible</td></tr>
1098 <tr><th>Inherited:</th><td>no</td></tr>
1099 <tr><th>Percentages:</th><td>N/A</td></tr>
1100 <tr><th>Media:</th><td>visual</td></tr>
1101 <tr><th>Computed value:</th><td>specified value.</td></tr>
1102 <tr><th>Animatable:</th><td>no</td></tr>
1103 </tbody></table>
1105 <dl>
1106 <dt>none</dt>
1107 <dd>The UA does not present a resizing mechanism on the element, and the user is given no direct manipulation mechanism to resize the element.</dd>
1108 <dt>both</dt>
1109 <dd>The UA presents a bidirectional resizing mechanism to
1110 allow the user to adjust both the height and the width of the element.</dd>
1111 <dt>horizontal</dt>
1112 <dd>The UA presents a unidirectional horizontal resizing mechanism to allow the user to adjust only the width of the element.</dd>
1113 <dt>vertical</dt>
1114 <dd>The UA presents a unidirectional vertical resizing mechanism to allow the user to adjust only the height of the element.</dd>
1115 </dl>
1117 <p>Currently it is possible to control the appearance of the scrolling mechanism (if any) on an element using the <span class="property">'overflow'</span> property (e.g. '<code class="css">overflow: scroll</code>' vs. '<code class="css">overflow: hidden</code>' etc.). The purpose of the <span class="property">'resize'</span> property is to also allow control over the appearance and function of the resizing mechanism (e.g. a resize box or widget) on the element.</p>
1118 <p class="note">
1119 <em><strong>Note.</strong>
1120 The resizing mechanism is NOT the same as the scrolling mechanism. The scrolling mechanism allows the user to determine which portion of the contents of an element is shown. The resizing mechanism allows the user to determine the size of the element.
1121 </em></p>
1122 <p>The <span class="property">'resize'</span> property applies to elements whose computed <span class="property">'overflow'</span> value is something other than '<span class="value">visible</span>'. If <span class="property">'overflow'</span> is different in a particular axis (i.e. <span class="property">'overflow-x'</span> vs. <span class="property">'overflow-y'</span>), then this property applies to the dimension(s) which do not have the value '<span class="value">visible</span>'.
1123 </p>
1124 <p>
1125 When an element is resized by the user, the user agent keeps track of a resize factor (which is initially 1.0) for the width and height, which it then applies to the computed width and height as part of determining the used width and height. The element's contents (and surroundings) are reformatted as necessary.
1126 </p>
1127 <p>The resize factor introduces a step in width/height calculations and formatting as described in <a href="http://www.w3.org/TR/CSS21/visudet.html">chapter 10 of CSS2.1</a>. Specifically the following step is inserted between steps 1 and 2 of the algorithm in <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths">section 10.4</a> and <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-heights">10.7</a> in CSS2.1 [[!CSS21]], where [dimension] is 'width' for 10.4 and 'height' for 10.7.
1128 </p>
1129 <blockquote><p style="text-indent:-2em">
1130 1b. If the resize [dimension] factor is not 1.0, then the tentative
1131 used [dimension] is multiplied by that factor, and the rules
1132 above are applied again, but this time using the result of that
1133 multiplication as the computed value for '[dimension]'.
1134 </p></blockquote>
1135 <p>
1136 With regard to interactivity and the Document Object Model (DOM), the resize factor on an element lasts the lifetime of the element, however, if the <span class="property">'resize'</span> property itself is altered (e.g. via pseudo-class change or via DOM manipulation), then the resize factor is reset to 1.0.
1137 </p>
1138 <p>
1139 The precise direction of resizing (i.e. altering the top left of the element or altering the bottom right) may depend on a number of factors including whether the element is absolutely positioned, whether it is positioned using the <span class="property">'right'</span> and <span class="property">'bottom'</span> properties, whether the language of the element is right-to-left etc. The precise direction of resizing is left to the UA to properly determine for the platform.
1140 </p>
1141 <p>
1142 The user agent may restrict the resizing range to something suitable, such as between the original formatted size of the element, and large enough to encompass all the element's contents.
1143 </p>
1145 <div class="example"><p style="display:none">Example(s):</p>
1146 <p>For example, to make iframes scrollable <em>and</em> resizable, the following rule can be used:
1147 </p>
1148 <pre><code class="css">
1149 iframe,object[type^="text/"],
1150 object[type$="+xml"],object[type="application/xml"]
1151 {
1152 overflow:auto;
1153 resize:both;
1154 }
1155 </code></pre>
1156 </div>
1158 <!--
1159 too bad we don't have @viewport yet. otherwise this would be cool:
1160 <pre><code class="css">
1161 @viewport {
1162 width: 100px;
1163 height: 100px;
1164 overflow: hidden;
1165 resize: none
1166 } /* display content in a non-resizable 100px by 100px window */
1167 </code></pre>
1168 -->
1171 <h3 id="text-overflow">
1172 Overflow Ellipsis: the 'text-overflow' property</h3>
1174 <table class="propdef" id="propdef-text-overflow"><tbody>
1175 <tr><th>Name:</th>
1176 <td><dfn>text-overflow</dfn></td></tr>
1177 <tr><th>Value:</th>
1178 <td> (
1179 clip |
1180 ellipsis |
1181 <a class="noxref" href="http://www.w3.org/TR/CSS21/syndata.html#value-def-string">
1182 <span class="value-inst-string"><string></span></a>
1183 ){1,2} |
1184 inherit
1185 </td></tr>
1186 <tr><th>Initial:</th>
1187 <td>clip</td></tr>
1188 <tr><th>Applies to:</th>
1189 <td>block containers</td></tr>
1190 <tr><th>Inherited:</th>
1191 <td>no</td></tr>
1192 <tr><th>Percentages:</th>
1193 <td>N/A</td></tr>
1194 <tr><th>Media:</th>
1195 <td>visual</td></tr>
1196 <tr><th>Computed value:</th>
1197 <td>as specified</td></tr>
1198 <tr><th>Animatable:</th>
1199 <td>no</td></tr>
1200 </tbody></table>
1202 <p>This property specifies rendering when inline content overflows
1203 its block container element ("the block")
1204 in its inline progression direction
1205 that has <span class="property">'overflow'</span>
1206 other than <span class="value">'visible'</span>.
1207 Text can overflow for example when it is prevented from wrapping
1208 (e.g. due to '<code>white-space:nowrap</code>'
1209 or a single word is too long to fit).
1210 Values have the following meanings:</p>
1212 <dl>
1213 <dt><dfn title="text-overflow:clip"><code>clip</code></dfn></dt>
1214 <dd>Clip inline content that overflows. Characters may be only partially rendered.</dd>
1216 <dt><dfn title="text-overflow:ellipsis"><code>ellipsis</code></dfn></dt>
1217 <dd>
1218 Render an ellipsis character (U+2026)
1219 to represent clipped inline content.
1220 Implementations may substitute a more language/script-appropriate
1221 ellipsis character,
1222 or three dots "..." if the ellipsis character is unavailable.
1223 </dd>
1224 <dt><dfn title="text-overflow:<string>">
1225 <var><string></var></dfn></dt>
1226 <dd>
1227 Render the given string to represent clipped inline content.
1228 The given string is treated as an independent paragraph
1229 for bidi purposes.
1230 </dd>
1231 </dl>
1233 <p class="note">
1234 Note: The <string> value, and the 2-value syntax "{1,2}"
1235 and functionality are all at risk.
1236 </p>
1238 <p>
1239 The term "character" is used in this property definition
1240 for better readability and means "grapheme cluster" [[!UAX29]]
1241 for implementation purposes.
1242 </p>
1244 <p>
1245 If there is one value,
1246 it applies only to the end line edge.
1247 If there are two values,
1248 the first value applies to the left edge,
1249 and the second value applies to the right edge.
1250 </p>
1252 <p>
1253 For the ellipsis
1254 and string values,
1255 implementations must hide characters and
1256 <a href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes">
1257 atomic inline-level elements</a>
1258 at the applicable edge(s) of the line as necessary to fit the ellipsis/string.
1259 Place the ellipsis/string immediately adjacent
1260 to the applicable edge(s) of the remaining inline content.
1261 The first character or
1262 <a href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes">
1263 atomic inline-level element</a>
1264 on a line
1265 must be clipped rather than ellipsed.
1266 </p>
1268 <h4 class="no-num no-toc">ellipsing details</h4>
1269 <ul>
1270 <li>
1271 Ellipsing only affects rendering and must not affect layout
1272 nor dispatching of pointer events.
1273 </li>
1274 <li>
1275 The ellipsis is styled and baseline-aligned according to
1276 the block.
1277 </li>
1278 <li>
1279 Ellipsing occurs after relative positioning and other graphical transformations.
1280 </li>
1281 <li>
1282 If there is insufficient space for the ellipsis, then clip the rendering of the ellipsis itself (on the same side that neutral characters on the line would have otherwise been clipped with the ''clip'' value).
1283 </li>
1284 </ul>
1285 <h4 class="no-num no-toc">user interaction with ellipsis</h4>
1286 <ul>
1287 <li>When the user is interacting with content (e.g. editing, selecting, scrolling), the user agent may treat text-overflow ''ellipsis'' or string values as ''clip''.
1288 </li>
1289 <li>Selecting the ellipsis should select the ellipsed text.
1290 If all of the ellipsed text is selected,
1291 UAs should show selection of the ellipsis.
1292 Behavior of partially-selected ellipsed text is up to the UA.
1293 </li>
1294 </ul>
1296 <div class="example"><p style="display:none">Example(s):</p>
1297 <h4 class="no-num no-toc">text-overflow examples</h4>
1298 <p>These examples demonstrate setting the text-overflow of a block container element that has text which overflows its dimensions:
1299 </p>
1300 <h5 class="no-num no-toc">sample CSS for a div:</h5>
1301 <pre><code class="css">div {
1302 font-family:Helvetica,sans-serif; line-height:1.1;
1303 width:3.1em; padding:.2em; border:solid .1em black; margin:1em 0;
1304 }</code></pre>
1305 <h5 class="no-num no-toc">sample HTML fragments, renderings, and your browser:</h5>
1306 <table border="1" cellpadding="5" style="color:#000;background:#fff;"><tbody>
1307 <tr><th>HTML</th><th>sample rendering</th><th>your browser</th></tr>
1308 <tr>
1309 <td><pre><code><div>
1310 CSS IS AWESOME, YES
1311 </div>
1312 </code></pre></td>
1315 <td>
1316 <object type="image/png" data="cssisawesome.png">
1317 First, a box with text drawing outside of it.
1318 </object>
1319 </td>
1321 <td>
1322 <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1;">CSS IS AWESOME, YES</div>
1323 </td>
1324 </tr>
1326 <tr>
1327 <td><pre><code><div style="<strong>text-overflow:clip;</strong> overflow:hidden">
1328 CSS IS AWESOME, YES
1329 </div>
1330 </code></pre></td>
1332 <td>
1333 <object type="image/png" data="cssisaweso.png">
1334 Second, a similar box with the text clipped outside the box.
1335 </object></td>
1337 <td>
1338 <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:clip;">CSS IS AWESOME, YES</div>
1339 </td>
1340 </tr>
1342 <tr>
1343 <td><pre><code><div style="<strong>text-overflow:ellipsis;</strong> overflow:hidden">
1344 CSS IS AWESOME, YES
1345 </div>
1346 </code></pre></td>
1348 <td>
1349 <object type="image/png" data="cssisaw.png">
1350 Third, a similar box with an ellipsis representing the clipped text.
1351 </object>
1352 </td>
1354 <td>
1355 <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:ellipsis;">CSS IS AWESOME, YES</div>
1356 </td>
1357 </tr>
1360 <tr>
1361 <td><pre><code><div style="<strong>text-overflow:ellipsis;</strong> overflow:hidden">
1362 NESTED
1363 <p>PARAGRAPH</p>
1364 WON'T ELLIPSE.
1365 </div>
1366 </code></pre></td>
1368 <td>
1369 <object type="image/png" data="nes.png">
1370 Fourth, a box with a nested paragraph demonstrating anonymous block boxes equivalency and non-inheritance into a nested element.
1371 </object>
1372 </td>
1374 <td>
1375 <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:ellipsis;">NESTED
1376 <p>PARAGRAPH</p>
1377 WON'T ELLIPSE.</div>
1378 </td>
1380 </tr>
1381 </tbody></table>
1383 </div>
1385 <p class="note">
1386 Note: the side of the line that the ellipsis is placed depends on the 'direction' of the block. E.g. an overflow hidden right-to-left (<code>direction:rtl</code>) block clips inline content on the <em>left</em> side, thus would place a text-overflow ellipsis on the <em>left</em> to represent that clipped content.
1387 </p>
1389 <!-- insert RTL example diagram here to illustrate note. -->
1391 <h4 class="no-num no-toc">ellipsis interaction with scrolling interfaces</h4>
1393 <p>
1394 This section applies to elements with text-overflow other than 'clip'
1395 (non-clip text-overflow)
1396 and overflow:scroll.
1397 </p>
1399 <p>
1400 When an element with non-clip text-overflow has overflow of scroll
1401 in the inline progression dimension of the text, and the browser
1402 provides a mechanism for scrolling (e.g. a scrollbar on the element,
1403 or a touch interface to swipe-scroll, etc.), there are
1404 additional implementation details that provide a better user experience:
1405 </p>
1407 <p>
1408 When an element is scrolled (e.g. by the user, DOM manipulation,
1409 or <a href="http://www.w3.org/TR/2008/CR-css3-marquee-20081205/#overflow-style">'overflow-style'</a> [[CSS3MARQUEE]]),
1410 more of the element's content is shown.
1411 The value of text-overflow should not affect whether more of
1412 the element's content is shown or not. If a non-clip text-overflow
1413 is set, then as more content is scrolled into view,
1414 implementations should show whatever
1415 additional content fits, only truncating content which would
1416 otherwise be clipped
1417 (or is necessary to make room for the ellipsis/string),
1418 until the element is scrolled far enough to
1419 display the edge of the content
1420 at which point that content should be displayed
1421 rather than an ellipsis/string.
1422 </p>
1423 <p>
1424 As some content is scrolled into view, it is likely that
1425 other content may scroll out of view on the other side.
1426 If that content's block container element is the same
1427 that's doing the scrolling,
1428 then implementations should render an ellipsis/string in place of
1429 the clipped content,
1430 with the same details as described in the value definition above,
1431 except that the ellipsis/string is drawn in the start
1432 (rather than end) of
1433 the block's direction (per the direction property).
1434 </p>
1435 <p>
1436 While the content is being scrolled, implementations may adjust their rendering of ellipses/strings
1437 (e.g. align to the box edges rather than line edges).
1438 </p>
1439 <p>
1440 If there is insufficient space for both start
1441 and end ellipses/strings,
1442 then only the end ellipsis/string should be rendered.
1443 </p>
1446 <h2>Pointing Devices and Keyboards</h2>
1448 <h3>Pointer interaction</h3>
1450 <h4 id="cursor"><span class="property">'cursor'</span> property</h4>
1451 <table class="propdef" id="propdef-cursor"><tbody>
1452 <tr><th>Name:</th><td><dfn>cursor</dfn></td></tr>
1453 <tr><th>Value:</th><td>
1454 [ [<uri> [<x> <y>]?,]* <br>
1455 [ auto | default | none |<br>
1456 context-menu | help | pointer | progress | wait | <br>
1457 cell | crosshair | text | vertical-text | <br>
1458 alias | copy | move | no-drop | not-allowed | <br>
1459 e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize |
1460 ew-resize | ns-resize | nesw-resize | nwse-resize |
1461 col-resize | row-resize |
1462 all-scroll
1463 | zoom-in | zoom-out
1464 <br>
1465 ] ] | inherit </td></tr>
1466 <tr><th>Initial:</th><td>auto</td></tr>
1467 <tr><th>Applies to:</th><td>all elements</td></tr>
1468 <tr><th>Inherited:</th><td>yes</td></tr>
1469 <tr><th>Percentages:</th><td>N/A</td></tr>
1470 <tr><th>Media:</th><td>visual, interactive</td></tr>
1471 <tr><th>Computed value:</th><td>as specified, except with any relative URLs converted to absolute</td></tr>
1472 <tr><th>Animatable:</th><td>no</td></tr>
1473 </tbody></table>
1475 <p>This property specifies the type of cursor to be displayed for the pointing device when over the element's border, padding, and content. Values have the following meanings:
1476 </p>
1478 <h5 class="no-num no-toc">image cursors</h5>
1479 <dl>
1480 <dt><uri></dt>
1481 <dd>The user agent retrieves the cursor from the resource
1482 designated by the URI. If the user agent cannot handle
1483 the first cursor of a list of cursors, it must attempt
1484 to handle the second, etc. If the user agent cannot handle
1485 any user-defined cursor, it must use the cursor keyword
1486 at the end of the list. The optional <x> and <y> coordinates
1487 identify the exact position within the image which is the pointer position (i.e., the hotspot).
1488 </dd>
1489 <dt><x></dt>
1490 <dt><y></dt>
1491 <dd>
1492 Each is a <number>. The x-coordinate and y-coordinate of the position in the cursor's coordinate system (left/top relative) which represents the precise position that is being pointed to.
1493 If the values are unspecified, then the intrinsic hotspot defined inside the image resource itself is used. If both the values are unspecific and the referenced cursor has no defined hotspot, the effect is as if a value of "0 0" were specified.
1494 </dd>
1495 </dl>
1497 <h5 class="no-num no-toc">general purpose cursors</h5>
1498 <dl>
1499 <dt style="cursor:auto">auto</dt>
1500 <dd>The UA determines the cursor to display based on the current
1501 context.
1502 </dd>
1503 <dt style="cursor:default">default</dt>
1504 <dd>The platform-dependent default cursor. Often rendered as an arrow.
1505 </dd>
1506 <dt style="cursor:none">none</dt>
1507 <dd>No cursor is rendered for the element.</dd>
1508 </dl>
1510 <h5 class="no-num no-toc">links and status cursors</h5>
1511 <dl>
1512 <dt style="cursor:context-menu">context-menu</dt>
1513 <dd>A context menu is available for the object under the cursor. Often rendered as an arrow with a small menu-like graphic next to it.</dd>
1514 <dt style="cursor:help">help</dt>
1515 <dd>Help is available for the object under the cursor. Often rendered
1516 as a question mark or a balloon.
1517 </dd>
1518 <dt style="cursor:pointer">pointer</dt>
1519 <dd>The cursor is a pointer that indicates a link.
1520 </dd>
1521 <dt style="cursor:progress">progress</dt>
1522 <dd>A progress indicator. The program is performing some processing,
1523 but is different from '<span class="value">wait</span>' in that the user may still interact
1524 with the program. Often rendered as a spinning beach ball,
1525 or an arrow with a watch or hourglass.</dd>
1526 <dt style="cursor:wait">wait</dt>
1527 <dd>Indicates that the program is busy and the user should
1528 wait. Often rendered as a watch or hourglass.
1529 </dd>
1530 </dl>
1532 <h5 class="no-num no-toc">selection cursors</h5>
1533 <dl>
1534 <dt style="cursor:cell">cell</dt>
1535 <dd>Indicates that a cell or set of cells may be selected. Often rendered as a thick plus-sign with a dot in the middle.</dd>
1536 <dt style="cursor:crosshair">crosshair</dt>
1537 <dd>A simple crosshair (e.g., short line segments resembling a "+" sign). Often used to indicate a two dimensional bitmap selection mode.
1538 </dd>
1539 <dt style="cursor:text">text</dt>
1540 <dd>Indicates text that may be selected. Often rendered as a vertical I-beam.
1541 User agents may automatically display a horizontal I-beam/cursor (e.g. same as the '<span class="value">vertical-text</span>' keyword) for vertical text, or for that matter, any angle of I-beam/cursor for text that is rendered at any particular angle.
1542 </dd>
1543 <dt style="cursor:vertical-text">vertical-text</dt>
1544 <dd>Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam.</dd>
1545 </dl>
1547 <h5 class="no-num no-toc">drag and drop cursors</h5>
1548 <dl>
1549 <dt style="cursor:alias">alias</dt>
1550 <dd>Indicates an alias of/shortcut to something is to be created. Often rendered as an arrow with a small curved arrow next to it.</dd>
1552 <dt style="cursor:copy">copy</dt>
1553 <dd>Indicates something is to be copied. Often rendered as an arrow with a small plus sign next to it.</dd>
1555 <dt style="cursor:move">move</dt>
1556 <dd>Indicates something is to be moved.
1557 </dd>
1558 <dt style="cursor:no-drop">no-drop</dt>
1559 <dd>
1560 Indicates that the dragged item cannot be dropped at the current cursor location. Often rendered as a hand or pointer with a small circle with a line through it.
1561 </dd>
1562 <dt style="cursor:not-allowed">not-allowed</dt>
1563 <dd>Indicates that the requested action will not be carried out.
1564 Often rendered as a circle with a line through it.
1565 </dd>
1566 </dl>
1568 <h5 class="no-num no-toc">resizing and scrolling cursors</h5>
1569 <dl>
1570 <dt>
1571 <span style="cursor:e-resize">e-resize</span>,
1572 <span style="cursor:n-resize">n-resize</span>,
1573 <span style="cursor:ne-resize">ne-resize</span>,
1574 <span style="cursor:nw-resize">nw-resize</span>,
1575 <span style="cursor:s-resize">s-resize</span>,
1576 <span style="cursor:se-resize">se-resize</span>,
1577 <span style="cursor:sw-resize">sw-resize</span>,
1578 <span style="cursor:w-resize">w-resize</span>
1579 </dt>
1580 <dd>Indicates that some edge is to be moved. For example, the
1581 'se-resize' cursor is used when the movement starts from the
1582 south-east corner of the box.
1583 </dd>
1584 <dt>
1585 <span style="cursor:ew-resize">ew-resize</span>,
1586 <span style="cursor:ns-resize">ns-resize</span>,
1587 <span style="cursor:nesw-resize">nesw-resize</span>,
1588 <span style="cursor:nwse-resize">nwse-resize</span>
1589 </dt>
1590 <dd>Indicates a bidirectional resize cursor.</dd>
1591 <dt style="cursor:col-resize">col-resize</dt>
1592 <dd>Indicates that the item/column can be resized horizontally.
1593 Often rendered as arrows pointing left and right with a vertical bar separating them.</dd>
1594 <dt style="cursor:row-resize">row-resize</dt>
1595 <dd>Indicates that the item/row can be resized vertically. Often rendered as arrows pointing up and down with a horizontal bar separating them.
1596 </dd>
1597 <dt style="cursor:all-scroll">all-scroll</dt>
1598 <dd>Indicates that the something can be scrolled in any direction.
1599 Often rendered as arrows pointing up, down, left, and right with a dot in the middle.
1600 </dd>
1601 </dl>
1603 <h5 class="no-num no-toc">zooming cursors</h5>
1604 <dl>
1605 <dt>
1606 <span style="cursor:zoom-in"> zoom-in</span>,
1607 <span style="cursor:zoom-out"> zoom-out</span>
1608 </dt>
1609 <dd>
1610 Indicates that something can be zoomed (magnified) in or out, and
1611 often rendered as a magnifying glass with a "+" or "-" in the center of the glass, for 'zoom-in' and 'zoom-out' respectively.
1612 </dd>
1613 </dl>
1615 <p>The UA may treat unsupported values as '<span class="value">auto</span>'. E.g. on platforms that do not have a concept of a '<span class="value">context-menu</span>' cursor, the UA may render '<span class="value">default</span>' or whatever is appropriate.
1616 </p>
1618 <div class="example">
1619 <h5 class="no-num no-toc">Example: cursor fallback</h5>
1620 <p>Here is an example of using several cursor values.</p>
1621 <pre><code class="css">
1622 :link,:visited {
1623 cursor: url(example.svg#linkcursor),
1624 url(hyper.cur),
1625 url(hyper.png) 2 3,
1626 pointer
1627 }
1628 </code></pre>
1629 <p>This example sets the cursor on all hyperlinks (whether visited or not)
1630 to an external <a href="http://www.w3.org/TR/SVG/interact.html#CursorElement">SVG cursor</a> ([[SVG10]], section 16.8.3).
1631 User agents that don't support SVG cursors would simply skip to the
1632 next value and attempt to use the "hyper.cur" cursor.
1633 If that cursor format was also not supported, the UA could attempt to use the "hyper.png" cursor with the explicit hot spot. Finally if the UA does not support any of those image cursor formats, the UA would skip to the last value
1634 and simply render the '<span class="value">pointer</span>' cursor.
1635 </p>
1636 </div>
1640 <h3 id="keyboard">Keyboard control</h3>
1642 <h4 id="nav-index">Sequential navigation order: the <span class="property">'nav-index'</span> property</h4>
1643 <p>The <span class="property">'nav-index'</span> property is an input-method-neutral way of specifying the sequential navigation order (also known as "tabbing order").
1644 </p>
1645 <table class="propdef" id="propdef-nav-index">
1646 <tr><th>Name:</th><td><dfn>nav-index</dfn></td></tr>
1647 <tr><th>Value: </th><td>auto | <number> | inherit</td></tr>
1648 <tr><th>Initial:</th><td>auto</td></tr>
1649 <tr><th>Applies to:</th><td>all enabled elements</td></tr>
1650 <tr><th>Inherited:</th><td>no</td></tr>
1651 <tr><th>Percentages:</th><td>n/a</td></tr>
1652 <tr><th>Media:</th><td>interactive</td></tr>
1653 <tr><th>Computed value:</th><td>specified value.</td></tr>
1654 <tr><th>Animatable:</th><td>as <a href="http://dev.w3.org/csswg/css3-transitions/#animtype-number">number</a></td></tr>
1655 </table>
1656 <dl>
1657 <dt>auto</dt>
1658 <dd>The element's sequential navigation order is assigned automatically by the user agent.</dd>
1659 <dt><number></dt>
1660 <dd>The number (which is non-zero and positive) indicates the sequential
1661 navigation order for the element. '<span class="value">1</span>' means first. Elements with the same
1662 nav-index value are navigated in document order when that nav-index value is being navigated.
1663 </dd>
1664 </dl>
1666 <p>This property is a replacement for the HTML4/XHTML1 attribute '<a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.11.1">tabindex</a>' ([[HTML401]], section 17.11.1). Borrowed and slightly rephrased from the HTML4 Recommendation:
1667 </p>
1668 <p>
1669 This property specifies the position of the current element in the sequential navigation order for the current document.
1670 </p>
1671 <p>
1672 The sequential navigation order defines the order in which elements will receive focus when navigated by the user via the keyboard. The sequential navigation order may include elements nested within other elements.
1673 </p>
1674 <p>
1675 Elements that may receive focus should be navigated by user agents according to the following rules:
1676 </p>
1677 <ol>
1678 <li>Those elements that support the nav-index property and assign a
1679 positive value to it are navigated first. Navigation proceeds from
1680 the element with the lowest nav-index value to the element with the
1681 highest value. Values need not be sequential nor must they begin with
1682 any particular value. Elements that have identical nav-index values
1683 should be navigated in document order.</li>
1684 <li>Those elements that do not support the nav-index property or
1685 support it and assign it a value of '<span class="value">auto</span>' are navigated next. These elements are navigated in document
1686 order.</li>
1687 <li>Elements that are disabled do not participate in the sequential navigation order.</li>
1688 </ol>
1689 <p>
1690 The actual key sequence that causes sequential navigation or element activation depends on the configuration of the user agent (e.g., the "tab" key is often used for sequential navigation, and the "enter" key is used to activate a selected element).
1691 </p>
1692 <p>
1693 User agents may also define key sequences to navigate the sequential navigation order in reverse. When the end (or beginning) of the tabbing order is reached, user agents may circle back to the beginning (or end). The key combination "shift-tab" is often used for reverse sequential navigation.
1694 </p>
1696 <p class="note">
1697 Note: The 'nav-index' property is at risk.
1698 </p>
1700 <h4 id="nav-dir">Directional focus navigation: the <span class="property">'nav-up'</span>, <span class="property">'nav-right'</span>, <span class="property">'nav-down'</span>, <span class="property">'nav-left'</span> properties</h4>
1701 <table class="propdef"><tbody>
1702 <tr><th>Name: </th><td><dfn>nav-up</dfn>, <dfn>nav-right</dfn>, <dfn>nav-down</dfn>, <dfn>nav-left</dfn></td></tr>
1703 <tr><th>Value: </th><td>auto | <id> [ current | root | <target-name> ]? | inherit</td></tr>
1704 <tr><th>Initial:</th><td>auto</td></tr>
1705 <tr><th>Applies to:</th><td>all enabled elements</td></tr>
1706 <tr><th>Inherited:</th><td>no</td></tr>
1707 <tr><th>Percentages:</th><td>N/A</td></tr>
1708 <tr><th>Media:</th><td>interactive</td></tr>
1709 <tr><th>Computed value:</th><td>as specified</td></tr>
1710 <tr><th>Animatable:</th><td>no</td></tr>
1711 </tbody></table>
1713 <dl>
1714 <dt>auto</dt>
1715 <dd>The user agent automatically determines which element to navigate the focus to in response to directional navigational input.</dd>
1716 <dt><id></dt>
1717 <dd><p>The <id> value consists of a '<code>#</code>' character followed by an identifier, similar to a fragment identifier in a URL. It indicates the element to which the focus is navigated to in response to directional navigation input respective to the specific property.
1718 </p>
1719 <p>
1720 If the <id> refers to the currently focused element, the directional navigation input respective to the nav- property is ignored — there is no need to refocus the same element.
1721 </p>
1722 </dd>
1723 <dt><target-name></dt>
1724 <dd>
1725 The <target-name> parameter indicates the target frame for the focus navigation. It is a string and it cannot start with the underscore "_" character. If the specified target frame does not exist, the parameter will be treated as the keyword '<span class="value">current</span>', which means to simply use the frame that the element is in. The keyword '<span class="value">root</span>' indicates that the user agent should target the full window.
1726 </dd>
1727 </dl>
1729 <p>User agents for devices with directional navigation keys respond by navigating the focus according to four respective nav-* directional navigation properties (nav-up, nav-right, nav-down, nav-left). This specification does not define which keys of a device are directional navigational keys.
1730 </p>
1732 <div class="note"><p>
1733 <em><strong>Note.</strong>
1734 Typical personal computers have keyboards with four arrow keys. One possible implementation would be to use those four arrow keys for directional navigation. For accessibility and user convenience, user agents should allow configuration of which keys on a keyboard are used for directional navigation.
1735 </em></p>
1736 </div>
1738 <div class="example">
1739 <h5 class="no-num no-toc">Example: positioned buttons</h5>
1740 <p>Here is an example of buttons positioned in a diamond shape whose navigation order and directional focus navigation is set in such a way to navigate the focus clockwise (or counter-clockwise) around the diamond shape when the user chooses to navigate sequentially or directionally.</p>
1741 <pre><code class="css">
1742 button { position:absolute }
1744 button#b1 {
1745 top:0; left:50%;
1746 nav-index:1;
1747 nav-right:#b2; nav-left:#b4;
1748 nav-down:#b2; nav-up:#b4;
1749 }
1751 button#b2 {
1752 top:50%; left:100%;
1753 nav-index:2;
1754 nav-right:#b3; nav-left:#b1;
1755 nav-down:#b3; nav-up:#b1;
1756 }
1758 button#b3 {
1759 top:100%; left:50%;
1760 nav-index:3;
1761 nav-right:#b4; nav-left:#b2;
1762 nav-down:#b4; nav-up:#b2;
1763 }
1765 button#b4 {
1766 top:50%; left:0;
1767 nav-index:4;
1768 nav-right:#b1; nav-left:#b3;
1769 nav-down:#b1; nav-up:#b3;
1770 }
1771 </code></pre>
1772 <p>Whatever markup sequence the buttons may have (which is not specified in this example) is irrelevant in this case because they are positioned, and yet, it is still important to ensure focus navigation behaviors which relate reasonably to the specified layout.</p>
1773 </div>
1775 <p class="note">
1776 Note: The 'nav-up', 'nav-right', 'nav-down', and 'nav-left' properties
1777 are at risk.
1778 </p>
1781 <h4 id="input-method-editor">Input method editor: the <span class="property">'ime-mode'</span> property</h4>
1783 <table class="propdef"><tbody>
1784 <tr><th>Name: </th><td><dfn>ime-mode</dfn></td></tr>
1785 <tr><th>Value: </th><td>auto | normal | active | inactive | disabled | inherit</td></tr>
1786 <tr><th>Initial:</th><td>auto</td></tr>
1787 <tr><th>Applies to:</th><td>text fields</td></tr>
1788 <tr><th>Inherited:</th><td>no</td></tr>
1789 <tr><th>Percentages:</th><td>N/A</td></tr>
1790 <tr><th>Media:</th><td>interactive</td></tr>
1791 <tr><th>Computed value:</th><td>as specified</td></tr>
1792 <tr><th>Animatable:</th><td>no</td></tr>
1793 </tbody></table>
1795 <p>
1796 The 'ime-mode' CSS property controls
1797 the state of the input method editor for text fields.
1798 </p>
1800 <dl>
1801 <dt>auto</dt>
1802 <dd>
1803 No change is made to the current input method editor state. This is the default.
1804 </dd>
1805 <dt>normal</dt>
1806 <dd>
1807 The IME state should be normal; this value can be used in a user style sheet to override the page setting.
1808 </dd>
1809 <dt>active</dt>
1810 <dd>
1811 The input method editor is initially active; text entry is performed using it unless the user specifically dismisses it.
1812 </dd>
1813 <dt>inactive</dt>
1814 <dd>
1815 The input method editor is initially inactive, but the user may activate it if they wish.
1816 </dd>
1817 <dt>disabled</dt>
1818 <dd>
1819 The input method editor is disabled and may not be activated by the user.
1820 </dd>
1821 </dl>
1823 <div class="example">
1824 <h5 class="no-num no-toc">Example: disabling input method support</h5>
1825 <pre><code class="html"><input type="text" name="name" value="initial value" style="ime-mode: disabled">
1826 </code></pre>
1827 <p>
1828 This example disables input method support for a field;
1829 this might be necessary for fields that enter data
1830 into a database that doesn't support extended character sets,
1831 for example.
1832 </p>
1833 </div>
1835 <div class="example">
1836 <h5 class="no-num no-toc">Example: user preference</h5>
1837 <pre><code class="css">input[type=password] {
1838 ime-mode: auto !important;
1839 }
1840 </code></pre>
1841 <p>
1842 This example CSS may be placed into a user style sheet file to force password input fields to behave in a default manner.
1843 </p>
1844 </div>
1846 <p class="note">
1847 Note: In general, it's not appropriate for a public web site
1848 to manipulate the IME mode setting.
1849 This property should be used for web applications and the like.
1850 Authors should not rely on disabling IME
1851 to prevent extended characters from passing through a form.
1852 Even with IME disabled, users can still paste extended characters
1853 into a form's fields.
1854 </p>
1856 <p class="note">
1857 Note: The 'ime-mode' property is at risk.
1858 </p>
1860 <hr title="Separator from footer">
1863 <h2 class="no-num" id="acknowledgments">Appendix A. Acknowledgments</h2>
1865 <p>This appendix is <em>informative</em>.</p>
1867 <p>Thanks to feedback and contributions from
1868 L. David Baron, Bert Bos, Matthew Brealey, Ada Chan, Michael Day, Micah Dubinko,
1869 Elika E., Steve Falkenburg, Al Gilman, Ian Hickson, Bjoern Hoehrmann, David Hyatt, Richard Ishida, Sho Kuwamoto, Susan Lesch, Peter Linss,
1870 Brad Pettit, Alexander Savenkov, Sebastian Schnitzenbaumer,
1871 Etan Wexler, David Woolley and Domel.
1872 </p>
1874 <h2 class="no-num" id="references">Appendix B. Bibiliography</h2>
1876 <h3 class="no-num no-toc">Normative References</h3>
1878 <!--normative-->
1880 <h3 class="no-num no-toc" id="informative-references">Informative References</h3>
1882 <!--informative-->
1884 <h2 class="no-num" id="changes">Appendix C. Changes</h2>
1886 <p>This appendix is <em>informative</em>.</p>
1888 <p>In general this draft contains numerous
1889 editorial/grammatical/spelling corrections,
1890 and several new informative examples.
1891 This appendix describes minor functional changes from the
1892 <a href="http://www.w3.org/TR/2004/CR-css3-ui-20040511/"
1893 >Candidate Recommendation (CR) of 11 May 2004</a>
1894 that were made to reflect implementer adoption (or lack thereof)
1895 in the seven years since.
1896 In particular, changes since the CR fall into one of
1897 three categories:
1898 </p>
1900 <ul>
1901 <li>Minor refinements to features based on implementation experience.
1902 <!-- e.g. cursor applying to border, padding, content areas -->
1903 </li>
1904 <li>Dropping features that were not implemented,
1905 or were insufficiently implemented to exit CR.</li>
1906 <!-- e.g. System Appearance -->
1907 <li>Adding a small number of new but already interoperably
1908 implemented features.
1909 <!-- e.g. text-overflow, ime-mode -->
1910 </li>
1911 </ul>
1913 <h3 class="no-num" id="changes-list">List of substantial changes</h3>
1915 <ul>
1916 <li>System Appearance has been dropped,
1917 including appearance values & property,
1918 and system fonts / extension of the 'font' property shorthand.
1919 </li>
1921 <li>The ::selection pseudo-element has been dropped since
1922 it was dropped from Selectors after testing found
1923 interoperability problems and further details to explore/define.
1924 </li>
1926 <li>'<span class="property">box-sizing</span>' property. Added 'padding-box' value.</li>
1928 <li>'<span class="property">cursor</span>' property. Added detail about applying to the border, padding, and content areas of the element.</li>
1930 <li>'<span class="property">ime-mode</span>' property - new!</li>
1932 <li>'<span class="property">text-overflow</span>' property - new!</li>
1934 </ul>
1938 <h2 class="no-num">Appendix D. Default style sheet additions for HTML</h2>
1940 <p>This appendix is <em>informative</em>.</p>
1942 <p>Potential additions to the base style sheet to express HTML form controls, and a few dynamic presentation attributes:</p>
1944 <pre class="html4ss">
1946 :enabled:focus {
1947 outline: 2px inset;
1948 }
1950 button,
1951 input[type=button],
1952 input[type=reset],
1953 input[type=submit],
1954 input[type=checkbox],
1955 input[type=radio],
1956 textarea,
1957 input,
1958 input[type=text],
1959 input[type=hidden],
1960 input[type=password],
1961 input[type=image]
1962 {
1963 display: inline-block;
1964 white-space: nowrap;
1965 }
1967 button
1968 {
1969 /* white space handling of BUTTON tags in particular */
1970 white-space:normal;
1971 }
1973 input[type=reset]
1974 {
1975 /* default content of HTML4/XHTML1 input type=reset button */
1976 content: "Reset";
1977 }
1979 input[type=submit]
1980 {
1981 /* default content of HTML4/XHTML1 input type=submit button */
1982 content: "Submit";
1983 }
1985 input[type=button],
1986 input[type=reset][value],
1987 input[type=submit][value]
1988 {
1989 /* text content/labels of HTML4/XHTML1 "input" buttons */
1990 content: attr(value);
1991 }
1993 textarea
1994 {
1995 /* white space handling of TEXTAREA tags in particular */
1996 white-space:pre-wrap;
1997 }
1999 input[type=hidden]
2000 {
2001 /* appearance of the HTML4/XHTML1 hidden text field in particular */
2002 display: none;
2003 }
2005 input[type=image]
2006 {
2007 display: inline-block;
2008 content: attr(src,url);
2009 border: none;
2010 }
2012 select[size]
2013 {
2014 /* HTML4/XHTML1 <select> w/ size more than 1 - appearance of list */
2015 display: inline-block;
2016 height: attr(size,em);
2017 }
2019 select,select[size=1]
2020 {
2021 /* HTML4/XHTML1 <select> without size, or size=1 - popup-menu */
2022 display: inline-block;
2023 height: 1em;
2024 overflow: hidden;
2025 }
2027 select[size]:active
2028 {
2029 /* active HTML4/XHTML <select> w/ size more than 1 - appearance of active list */
2030 display: inline-block;
2031 }
2033 optgroup,option
2034 {
2035 display: block;
2036 white-space: nowrap;
2037 }
2039 optgroup[label],option[label]
2040 {
2041 content: attr(label);
2042 }
2044 option[selected]::before
2045 {
2046 display: inline;
2047 content: check;
2048 }
2050 *[tabindex] { nav-index:attr(tabindex,number) }
2053 /* Though FRAME resizing is not directly addressed by this specification,
2054 the following rules may provide an approximation of reasonable behavior. */
2056 /*
2058 frame { resize:both }
2059 frame[noresize] { resize:none }
2061 */
2063 </pre>
2066 <h2 class="no-num">Appendix E: Test Suite</h2>
2068 <p>This appendix is <em>informative</em>.</p>
2070 <p>
2071 This specification shall refer to a test suite written according to the <a href="http://www.w3.org/Style/CSS/Test/testsuitedocumentation">CSS Test Suite Documentation</a> and following the <a href="http://www.w3.org/Style/CSS/Test/guidelines.html">CSS2.1 Test Case Authoring Guidelines</a>. The test suite shall allow user agents to verify their basic conformance to the specification. This test suite does not pretend to be exhaustive and does not cover all possible combinations of user interface related features. These tests will be made available from the <a href="http://www.w3.org/Style/CSS/Test/">CSS Test Suites</a> home page.
2072 </p>
2074 <p>Related issue:
2075 <a href="http://wiki.csswg.org/spec/css3-ui#issue-1">1</a>.
2076 </p>
2079 <h2 class="no-num">Index</h2>
2081 <p>This appendix is <em>informative</em>.</p>
2083 <!--index-->
2085 <h2 class="no-num">Property index</h2>
2087 <p>This appendix is <em>informative</em>.</p>
2089 <!-- properties -->
2091 </body>
2092 </html>
2093 <!-- Keep this comment at the end of the file
2094 Local variables:
2095 mode: sgml
2096 sgml-declaration:"~/SGML/HTML4.decl"
2097 sgml-default-doctype-name:"html"
2098 sgml-minimize-attributes:t
2099 sgml-nofill-elements:("pre" "style" "br")
2100 sgml-live-element-indicator:t
2101 End:
2102 -->