css-ui/Overview.bs

Sun, 31 Jan 2016 15:42:31 -0800

author
Peter Linss <[email protected]>
date
Sun, 31 Jan 2016 15:42:31 -0800
changeset 16986
5be73fbc8592
parent 16392
62d5237c0247
child 16989
255258410d1b
permissions
-rw-r--r--

change //dev.w3.org/csswg/ urls to //drafts.csswg.org/

     1 <h1>CSS Basic User Interface Module Level 3 (CSS3 UI)</h1>
     2 <style>#awesome-table td {padding:5px}</style>
     4 <pre class='metadata'>
     5 ED: https://drafts.csswg.org/css-ui/
     6 TR: http://www.w3.org/TR/css3-ui/
     7 Previous Version: http://www.w3.org/TR/2015/WD-css3-ui-20150707/
     8 Shortname: css-ui
     9 Level: 3
    10 Group: csswg
    11 !Issue Tracking: <a href="https://wiki.csswg.org/spec/css3-ui">https://wiki.csswg.org/spec/css3-ui</a>
    12 Status: ED
    13 Work Status: Testing
    14 Editor: Tantek Çelik, Mozilla https://www.mozilla.org/en-US/, [email protected], http://tantek.com
    15 Editor: Florian Rivoal, Invited Expert, [email protected], http://florian.rivoal.net
    16 Abstract: This specification describes user interface related
    17           properties and values that are proposed for CSS level&nbsp;3
    18           to style HTML and XML (including XHTML).
    19           It includes and extends user interface related features from the
    20           properties and values of CSS level&nbsp;2 revision 1.
    21           It uses various
    22           properties and values to style basic user interface elements in a document.
    23 Deadline: 2015-10-07
    24 Link Defaults: css-color-3 (property) color
    25 Link Defaults: css21 (property) min-width
    26 Link Defaults: css21 (property) min-height
    27 Link Defaults: css21 (property) max-width
    28 Link Defaults: css21 (property) max-height
    29 Link Defaults: css-writing-modes-3 (dfn) start
    30 Link Defaults: css-writing-modes-3 (dfn) end
    31 Ignored Terms: outline-top
    32 Ignored Terms: outline-left
    33 Ignored Terms: ime-mode
    34 At Risk: The 'caret-color' property
    35 At Risk: The <a href="#overflow-string">&lt;string&gt;</a> value of the 'text-overflow' property
    36 At Risk: The 2-value syntax of the 'text-overflow' property
    37 At Risk: Constraints on <a href="#negative-offset">negative values</a> of the 'outline-offset' property being expressed with MUST rather than with SHOULD
    38 </pre>
    40 <!-- Some of the following definitions have existing exported defintions from other specs,
    41 but not from specs that are OK to link to from a CR -->
    42 <pre class="anchors">
    43 url: http://www.w3.org/TR/CSS21/box.html#border-edge; type: dfn; spec: CSS21; text: border edge
    44 url: http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow
    45     type: property; spec: CSS21; text: overflow
    46     type: value; spec: CSS21; text: visible; for: overflow
    47 url: http://www.w3.org/TR/CSS21/visuren.html#position-props; type: property; spec: CSS21;
    48     text: top
    49     text: bottom
    50     text: left
    51     text: right
    52 </pre>
    54 <!--
    55 At risk due to only one implementation:
    57 Not at risk:
    58 <li>box-sizing implemented by IE5/Mac, Opera
    59 	-moz-box-sizing implemented by Mozilla
    61 <li>outline, outline-width, outline-color, outline-style all in CSS 2.1
    62 <li>outline-offset property
    63 	implemented by Safari 1.2
    65 <li>cursor property:
    66 	CSS2.1: auto | default | help | pointer | wait | crosshair | text |
    67 e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize
    68 	IE5/Mac implements: none | progress | cell
    69 	IE6/Windows implements: <uri> | progress | not-allowed | no-drop | vertical-text | all-scroll | col-resize | row-resize | move |
    70 	Mozilla implements: progress | cell(as -moz-cell) | alias(as -moz-alias) | copy(as -moz-copy) | context-menu(as -moz-context-menu) |
    71 	freedesktop.org copied all the cursors from the CSS3-UI LC Working Draft
    72 		by FredrikHoeglund - 14 Oct 2003
    73 		http://freedesktop.org/Standards/cursor-spec
    75 <li>'cursor' property values: ew-resize | ns-resize | nesw-resize | nwse-resize
    76 implemented by Firefox and Safari
    78 <li>'resize' property
    79 implemented by Firefox 4 and Safari
    80 <li>nav-up, nav-down, nav-right, nav-left properties
    81 implemented by Opera/Presto desktop with "shift+arrow", and Blink, as well as Samsung in webkit http://www.w3.org/2013/11/27-css-irc
    83 -->
    86 <h2 id="intro">Introduction</h2>
    88 This module describes CSS properties which enable authors
    89 to style user interface related properties and values.
    91 <a href="http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes">Section 2.1 of CSS1</a> [[CSS1]]
    92 and <a href="http://www.w3.org/TR/CSS2/ui.html">Chapter 18 of CSS2</a> [[CSS2]]
    93 introduced several user interface related properties and values.
    94 <a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> introduced several new user interface related features.
    96 This Working Draft incorporates, extends, and supersedes them.
    98 <h3 id="purpose">Purpose</h3>
   100 The purpose of this specification is to achieve the following objectives:
   101 <ul>
   102 <li>Extend the user interface features in CSS2.1.
   103 <li>Provide additional CSS mechanisms to augment or replace other
   104 dynamic presentation related features in HTML.
   105 <li>Introduce directional navigation properties to assist in the construction of
   106 user interfaces which make use of a directional navigation model.
   107 </ul>
   110 <h2 id="interaction">Module Interactions</h2>
   112 This document defines new features not present in earlier specifications.
   113 In addition, it replaces and supersedes the following:
   115 <ul>
   116 <li><a href="http://www.w3.org/TR/CSS21/ui.html#cursor-props">Section 18.1</a>,
   117 <a href="http://www.w3.org/TR/CSS21/ui.html#dynamic-outlines">section 18.4</a>,
   118 and Information on the stacking of outlines defined in
   119 <a href="http://www.w3.org/TR/CSS21/zindex.html">Appendix E</a>
   120 of Cascading Style Sheets, level 2, revision 1 [[CSS21]]
   121 <li><a href="http://www.w3.org/TR/2000/WD-css3-userint-20000216">User Interface for CSS3 (16 February 2000)</a> [[CSSUI]]
   122 </ul>
   124 <h2 id="box-model">Box Model addition</h2>
   126 <h3 id="box-sizing">'box-sizing' property</h3>
   128 <table class="propdef"><tbody>
   129 <tr><th>Name:</th><td><dfn>box-sizing</dfn></td></tr>
   130 <tr><th>Value:</th><td>
   131 content-box |
   132 border-box
   133 </td></tr>
   134 <tr><th>Initial:</th><td>content-box</td></tr>
   135 <tr><th>Applies to:</th><td>all elements that accept width or height</td></tr>
   136 <tr><th>Inherited:</th><td>no</td></tr>
   137 <tr><th>Percentages:</th><td>N/A</td></tr>
   138 <tr><th>Media:</th><td>visual</td></tr>
   139 <tr><th>Computed&nbsp;value:</th><td>specified value</td></tr>
   140 <tr><th>Animatable:</th><td>no</td></tr>
   141 </tbody></table>
   143 <dl dfn-type=value dfn-for=box-sizing>
   144 <dt><dfn>content-box</dfn></dt>
   145 <dd>This is the behavior of width and height as specified by CSS2.1.
   146 The specified width and height (and respective min/max properties)
   147 apply to the width and height respectively of the content box of the element.
   148 The padding and border of the element are laid out
   149 and drawn outside the specified width and height.</dd>
   150 <dt><dfn>border-box</dfn></dt>
   151 <dd>Length and percentages values for width and height (and respective min/max properties)
   152 on this element determine the border box of the element.
   153 That is, any padding or border specified on the element
   154 is laid out and drawn inside this specified width and height.
   155 The content width and height are calculated
   156 by subtracting the border and padding widths of the respective sides
   157 from the specified 'width'
   158 and 'height' properties.
   159 As the content width and height
   160 <a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property">cannot be negative</a> ([[!CSS21]], section 10.2),
   161 this computation is floored at 0.
   162 Used values, as exposed for instance through getComputedStyle(), also refer to the border box.
   164 Note: This is the behavior of width and height as commonly implemented
   165 by legacy HTML user agents for replaced elements and input elements.
   166 </dd>
   167 </dl>
   169 Note: In contrast to the length and percentage values,
   170 the ''width/auto'' value of the 'width' and 'height' properties
   171 (as well as other keyword values introduced by later specifications,
   172 unless otherwise specified)
   173 is not influenced by the 'box-sizing' property,
   174 and always sets the size of the content box.
   176 The following terms, whose definitions vary based on the computed value of 'box-sizing' are introduced:
   178 <table border="1">
   179 <tr><th><th>''box-sizing: content-box''<th>''box-sizing: border-box''
   180 <tr><td><dfn>min inner width</dfn><td>'min-width'<td>max(0, 'min-width' &minus; 'padding-left' &minus; 'padding-right' &minus; 'border-left-width' &minus; 'border-right-width')
   181 <tr><td><dfn>max inner width</dfn><td>'max-width'<td>max(0, 'max-width' &minus; 'padding-left' &minus; 'padding-right' &minus; 'border-left-width' &minus; 'border-right-width')
   182 <tr><td><dfn>min inner height</dfn><td>'min-height'<td>max(0, 'min-height' &minus; 'padding-top' &minus; 'padding-bottom' &minus; 'border-top-width' &minus; 'border-bottom-width')
   183 <tr><td><dfn>max inner height</dfn><td>'max-height'<td>max(0, 'max-height' &minus; 'padding-top' &minus; 'padding-bottom' &minus; 'border-top-width' &minus; 'border-bottom-width')
   184 </table>
   186 The <a href="http://www.w3.org/TR/CSS21/visudet.html">Visual formatting model details</a> of [[!CSS21]] are written assuming ''box-sizing: content-box''. The following disambiguations are made to clarify the behavior for all values of 'box-sizing':
   188 <ol>
   189 <li>In <a href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">10.3.3</a>, the second <q>width</q> in the following phrase is to be interpreted as <a spec="css21">content width</a>: <q>If 'width' is not ''width/auto'' and 'border-left-width' + 'padding-left' + 'width' + [...]</q>
   191 <li>In <a href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width">10.3.7</a>, <q>width</q> is to be interpreted as <a spec="css21">content width</a> in the following equation: <q>'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + [...]</q>
   193 <li>In <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths">10.4</a>, <q>width</q>, <q>height</q>, <q>min-width</q>, <q>max-width</q>, <q>min-height</q> and <q>max-height</q> are respectively to be interpreted as <a spec="css21">content width</a>, <a spec="css21">content height</a>, <a>min inner width</a>, <a>max inner width</a>, <a>min inner height</a> and <a>max inner height</a> in the following phrases:
   194   <ol>
   195   <li><q>The tentative used width is calculated [...]</q>
   196   <li><q>If the tentative used width is greater than 'max-width', the rules above are applied again, but this time using the computed value of 'max-width' as the computed value for 'width'.</q>
   197   <li><q>If the resulting width is smaller than 'min-width', the rules above are applied again, but this time using the value of 'min-width' as the computed value for 'width'.</q>
   198   <li><q>Select from the table the resolved height and width values for the appropriate constraint violation. Take the max-width and max-height as max(min, max) so that min ≤ max holds true. In this table w and h stand for the results of the width and height computations [...]</q>
   199   <li>All instances of these words in the table
   200   <li><q>Then apply the rules under "Calculating widths and margins" above, as if 'width' were computed as this value.</q>
   201   </ol>
   203 <li>In <a href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height">10.6.4</a>, <q>height</q> is to be interpreted as <a spec="css21">content height</a> in the following equation: <q>'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height' + [...]</q>
   205 <li>In <a href="http://www.w3.org/TR/CSS21/visudet.html#min-max-heights">10.7</a>, <q>width</q>, <q>height</q>, <q>min-height</q> and <q>max-height</q> are respectively to be interpreted as <a spec="css21">content width</a>, <a spec="css21">content height</a>, <a>min inner height</a> and <a>max inner height</a> in the following phrases:
   206   <ol>
   207   <li><q>The tentative used height is calculated [...]</q>
   208   <li><q>If this tentative height is greater than 'max-height', the rules above are applied again, but this time using the value of 'max-height' as the computed value for 'height'.</q>
   209   <li><q>If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'.</q>
   210   <li><q>[...] use the algorithm under Minimum and maximum widths above to find the used width and height. Then apply the rules under "Computing heights and margins" above, using the resulting width and height as if they were the computed values.</q>
   211   </ol>
   212 </ol>
   214 <div class="example"><p style="display:none">Example(s):
   215 <h4 id="box-sizing-example" class="no-num no-toc">Using box-sizing to evenly share space</h4>
   217 This example uses box-sizing to evenly horizontally split
   218 two divs with fixed size borders inside a div container,
   219 which would otherwise require additional markup.
   221 sample CSS:
   222 <pre><code class="lang-css">
   223 div.container {
   224 	width:38em;
   225 	border:1em solid black;
   226 }
   228 div.split {
   229 	box-sizing:border-box;
   230 	width:50%;
   231 	border:1em silver ridge;
   232 	float:left;
   233 }
   234 </code></pre>
   236 sample HTML fragment:
   237 <pre><code class="lang-markup">
   238 &lt;div class="container"&gt;
   239 &lt;div class="split"&gt;This div occupies the left half.&lt;/div&gt;
   240 &lt;div class="split"&gt;This div occupies the right half.&lt;/div&gt;
   241 &lt;/div&gt;
   242 </code></pre>
   244 demonstration of sample CSS and HTML:
   245 <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 'box-sizing'.
   246 </div>
   247 </div>
   249 <h2 id="outline-props">Outline properties</h2>
   251 At times, style sheet authors may want to create outlines around
   252 visual objects such as buttons, active form fields, image maps, etc.,
   253 to make them stand out. Outlines differ from borders in the following
   254 ways:
   256 <ol>
   257 <li>Outlines do not take up space.
   258 <li>Outlines may be non-rectangular.
   259 <li>UAs often render outlines on elements in the :focus state.
   260 </ol>
   262 The outline properties control the style of these dynamic outlines.
   264 The stacking of the rendering of these outlines is explicitly left up to implementations to provide a better user experience per platform. This supersedes the stacking of outlines as defined in CSS 2.1.
   266 <strong class="advisement">
   267 Keyboard users,
   268 in particular people with disabilities
   269 who may not be able to interact with the page in any other fashion,
   270 depend on the outline being visible
   271 on elements in the :focus state,
   272 thus authors must not make the outline invisible on such elements
   273 without making sure an alternative highlighting mechanism is provided.
   274 </strong>
   276 The rendering of applying transforms to outlines is left explicitly undefined in CSS3-UI.
   279 <h3 id="outline">'outline' property</h3>
   281 <table class="propdef"><tbody>
   282 <tr><th>Name:</th><td><dfn>outline</dfn></td></tr>
   283 <tr><th>Value:</th><td>
   284 [ &lt;'outline-color'&gt; || &lt;'outline-style'&gt; ||
   285 &lt;'outline-width'&gt; ]
   286 </td></tr>
   287 <tr><th>Initial:</th><td>see individual properties</td></tr>
   288 <tr><th>Applies to:</th><td>all elements</td></tr>
   289 <tr><th>Inherited:</th><td>no</td></tr>
   290 <tr><th>Percentages:</th><td>N/A</td></tr>
   291 <tr><th>Media:</th><td>visual</td></tr>
   292 <tr><th>Computed&nbsp;value:</th><td>see individual properties</td></tr>
   293 <tr><th>Animatable:</th><td>see individual properties</td></tr>
   294 </tbody></table>
   296 <h3 id="outline-width">'outline-width' property</h3>
   298 <table class="propdef"><tbody>
   299 <tr><th>Name:</th><td><dfn>outline-width</dfn></td></tr>
   300 <tr><th>Value:</th><td><<'border-width'>></td></tr>
   301 <tr><th>Initial:</th><td>medium</td></tr>
   302 <tr><th>Applies to:</th><td>all elements</td></tr>
   303 <tr><th>Inherited:</th><td>no</td></tr>
   304 <tr><th>Percentages:</th><td>N/A</td></tr>
   305 <tr><th>Media:</th><td>visual</td></tr>
   306 <tr><th>Computed&nbsp;value:</th><td>absolute length; ''0'' if the outline style is ''outline-width/none''.</td></tr>
   307 <tr><th>Animatable:</th><td>as <a href="https://drafts.csswg.org/css3-transitions/#animtype-length">length</a></td></tr>
   308 </tbody></table>
   310 <h3 id="outline-style">'outline-style' property</h3>
   312 <table class="propdef"><tbody>
   313 <tr><th>Name:</th><td><dfn>outline-style</dfn></td></tr>
   314 <tr><th>Value:</th><td>auto | <<'border-style'>></td></tr>
   315 <tr><th>Initial:</th><td>none</td></tr>
   316 <tr><th>Applies to:</th><td>all elements</td></tr>
   317 <tr><th>Inherited:</th><td>no</td></tr>
   318 <tr><th>Percentages:</th><td>N/A</td></tr>
   319 <tr><th>Media:</th><td>visual</td></tr>
   320 <tr><th>Computed&nbsp;value:</th><td>specified value</td></tr>
   321 <tr><th>Animatable:</th><td>no</td></tr>
   322 </tbody></table>
   324 <h3 id="outline-color">'outline-color' property</h3>
   326 <table class="propdef"><tbody>
   327 <tr><th>Name:</th><td><dfn>outline-color</dfn></td></tr>
   328 <tr><th>Value:</th><td><<color>> | invert</td></tr>
   329 <tr><th>Initial:</th><td>invert</td></tr>
   330 <tr><th>Applies to:</th><td>all elements</td></tr>
   331 <tr><th>Inherited:</th><td>no</td></tr>
   332 <tr><th>Percentages:</th><td>N/A</td></tr>
   333 <tr><th>Media:</th><td>visual</td></tr>
   334 <tr><th>Computed&nbsp;value:</th><td>The computed value for ''invert'' is ''invert''. For <<color>> values, the computed value is as defined for the [[!CSS3COLOR]] 'color' property.</td></tr>
   335 <tr><th>Animatable:</th><td>as <a href="https://drafts.csswg.org/css3-transitions/#animtype-color">color</a></td></tr>
   336 </tbody></table>
   338 The outline created with the outline properties is drawn "over" a box,
   339 i.e., the outline is always on top,
   340 and doesn't influence the position or size of the box,
   341 or of any other boxes.
   342 Therefore, displaying or suppressing outlines does not cause reflow.
   344 Outlines may be non-rectangular.
   345 For example, if the element is broken across several lines,
   346 the outline should be an outline or minimum set of outlines
   347 that encloses all the element's boxes.
   349 Each part of the outline should be fully connected
   350 rather than open on some sides
   351 (as borders on inline elements are when lines are broken).
   353 The parts of the outline are not required to be rectangular.
   354 To the extent that the outline follows the <a>border edge</a>,
   355 it should follow the 'border-radius' curve.
   357 The position of the outline may be affected by descendant boxes.
   359 User agents should use an algorithm for determining
   360 the outline that encloses a region appropriate
   361 for conveying the concept of focus to the user.
   363 Note: This specification does not define the exact position or shape of the outline, but it is typically drawn immediately outside the border box.
   366 The 'outline-width' property accepts
   367 the same values as
   368           'border-width'
   369 ([[!CSS3BG]],
   370 <a href="http://www.w3.org/TR/css3-background/#the-border-width">Section 4.3</a>).
   372 The 'outline-style' property accepts
   373 the same values as
   374           'border-style'
   375 ([[!CSS3BG]],
   376 <a href="http://www.w3.org/TR/css3-background/#the-border-style">Section 4.2</a>),
   377 except that
   378 <span class=css>hidden</span> is not a legal outline style.
   379 In addition, in CSS3,
   380 'outline-style'
   381 accepts the value ''outline-style/auto''.
   382 The ''outline-style/auto'' value permits the user agent
   383 to render a custom outline style,
   384 typically a style which is either a user interface default for the platform,
   385 or perhaps a style that is richer
   386 than can be described in detail in CSS,
   387 e.g. a rounded edge outline with semi-translucent outer pixels
   388 that appears to glow.
   389 As such, this specification does not define how the
   390 'outline-color'
   391 is incorporated or used (if at all) when rendering
   392 ''outline-style/auto'' style outlines.
   393 User agents may treat ''outline-style/auto'' as
   394 ''solid''.
   396 The 'outline-color' property
   397 accepts all colors, as well as the keyword <dfn>invert</dfn>.
   398 ''Invert'' is expected to perform a color inversion on the pixels on the screen.
   399 This is a common trick to ensure the focus border is visible,
   400 regardless of color background.
   402 Conformant UAs may ignore the ''invert'' value
   403 on platforms that do not support color inversion of the pixels on the screen.
   405 If the UA does not support the ''invert'' value
   406 then it must reject that value at parse-time, and
   407 the initial value of the 'outline-color' property
   408 is the ''color/currentColor'' [[!CSS3COLOR]] keyword.
   410 The 'outline' property is a shorthand property,
   411 and sets all three of 'outline-style',
   412 'outline-width',
   413 and 'outline-color'.
   415 Note: The outline is the same on all sides.
   416 In contrast to borders,
   417 there are no 'outline-top' or 'outline-left' etc. properties.
   419 This specification does not define how multiple overlapping outlines are drawn,
   420 or how outlines are drawn for boxes that are partially obscured behind other elements.
   422 <div class="example"><p style="display:none">Example(s):
   424 Here's an example of drawing a thick outline around a BUTTON element:
   425 <pre><code class="lang-css">
   426 button { outline: thick solid }
   427 </code></pre>
   428 </div>
   430 Graphical user interfaces may use outlines around elements
   431 to tell the user which element on the page has the focus.
   432 These outlines are in addition to any borders,
   433 and switching outlines on and off should not cause the document to reflow.
   434 The focus is the subject of user interaction in a document
   435 (e.g. for entering text or selecting a button).
   437 <div class="example"><p style="display:none">Example(s):
   439 For example, to draw a thick black line around an element when it has the focus,
   440 and a thick red line when it is active,
   441 the following rules can be used:
   442 <pre><code class="lang-css">
   443 :focus  { outline: thick solid black }
   444 :active { outline: thick solid red }
   445 </code></pre>
   446 </div>
   448 Note: Since the outline does not affect formatting
   449 (i.e., no space is left for it in the box model),
   450 it may well overlap other elements on the page.
   452 <h3 id="outline-offset">'outline-offset' property</h3>
   454 By default, the outline is drawn starting just outside the <a>border edge</a>.
   455 However, it is possible to offset the outline and draw it beyond the <a>border edge</a>.
   457 <table class="propdef"><tbody>
   458 <tr><th>Name:</th><td><dfn>outline-offset</dfn></td></tr>
   459 <tr><th>Value:</th><td><<length>></td></tr>
   460 <tr><th>Initial:</th><td>0</td></tr>
   461 <tr><th>Applies to:</th><td>all elements</td></tr>
   462 <tr><th>Inherited:</th><td>no</td></tr>
   463 <tr><th>Percentages:</th><td>N/A</td></tr>
   464 <tr><th>Media:</th><td>visual</td></tr>
   465 <tr><th>Computed&nbsp;value:</th><td><<length>> value in absolute units (px or physical).</td></tr>
   466 <tr><th>Animatable:</th><td>as <a href="https://drafts.csswg.org/css3-transitions/#animtype-length">length</a></td></tr>
   467 </tbody></table>
   469 If the computed value of 'outline-offset'
   470 is anything other than 0,
   471 then the outline is outset from the <a>border edge</a> by that amount.
   473 <div class="example"><p style="display:none">Example(s):
   475 For example,
   476 to leave 2 pixels of space between a focus outline
   477 and the element that has the focus or is active,
   478 the following rule can be used:
   479 <pre><code class="lang-css">
   480 :focus,:active  { outline-offset: 2px }
   481 </code></pre>
   482 </div>
   484 <p id=negative-offset>Negative values must cause the outline
   485 to shrink into the border box.
   486 Both the height and the width of outside of the shape
   487 drawn by the outline must not become smaller
   488 than twice the computed value of the outline-width property,
   489 to make sure that an outline can be rendered
   490 even with large negative values.
   491 User Agents must apply this constraint
   492 independently in each dimension.
   493 If the outline is drawn as multiple disconnected shapes,
   494 this constraint applies to each shape separately.
   496 Note: Negative value constraints are an at risk feature due to
   497 <a href="https://lists.w3.org/Archives/Public/www-style/2014Dec/0033.html">interoperability problems</a>, and thus might be dropped from a must to a should.
   500 <h2 id="resizing-and-overflow">Resizing &amp; Overflow</h2>
   502 CSS2.1 provides a mechanism for controlling the appearance of a scrolling mechanism
   503 (e.g. scrollbars)
   504 on block container elements.
   505 This specification adds to that a mechanism for controlling
   506 user resizability of elements as well as the ability to specify text overflow behavior.
   508 <h3 id="resize">'resize' property</h3>
   510 The 'resize' property allows the author
   511 to specify whether or not an element is resizable by the user,
   512 and if so, along which axis/axes.
   514 <table class="propdef"><tbody>
   515 <tr><th>Name:</th><td><dfn>resize</dfn></td></tr>
   516 <tr><th>Value: </th><td>none | both | horizontal | vertical</td></tr>
   517 <tr><th>Initial:</th><td>none</td></tr>
   518 <tr><th>Applies to:</th><td>elements with 'overflow' other than visible,
   519 and optionally replaced elements representing images or videos, and iframes</td></tr>
   520 <tr><th>Inherited:</th><td>no</td></tr>
   521 <tr><th>Percentages:</th><td>N/A</td></tr>
   522 <tr><th>Media:</th><td>visual</td></tr>
   523 <tr><th>Computed&nbsp;value:</th><td>specified value.</td></tr>
   524 <tr><th>Animatable:</th><td>no</td></tr>
   525 </tbody></table>
   527 <dl>
   528 <dt>none</dt>
   529 <dd>The UA does not present a resizing mechanism on the element,
   530 and the user is given no direct manipulation mechanism to resize the element.</dd>
   531 <dt>both</dt>
   532 <dd>The UA presents a bidirectional resizing mechanism
   533 to allow the user to adjust both the height and the width of the element.</dd>
   534 <dt>horizontal</dt>
   535 <dd>The UA presents a unidirectional horizontal resizing mechanism
   536 to allow the user to adjust only the width of the element.</dd>
   537 <dt>vertical</dt>
   538 <dd>The UA presents a unidirectional vertical resizing mechanism
   539 to allow the user to adjust only the height of the element.</dd>
   540 </dl>
   542 Currently it is possible to control the appearance of the scrolling mechanism (if any)
   543 on an element using the 'overflow' property
   544 (e.g. <code class="lang-css">overflow: scroll</code> vs. <code class="lang-css">overflow: hidden</code> etc.).
   545 The purpose of the 'resize' property
   546 is to allow control over the appearance and function of the resizing mechanism
   547 (e.g. a resize box or widget) on the element.
   549 Note: The resizing mechanism is NOT the same as the scrolling mechanism.
   550 The scrolling mechanism allows the user
   551 to determine which portion of the contents of an element is shown.
   552 The resizing mechanism allows the user
   553 to determine the size of the element.
   555 The 'resize' property applies to elements
   556 whose computed 'overflow' value
   557 is something other than ''visible''.
   558 UAs may also apply it,
   559 regardless of the value of the ''overflow'' property,
   560 to:
   561 <ul>
   562 	<li>Replaced elements representing images or videos, such as <{img}>, <{video}>, <{picture}>, <{svg}>, <{object}>, or <{canvas}>.
   563 	<li>The <{iframe}> element.
   564 </ul>
   567 The effect of the 'resize' property on generated content is undefined. Implementations should not apply the 'resize' property to generated content.
   569 Note: the 'resize' property may apply to generated content in the future if there is implementation of <a href="https://drafts.csswg.org/css-pseudo/#CSSPseudoElement-interface">Interface CSSPseudoElement</a>.
   571 When an element is resized by the user,
   572 the user agent sets
   573 the 'width' and 'height' properties
   574 to px unit length values of the size indicated by the user,
   575 in the element’s <a href="http://www.w3.org/TR/css-style-attr/#style-attribute">style attribute</a> DOM,
   576 replacing existing property declaration(s), if any,
   577 without ''!important'', if any.
   579 If an element is resized in only one dimension,
   580 only the corresponding property is set, not both.
   582 The precise direction of resizing
   583 (i.e. altering the top left of the element or altering the bottom right)
   584 may depend on a number of CSS layout factors
   585 including whether the element is absolutely positioned,
   586 whether it is positioned using the 'right'
   587 and 'bottom' properties,
   588 whether the language of the element is right-to-left etc.
   589 The UA should consider the direction of resizing
   590 (as determined by CSS layout),
   591 as well as platform conventions and constraints when deciding
   592 how to convey the resizing mechanism to the user.
   594 The user agent must allow the user to resize the element
   595 with no other constraints than what is imposed by
   596 'min-width', 'max-width', 'min-height', and 'max-height'.
   597 (The "must" is <a href="https://wiki.csswg.org/spec/css3-ui#issue-53">at risk</a>
   598 since
   599 <a href="http://lists.w3.org/Archives/Public/www-style/2014Dec/0063.html">only Firefox currently supports this</a>, and may be downgraded to a "should".)
   601 Note: There may be situations where user attempts to resize an element
   602 appear to be overriden or ignored, e.g. because of ''!important'' cascading declarations that supersede
   603 that element’s <a href="http://www.w3.org/TR/css-style-attr/#style-attribute">style attribute</a>
   604 'width' and 'height' properties in the DOM.
   606 Changes to the computed value of an element's 'resize' property
   607 do not reset changes to the <a href="http://www.w3.org/TR/css-style-attr/#style-attribute">style attribute</a> made due to
   608 user resizing of that element.
   610 <div class="example"><p style="display:none">Example(s):
   612 For example,
   613 to make iframes scrollable <em>and</em> resizable,
   614 the following rule can be used:
   615 <pre><code class="lang-css">
   616 iframe,object[type^="text/"],
   617 object[type$="+xml"],object[type="application/xml"]
   618 {
   619   overflow:auto;
   620   resize:both;
   621 }
   622 </code></pre>
   623 </div>
   625 <!--
   626 too bad we don't have @viewport yet. otherwise this would be cool:
   627 <pre><code class="lang-css">
   628 @viewport {
   629        width: 100px;
   630        height: 100px;
   631        overflow: hidden;
   632        resize: none
   633      } /* display content in a non-resizable 100px by 100px window */
   634 </code></pre>
   635 -->
   638 <h3 id="text-overflow">
   639     Overflow Ellipsis: the 'text-overflow' property</h3>
   641 <table class="propdef"><tbody>
   642 <tr><th>Name:</th>
   643     <td><dfn>text-overflow</dfn></td></tr>
   644 <tr><th>Value:</th>
   645     <td> [
   646 clip |
   647 ellipsis |
   648 <<string>>
   649 ]{1,2}
   650 </td></tr>
   651 <tr><th>Initial:</th>
   652     <td>clip</td></tr>
   653 <tr><th>Applies to:</th>
   654     <td>block containers</td></tr>
   655 <tr><th>Inherited:</th>
   656     <td>no</td></tr>
   657 <tr><th>Percentages:</th>
   658     <td>N/A</td></tr>
   659 <tr><th>Media:</th>
   660     <td>visual</td></tr>
   661 <tr><th>Computed&nbsp;value:</th>
   662     <td>as specified</td></tr>
   663 <tr><th>Animatable:</th>
   664     <td>no</td></tr>
   665 </tbody></table>
   667 This property specifies rendering when inline content overflows
   668 its line box edge
   669 in the inline progression direction of its block container element ("the block")
   670 that has 'overflow'
   671 other than ''visible''.
   673 Text can overflow for example when it is prevented from wrapping
   674 (e.g. due to <code class="lang-css">white-space: nowrap</code>
   675 or a single word is too long to fit).
   676 Values have the following meanings:
   678 <dl data-dfn-for="overflow" class="valuedef">
   679   <dt id=overflow-clip><dfn>clip</dfn></dt>
   680     <dd>Clip inline content that overflows its block container element. Characters may be only partially rendered.</dd>
   682   <dt id=overflow-ellipsis><dfn>ellipsis</dfn></dt>
   683     <dd>
   684 Render an ellipsis character (U+2026)
   685 to represent clipped inline content.
   686 Implementations may substitute a more language, script, or writing-mode appropriate
   687 ellipsis character,
   688 or three dots "..." if the ellipsis character is unavailable.
   689 </dd>
   690 <dt id=overflow-string><<string>></dt>
   691    <dd>
   692 Render the given string to represent clipped inline content.
   693 The given string is treated as an independent paragraph
   694 for bidi purposes.
   695 </dd>
   696 </dl>
   698 Note: The <<string>> value, and the 2-value syntax "{1,2}"
   699 and functionality are all at risk.
   701 The term "character" is used in this property definition
   702 for better readability and means "grapheme cluster" [[!UAX29]]
   703 for implementation purposes.
   705 If there is one value,
   706 it applies only to the <a>end</a> line box edge.
   707 If there are two values,
   708 the first value applies to the <a>line-left</a> edge,
   709 and the second value applies to the <a>line-right</a> edge.
   710 The terms <a>end</a>, <a>line-left</a> and <a>line-right</a> are defined in [[!CSS3-WRITING-MODES]].
   712 Note: the use of <a>line-left</a> and <a>line-right</a>
   713 rather than <a>start</a> and <a>end</a>
   714 when there are two values is intentional,
   715 to facilitate the use of directional characters such as arrows.
   717 For the ellipsis
   718 and string values,
   719 implementations must hide characters and
   720 <a href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes">
   721 atomic inline-level elements</a>
   722 at the applicable edge(s) of the line as necessary to fit the ellipsis/string.
   723 Place the ellipsis/string immediately adjacent
   724 to the applicable edge(s) of the remaining inline content.
   725 The first character or
   726 <a href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes">
   727 atomic inline-level element</a>
   728 on a line
   729 must be clipped rather than ellipsed.
   731 <h4 id="ellipsing-details" class="no-num no-toc">ellipsing details</h4>
   732 <ul>
   733 <li>
   734 Ellipsing only affects rendering and must not affect layout
   735 nor dispatching of pointer events.
   736 <li>
   737 The ellipsis is styled and baseline-aligned according to
   738 the block.
   739 <li>
   740 Ellipsing occurs after relative positioning and other graphical transformations.
   741 <li>
   742 If there is insufficient space for the ellipsis,
   743 then clip the rendering of the ellipsis itself
   744 (on the same side that neutral characters on the line
   745 would have otherwise been clipped with the ''text-overflow:clip'' value).
   746 </ul>
   748 <h4 id="ellipsis-interaction" class="no-num no-toc">user interaction with ellipsis</h4>
   749 <ul>
   750 <li>When the user is interacting with content
   751 (e.g. editing, selecting, scrolling),
   752 the user agent may treat text-overflow ''ellipsis'' or string values as ''text-overflow:clip''.
   754 <li>Selecting the ellipsis should select the ellipsed text.
   755 If all of the ellipsed text is selected,
   756 UAs should show selection of the ellipsis.
   757 Behavior of partially-selected ellipsed text is up to the UA.
   759 </ul>
   761 <div class="example"><p style="display:none">Example(s):
   762 <h4 id="text-overflow-examples" class="no-num no-toc">text-overflow examples</h4>
   764 These examples demonstrate setting the text-overflow of a block container element
   765 that has text which overflows its dimensions:
   767 sample CSS for a div:
   768 <pre><code class="lang-css">div {
   769   font-family:Helvetica,sans-serif; line-height:1.1;
   770   width:3.1em; padding:.2em; border:solid .1em black; margin:1em 0;
   771 }</code></pre>
   773 sample HTML fragments, renderings, and your browser:
   774 <table style="color:#000;background:#fff" id="awesome-table"><tbody>
   775 <tr><th>HTML</th><th>sample rendering</th><th>your browser</th></tr>
   776 <tr>
   777 <td><pre><code class="lang-markup">&lt;div&gt;
   778 CSS IS AWESOME, YES
   779 &lt;/div&gt;
   780 </code></pre></td>
   783 <td>
   784 <object type="image/png" data="images/cssisawesome.png">
   785 First, a box with text drawing outside of it.
   786 </object>
   787 </td>
   789 <td>
   790 <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>
   791 </td>
   792 </tr>
   794 <tr>
   795 <td><pre><code class="lang-markup">&lt;div style="<strong>text-overflow:clip;</strong> overflow:hidden"&gt;
   796 CSS IS AWESOME, YES
   797 &lt;/div&gt;
   798 </code></pre></td>
   800 <td>
   801 <object type="image/png" data="images/cssisaweso.png">
   802 Second, a similar box with the text clipped outside the box.
   803 </object></td>
   805 <td>
   806 <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>
   807 </td>
   808 </tr>
   810 <tr>
   811 <td><pre><code class="lang-markup">&lt;div style="<strong>text-overflow:ellipsis;</strong> overflow:hidden"&gt;
   812 CSS IS AWESOME, YES
   813 &lt;/div&gt;
   814 </code></pre></td>
   816 <td>
   817 <object type="image/png" data="images/cssisaw.png">
   818 Third, a similar box with an ellipsis representing the clipped text.
   819 </object>
   820 </td>
   822 <td>
   823 <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>
   824 </td>
   825 </tr>
   828 <tr>
   829 <td><pre><code class="lang-markup">&lt;div style="<strong>text-overflow:ellipsis;</strong> overflow:hidden"&gt;
   830 NESTED
   831  &lt;p&gt;PARAGRAPH&lt;/p&gt;
   832 WON'T ELLIPSE.
   833 &lt;/div&gt;
   834 </code></pre></td>
   836 <td>
   837 <object type="image/png" data="images/nes.png">
   838 Fourth, a box with a nested paragraph demonstrating anonymous block boxes equivalency and non-inheritance into a nested element.
   839 </object>
   840 </td>
   842 <td>
   843 <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
   844  <p>PARAGRAPH</p>
   845 WON'T ELLIPSE.</div>
   846 </td>
   848 </tr>
   849 </tbody></table>
   851 </div>
   853 Note: the side of the line that the ellipsis is placed depends on the 'direction' of the block.
   854 E.g. an overflow hidden right-to-left
   855 (<code class="lang-css">direction: rtl</code>)
   856 block clips inline content on the <a spec=css-writing-modes-3>left</a> side,
   857 thus would place a text-overflow ellipsis on the <a spec=css-writing-modes-3>left</a>
   858 to represent that clipped content.
   860 <!-- insert RTL example diagram here to illustrate note. -->
   862 <h4 id="ellipsis-scrolling" class="no-num no-toc">ellipsis interaction with scrolling interfaces</h4>
   864 This section applies to elements with text-overflow other than ''text-overflow:clip''
   865 (non-clip text-overflow)
   866 and overflow:scroll.
   868 When an element with non-clip text-overflow has overflow of scroll
   869 in the inline progression dimension of the text,
   870 and the browser provides a mechanism for scrolling
   871 (e.g. a scrollbar on the element,
   872 or a touch interface to swipe-scroll, etc.),
   873 there are additional implementation details that provide a better user experience:
   875 When an element is scrolled (e.g. by the user, DOM manipulation),
   876 more of the element's content is shown.
   877 The value of text-overflow should not affect
   878 whether more of the element's content is shown or not.
   879 If a non-clip text-overflow is set,
   880 then as more content is scrolled into view,
   881 implementations should show whatever additional content fits,
   882 only truncating content which would otherwise be clipped
   883 (or is necessary to make room for the ellipsis/string),
   884 until the element is scrolled far enough
   885 to display the edge of the content
   886 at which point that content should be displayed
   887 rather than an ellipsis/string.
   889 <div class="example"><p style="display:none">Example(s):
   891 This example uses text-overflow on an element with overflow scroll
   892 to demonstrate the above described behavior.
   894 sample CSS:
   895 <pre><code class="lang-css">
   896 div.crawlbar {
   897 	text-overflow: ellipsis;
   898 	height: 2em;
   899 	overflow: scroll;
   900 	white-space: nowrap;
   901 	width: 15em;
   902 	border:1em solid black;
   903 }
   904 </code></pre>
   906 sample HTML fragment:
   907 <pre><code class="lang-markup">
   908 &lt;div class="crawlbar"&gt;
   909 CSS is awesome, especially when you can scroll
   910 to see extra text instead of just
   911 having it overlap other text by default.
   912 &lt;/div&gt;
   913 </code></pre>
   915 demonstration of sample CSS and HTML:
   916 <div style="text-overflow: ellipsis; height: 2em; overflow: scroll; white-space: nowrap; width: 15em; border:1em solid black;">
   917 CSS is awesome, especially when you can scroll
   918 to see extra text instead of just
   919 having it overlap other text by default.
   920 </div>
   921 </div> <!-- example -->
   923 As some content is scrolled into view,
   924 it is likely that other content may scroll out of view on the other side.
   925 If that content's block container element is the same
   926 that's doing the scrolling,
   927 and the computed value of 'text-overflow' has two values, with
   928 the value applying to the start edge being a non-clip value,
   929 then implementations must render an ellipsis/string in place of
   930 the clipped content,
   931 with the same details as described in the value definition above,
   932 except that the ellipsis/string is drawn in the <a>start</a>
   933 (rather than <a>end</a>) of
   934 the block's direction (per the direction property).
   936 While the content is being scrolled,
   937 implementations may adjust their rendering of ellipses/strings
   938 (e.g. align to the box edges rather than line edges).
   940 <div class="example"><p style="display:none">Example(s):
   942 Same as previous example except with <code>text-overflow: ellipsis ellipsis</code>, demonstrated:
   944 <div style="text-overflow: ellipsis ellipsis; height: 2em; overflow: scroll; white-space: nowrap; width: 15em; border:1em solid black;">
   945 CSS is awesome, especially when you can scroll
   946 to see extra text instead of just
   947 having it overlap other text by default.
   948 </div>
   949 </div><!-- example -->
   951 If there is insufficient space for both start
   952 and end ellipses/strings,
   953 then only the end ellipsis/string should be rendered.
   955 <h2 id="pointing-keyboard">Pointing Devices and Keyboards</h2>
   957 <h3 id="pointer-interaction">Pointer interaction</h3>
   959 <h4 id="cursor">'cursor' property</h4>
   960 <table class="propdef"><tbody>
   961 <tr><th>Name:</th><td><dfn>cursor</dfn></td></tr>
   962 <tr><th>Value:</th><td>
   963 [ [<<url>> [&lt;x&gt; &lt;y&gt;]?,]* <br>
   964 [ auto | default | none |<br>
   965  context-menu | help | pointer | progress | wait | <br>
   966  cell | crosshair | text | vertical-text | <br>
   967  alias | copy | move | no-drop | not-allowed | grab | grabbing | <br>
   968  e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize |
   969  ew-resize | ns-resize | nesw-resize | nwse-resize |
   970  col-resize | row-resize |
   971  all-scroll
   972 | zoom-in | zoom-out
   973 <br>
   974 ] ] </td></tr>
   975 <tr><th>Initial:</th><td>auto</td></tr>
   976 <tr><th>Applies to:</th><td>all elements</td></tr>
   977 <tr><th>Inherited:</th><td>yes</td></tr>
   978 <tr><th>Percentages:</th><td>N/A</td></tr>
   979 <tr><th>Media:</th><td>visual, interactive</td></tr>
   980 <tr><th>Computed&nbsp;value:</th><td>as specified, except with any relative URLs converted to absolute</td></tr>
   981 <tr><th>Animatable:</th><td>no</td></tr>
   982 </tbody></table>
   984 This property specifies the type of cursor to be displayed for the pointing device
   985 when the cursor's hotspot is within the element's <a>border edge</a>.
   987 Note: As per [[CSS3-BACKGROUND]], the <a>border edge</a> is affected by 'border-radius'.
   989 In the case of overlapping elements,
   990 which element determines the type of cursor
   991 is based on hit testing:
   992 the element determining the cursor
   993 is the one that would receive a click
   994 initiated from this position.
   996 Note: The specifics of hit testing
   997 are out of scope of this specification.
   998 Hit testing will hopefully be defined
   999 in a future revision of CSS or HTML.
  1001 User agents may ignore the cursor property over native user-agent controls such as scrollbars, resizers, or other native UI widgets e.g. those that may be used inside some user agent specific implementations of form elements.
  1003 Values have the following meanings:
  1005 <dl>
  1006 <dt>image cursors
  1007 <dd>
  1008 <dl>
  1009 <dt><<url>></dt>
  1010 <dd>The user agent retrieves the cursor from the resource designated by the URI.
  1011 If the user agent cannot handle the first cursor of a list of cursors,
  1012 it must attempt to handle the second, etc.
  1013 If the user agent cannot handle any user-defined cursor,
  1014 it must use the cursor keyword at the end of the list.
  1015 Conforming User Agents may, instead of <<url>>, support <<image>> which is a superset.
  1017 The UA must support the following image file formats:
  1018 <ul>
  1019 	<li>PNG, as defined in [[!PNG]]
  1020 	<li>SVG, as defined in [[!SVG]], in <a href="http://www.w3.org/TR/svg-integration/#secure-static-mode">secure static mode</a> [[!SVG-INTEGRATION]]
  1021 	<li>any other non-animated image file format that they support
  1022 	for <<image>> in other properties,
  1023 	such as the the 'background-image' property
  1024 </ul>
  1026 In addition, the UA should support the following image file formats:
  1027 <ul>
  1028 	<li>SVG, as defined in [[!SVG]], in <a href="http://www.w3.org/TR/svg-integration/#secure-animated-mode">secure animated mode</a> [[!SVG-INTEGRATION]]
  1029 	<li>any other animated image file format that they support
  1030 	for <<image>> in other properties,
  1031 	such as the the 'background-image' property
  1032 </ul>
  1034 The UA may also support additional file formats.
  1036 Note: At the time of writing this specification (spring 2015),
  1037 the only file formats supported for cursors in common desktop browsers are
  1038 the .ico and .cur file formats, as designed by Microsoft.
  1039 For compatibility with legacy content,
  1040 UAs are encouraged to support these,
  1041 even though the lack of an open specification
  1042 makes it impossible to have a normative requirement
  1043 about these formats.
  1044 Some information on these formats can be found
  1045 <a href="https://en.wikipedia.org/wiki/ICO_%28file_format%29">on Wikipedia</a>.
  1047 The <a>default object size</a> for cursor images is
  1048 a UA-defined size that should be based on
  1049 the size of a typical cursor on the UA's operating system.
  1051 The <a>concrete object size</a> is determined using
  1052 the <a>default sizing algorithm</a>.
  1053 If an operating system is
  1054 <strong>incapable</strong> of rendering a cursor above a given size,
  1055 cursors larger than that size must be shrunk to within
  1056 the OS-supported size bounds,
  1057 while maintaining the cursor image's intrinsic ratio, if any.
  1059 The optional &lt;x&gt; and &lt;y&gt; coordinates
  1060 identify the exact position within the image which is the pointer position (i.e., the hotspot).
  1061 </dd>
  1062 <dt>&lt;x&gt;</dt>
  1063 <dt>&lt;y&gt;</dt>
  1064 <dd>
  1065 Each is a <<number>>.
  1066 The x-coordinate and y-coordinate of the position
  1067 in the cursor's coordinate system (left/top relative)
  1068 which represents the precise position that is being pointed to.
  1070 Note: This specification does not define
  1071 how the coordinate systems of the various types of <<image>> are established,
  1072 and defers these definitions to [[CSS4-IMAGES]].
  1074 If the values are unspecified,
  1075 then the intrinsic hotspot defined inside the image resource itself is used.
  1076 If both the values are unspecific and the referenced cursor has no defined hotspot,
  1077 the effect is as if a value of "0 0" were specified.
  1079 If the coordinates of the hotspot,
  1080 as specified either inside the image resource or
  1081 by &lt;x&gt; and &lt;y&gt; values,
  1082 fall outside of the cursor image,
  1083 they must be clamped (independently) to fit.
  1084 </dd>
  1085 </dl>
  1087 <dt>general purpose cursors
  1088 <dd>
  1090 <dl>
  1091 <dt style="cursor:auto">auto</dt>
  1092 <dd>The UA determines the cursor to display based on the current
  1093 context, specifically: auto behaves as ''cursor/text'' over text, and ''cursor/default'' otherwise.
  1094 </dd>
  1096 <dt style="cursor:default">default</dt>
  1097 <dd>The platform-dependent default cursor. Often rendered as an arrow.
  1098 </dd>
  1099 <dt style="cursor:none">none</dt>
  1100 <dd>No cursor is rendered for the element.</dd>
  1101 </dl>
  1103 <dt>links and status cursors
  1104 <dd>
  1106 <dl>
  1107 <dt style="cursor:context-menu">context-menu</dt>
  1108 <dd>A context menu is available for the object under the cursor.
  1109 Often rendered as an arrow with a small menu-like graphic next to it.</dd>
  1110 <dt style="cursor:help">help</dt>
  1111 <dd>Help is available for the object under the cursor.
  1112 Often rendered as a question mark or a balloon.
  1113 </dd>
  1114 <dt style="cursor:pointer">pointer</dt>
  1115 <dd>The cursor is a pointer that indicates a link.
  1116 </dd>
  1117 <dt style="cursor:progress">progress</dt>
  1118 <dd>A progress indicator.  The program is performing some processing,
  1119 but is different from ''wait'' in that the user may still interact
  1120 with the program. Often rendered as a spinning beach ball,
  1121 or an arrow with a watch or hourglass.</dd>
  1122 <dt style="cursor:wait">wait</dt>
  1123 <dd>Indicates that the program is busy and the user should wait.
  1124 Often rendered as a watch or hourglass.
  1125 </dd>
  1126 </dl>
  1128 <dt>selection cursors
  1129 <dd>
  1130 <dl>
  1131 <dt style="cursor:cell">cell</dt>
  1132 <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>
  1133 <dt style="cursor:crosshair">crosshair</dt>
  1134 <dd>A simple crosshair (e.g., short line segments resembling a "+" sign).
  1135 Often used to indicate a two dimensional bitmap selection mode.
  1136 </dd>
  1137 <dt style="cursor:text">text</dt>
  1138 <dd>Indicates text that may be selected. Often rendered as a vertical I-beam.
  1139 User agents may automatically display a horizontal I-beam/cursor
  1140 (e.g. same as the ''vertical-text'' keyword)
  1141 for vertical text, or for that matter,
  1142 any angle of I-beam/cursor for text that is rendered at any particular angle.
  1143 </dd>
  1144 <dt style="cursor:vertical-text">vertical-text</dt>
  1145 <dd>Indicates vertical-text that may be selected. Often rendered as a horizontal I-beam.</dd>
  1146 </dl>
  1148 <dt>drag and drop cursors
  1149 <dd>
  1150 <dl>
  1151 <dt style="cursor:alias">alias</dt>
  1152 <dd>Indicates an alias of/shortcut to something is to be created.
  1153 Often rendered as an arrow with a small curved arrow next to it.</dd>
  1155 <dt style="cursor:copy">copy</dt>
  1156 <dd>Indicates something is to be copied.
  1157 Often rendered as an arrow with a small plus sign next to it.</dd>
  1159 <dt style="cursor:move">move</dt>
  1160 <dd>Indicates something is to be moved.
  1161 </dd>
  1162 <dt style="cursor:no-drop">no-drop</dt>
  1163 <dd>Indicates that the dragged item cannot be dropped at the current cursor location.
  1164 Often rendered as a hand or pointer with a small circle with a line through it.
  1165 </dd>
  1166 <dt style="cursor:not-allowed">not-allowed</dt>
  1167 <dd>Indicates that the requested action will not be carried out.
  1168 Often rendered as a circle with a line through it.
  1169 </dd>
  1170 <dt style="cursor:grab">grab</dt>
  1171 <dd>Indicates that something can be grabbed (dragged to be moved). Often rendered as the backside of an open hand.</dd>
  1172 <dt style="cursor:grabbing">grabbing</dt>
  1173 <dd>Indicates that something is being grabbed (dragged to be moved). Often rendered as the backside of a hand with fingers closed mostly out of view.</dd>
  1174 </dl>
  1176 <dt>resizing and scrolling cursors
  1177 <dd>
  1178 <dl>
  1179 <dt>
  1180 <span style="cursor:e-resize">e-resize</span>,
  1181 <span style="cursor:n-resize">n-resize</span>,
  1182 <span style="cursor:ne-resize">ne-resize</span>,
  1183 <span style="cursor:nw-resize">nw-resize</span>,
  1184 <span style="cursor:s-resize">s-resize</span>,
  1185 <span style="cursor:se-resize">se-resize</span>,
  1186 <span style="cursor:sw-resize">sw-resize</span>,
  1187 <span style="cursor:w-resize">w-resize</span>
  1188 </dt>
  1189 <dd>Indicates that some edge is to be moved. For example, the
  1190 ''se-resize'' cursor is used when the movement starts from the
  1191 south-east corner of the box.
  1192 </dd>
  1193 <dt>
  1194 <span style="cursor:ew-resize">ew-resize</span>,
  1195 <span style="cursor:ns-resize">ns-resize</span>,
  1196 <span style="cursor:nesw-resize">nesw-resize</span>,
  1197 <span style="cursor:nwse-resize">nwse-resize</span>
  1198 </dt>
  1199 <dd>Indicates a bidirectional resize cursor.</dd>
  1200 <dt style="cursor:col-resize">col-resize</dt>
  1201 <dd>Indicates that the item/column can be resized horizontally.
  1202 Often rendered as arrows pointing left and right with a vertical bar separating them.</dd>
  1203 <dt style="cursor:row-resize">row-resize</dt>
  1204 <dd>Indicates that the item/row can be resized vertically.
  1205 Often rendered as arrows pointing up and down with a horizontal bar separating them.
  1206 </dd>
  1207 <dt style="cursor:all-scroll">all-scroll</dt>
  1208 <dd>Indicates that the something can be scrolled in any direction.
  1209 Often rendered as arrows pointing up, down, left, and right with a dot in the middle.
  1210 </dd>
  1211 </dl>
  1213 <dt>zooming cursors
  1214 <dd>
  1215 <dl>
  1216 <dt>
  1217 <span style="cursor:zoom-in"> zoom-in</span>,
  1218 <span style="cursor:zoom-out"> zoom-out</span>
  1219 </dt>
  1220 <dd>
  1221 Indicates that something can be zoomed (magnified) in or out, and
  1222 often rendered as a magnifying glass with a "+" or "-" in the center of the glass, for ''zoom-in'' and ''zoom-out'' respectively.
  1223 </dd>
  1224 </dl>
  1225 </dl>
  1227 <div class="example">
  1229 Example: cursor fallback
  1231 Here is an example of using several cursor values.
  1232 <pre><code class="lang-css">
  1233 :link,:visited {
  1234     cursor: url(example.svg#linkcursor),
  1235             url(hyper.cur),
  1236             url(hyper.png) 2 3,
  1237             pointer
  1239 </code></pre>
  1241 This example sets the cursor on all hyperlinks (whether visited or not)
  1242 to an external <a href="http://www.w3.org/TR/SVG/interact.html#CursorElement">SVG cursor</a> ([[SVG10]], section 16.8.3).
  1243 User agents that don't support SVG cursors would simply skip
  1244 to the next value and attempt to use the "hyper.cur" cursor.
  1245 If that cursor format was also not supported,
  1246 the UA could attempt to use the "hyper.png" cursor with the explicit hotspot.
  1247 Finally if the UA does not support any of those image cursor formats, the UA would skip to the last value
  1248 and render the ''pointer'' cursor.
  1249 </div>
  1251 <h5 id="canvas_cursor">Cursor of the canvas</h5>
  1253 The document <a href="http://www.w3.org/TR/CSS21/intro.html#the-canvas">canvas</a>
  1254 is the infinite surface over which the document is rendered [[!CSS21]].
  1255 Since no element corresponds to the canvas,
  1256 in order to allow styling of the cursor when not over any element,
  1257 the canvas cursor re-uses the root element's cursor.
  1258 However, if no boxes are generated for the root element
  1259 (for example, if the root element has ''display: none''),
  1260 then the canvas cursor is the platform-dependent default cursor.
  1262 Note: An element might be invisible,
  1263 but still generate boxes. For example,
  1264 if the element has ''visibility: hidden'' but not ''display: none'',
  1265 boxes are generated for it and its cursor is used for the canvas.
  1268 <h3 id="insertion-caret">Insertion caret</h3>
  1270 <h4 id="caret-color">Coloring the insertion caret: caret-color</h4>
  1271 <table class="propdef"><tbody>
  1272 <tr><th>Name: </th><td><dfn>caret-color</dfn></td></tr>
  1273 <tr><th>Value: </th><td>auto | <<color>></td></tr>
  1274 <tr><th>Initial:</th><td>auto</td></tr>
  1275 <tr><th>Applies to:</th><td>elements that accept input</td></tr>
  1276 <tr><th>Inherited:</th><td>yes</td></tr>
  1277 <tr><th>Percentages:</th><td>N/A</td></tr>
  1278 <tr><th>Media:</th><td>interactive</td></tr>
  1279 <tr><th>Computed&nbsp;value:</th><td>The computed value for ''caret-color/auto'' is ''caret-color/auto''. For <<color>> values, the computed value is as defined for the [[!CSS3COLOR]] 'color' property.</td></tr>
  1280 <tr><th>Animatable:</th><td>as <a href="https://drafts.csswg.org/css3-transitions/#animtype-color">color</a></td></tr>
  1281 </tbody></table>
  1283 <dl>
  1284 <dt>auto</dt>
  1285 <dd>User agents should use currentColor.
  1286 User agents may automatically adjust the color of caret
  1287 to ensure good visibility and contrast with the surrounding content,
  1288 possibly based on the currentColor, background, shadows, etc.</dd>
  1289 <dt><<color>></dt>
  1290 <dd>The insertion caret is colored with the specified color.</dd>
  1291 </dl>
  1293 The caret is a visible indicator of the insertion point in an element where text (and potentially other content) is inserted by the user. This property controls the color of that visible indicator.
  1295 Note: caret shape and blinking is outside the scope of this feature and thus unspecified.
  1297 <div class="example">
  1298 Example: a textarea with
  1299 <code class="lang-css">caret-color:#00aacc;</code>
  1301 <textarea style="caret-color:#00aacc;">
  1302 caret-color:#00aacc
  1303 </textarea>
  1305 </div><!-- example -->
  1307 Note: The caret-color property is at risk.
  1310 <h3 id="keyboard">Keyboard control</h3>
  1312 <h4 id="nav-dir">Directional focus navigation: the 'nav-up', 'nav-right', 'nav-down', 'nav-left' properties</h4>
  1313 <table class="propdef"><tbody>
  1314 <tr><th>Name: </th><td><dfn>nav-up</dfn>, <dfn>nav-right</dfn>, <dfn>nav-down</dfn>, <dfn>nav-left</dfn></td></tr>
  1315 <tr><th>Value: </th><td>auto | &lt;id&gt; [ current | root | &lt;target-name&gt; ]? </td></tr>
  1316 <tr><th>Initial:</th><td>auto</td></tr>
  1317 <tr><th>Applies to:</th><td>all enabled elements</td></tr>
  1318 <tr><th>Inherited:</th><td>no</td></tr>
  1319 <tr><th>Percentages:</th><td>N/A</td></tr>
  1320 <tr><th>Media:</th><td>interactive</td></tr>
  1321 <tr><th>Computed&nbsp;value:</th><td>as specified</td></tr>
  1322 <tr><th>Animatable:</th><td>no</td></tr>
  1323 </tbody></table>
  1325 <dl>
  1326 <dt>auto</dt>
  1327 <dd>The user agent automatically determines which element to navigate the focus to in response to directional navigational input.</dd>
  1328 <dt>&lt;id&gt;</dt>
  1329 <dd><p>The &lt;id&gt; value is an ID selector [[SELECT]].
  1330 In response to directional navigation input corresponding to the property,
  1331 the focus is navigated to the first element in tree order matching the selector.
  1333 If this refers to the currently focused element,
  1334 the directional navigation input respective to the nav- property is ignored &mdash;
  1335 there is no need to refocus the same element.
  1337 If no element matches the selector,
  1338 the user agent automatically determines which element to navigate the focus to.
  1340 If the focus is navigated to an element
  1341 that was not otherwise focusable,
  1342 it becomes focusable
  1343 only as the result of this directional navigation,
  1344 and the <css>:focus</css> pseudo-class matches the element
  1345 while it is focused as such.
  1347 Note: there were other options under consideration for such "not otherwise focusable" elements, including focus to the next otherwise focusable element in the document tree (including descendants of such a not otherwise focusable element). Input on such other options is welcome and explicitly solicited, especially from implementation experiences and author experience using the directional navigation properties in their content.
  1349 </dd>
  1350 <dt>&lt;target-name&gt;</dt>
  1351 <dd>
  1352 The &lt;target-name&gt; parameter indicates the target frame for the focus navigation.
  1353 It is a <<string>> and it MUST NOT start with the underscore "_" character.
  1354 Error handling: if it does start with an underscore, "_parent" navigates to the parent frame,
  1355 "_root" is treated as ''root'',
  1356 and other values navigate to a frame by that name if it exists.
  1357 If the specified target frame does not exist,
  1358 the parameter will be treated as the keyword ''current'',
  1359 which means to simply use the frame that the element is in.
  1360 The keyword ''root'' indicates that the user agent should target the full window.
  1361 </dd>
  1362 </dl>
  1364 User agents for devices with directional navigation keys
  1365 respond by navigating the focus according to four respective nav-* directional navigation properties
  1366 (nav-up, nav-right, nav-down, nav-left).
  1367 This specification does not define which keys of a device are directional navigational keys.
  1369 Note: Typical personal computers have keyboards with four arrow keys.
  1370 One possible implementation would be to use those four arrow keys for directional navigation.
  1371 For accessibility and user convenience,
  1372 user agents should allow configuration of which keys on a keyboard are used for directional navigation.
  1374 <div class="example">
  1375 <h5 id=example-positioned-buttons>Example: positioned buttons</h5>
  1377 Here is an example of buttons positioned in a diamond shape
  1378 whose directional focus navigation is set in such a way
  1379 to navigate the focus clockwise (or counter-clockwise) around the diamond shape
  1380 when the user chooses to navigate directionally.
  1381 <pre><code class="lang-css">
  1382 button { position:absolute }
  1384 button#b1 {
  1385 	top:0; left:50%;
  1386 	nav-right:#b2; nav-left:#b4;
  1387 	nav-down:#b2; nav-up:#b4;
  1390 button#b2 {
  1391 	top:50%; left:100%;
  1392 	nav-right:#b3; nav-left:#b1;
  1393 	nav-down:#b3; nav-up:#b1;
  1396 button#b3 {
  1397 	top:100%; left:50%;
  1398 	nav-right:#b4; nav-left:#b2;
  1399 	nav-down:#b4; nav-up:#b2;
  1402 button#b4 {
  1403 	top:50%; left:0;
  1404 	nav-right:#b1; nav-left:#b3;
  1405 	nav-down:#b1; nav-up:#b3;
  1407 </code></pre>
  1409 Whatever markup sequence the buttons may have
  1410 (which is not specified in this example)
  1411 is irrelevant in this case because they are positioned, and yet,
  1412 it is still important to ensure focus navigation behaviors which relate reasonably to the specified layout.
  1413 </div>
  1415 <div class="example">
  1416 <h5 id=example-moving-focus-to-inside-a-frame>Example: moving focus to inside a frame</h5>
  1418 Moving the focus to an element in a specific frame requires both the element's id and the frame's name.
  1420 This example shows how to make navigating left from the button with id "foo" move the focus to the element with id "bar" within the frame named "sidebar".
  1422 <pre><code class="lang-css">
  1423 button#foo { nav-left: #bar "sidebar"; }
  1424 </code></pre>
  1425 </div>
  1428 <h4 id="input-method-editor">Obsolete: the ime-mode property</h4>
  1430 "ime-mode" is a property somewhat implemented in some browsers, that is problematic and officially obsoleted by this specification.
  1432 There is documentation of
  1433 <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode">non-interoperability of these implementations.
  1434 </a>
  1436 User agents should not support the <css>ime-mode</css> property.
  1438 Authors must not use the ime-mode property.
  1440 Users may use the ime-mode property only for repair use-cases where they have to work around bad sites and legacy implementations, e.g. with a user style sheet rule like:
  1441 <div class="example">
  1442 <p>Example: user preference
  1443 <pre><code class="lang-css">input[type=password] {
  1444     ime-mode: auto&nbsp;!important;
  1446 </code></pre>
  1447 </div>
  1449 This example CSS may be placed into a user style sheet file to force password input fields to behave in a default manner.
  1451 This specification deliberately does not attempt to document the functionality of legacy ime-mode implementations nor what they specifically support because it does not make sense to pursue or recommend any such path.
  1453 <div class="note">
  1454 Note: there are several [[HTML5]] features which authors should use to provide information to user agents that allow them to provide a better input user experience:
  1456 <ul>
  1457 <li>The global <code>lang</code> attribute
  1458 <li>The <code>inputmode</code>, <code>pattern</code>,
  1459 and <code>type</code> attributes of the input element
  1460 </ul>
  1461 </div>
  1464 <hr title="Separator from footer">
  1467 <h2 class="no-num" id="acknowledgments">Appendix A. Acknowledgments</h2>
  1469 This appendix is <em>informative</em>.
  1471 This specification was edited and written for the most part
  1472 by Tantek Çelik from 1999 to the present,
  1473 first while representing Microsoft, then as an Invited Expert,
  1474 and most recently while representing Mozilla.
  1476 Thanks to <span class="h-card">Florian Rivoal</span>, working on this specification on behalf of Bloomberg, for
  1477 his recent work documenting issues from www-style emails,
  1478 proposing resolutions &amp; changes,
  1479 and in particular for researching &amp; writing greatly
  1480 improved details for the 'box-sizing' property.
  1482 Thanks to feedback and contributions from
  1483 <span class="h-card">Rossen Atanassov</span>,
  1484 <span class="h-card">Tab Atkins</span>,
  1485 <span class="h-card">L. David Baron</span>,
  1486 <span class="h-card">Bert Bos</span>,
  1487 <span class="h-card">Matthew Brealey</span>,
  1488 <span class="h-card">Rick Byers</span>,
  1489 <span class="h-card">Ada Chan</span>,
  1490 <span class="h-card">James Craig</span>,
  1491 <span class="h-card">Michael Cooper</span>,
  1492 <span class="h-card">Axel Dahmen</span>,
  1493 <span class="h-card">Michael Day</span>,
  1494 <span class="h-card">Micah Dubinko</span>,
  1495 <span class="h-card">Elika E.</span>,
  1496 <span class="h-card">Steve Falkenburg</span>,
  1497 <span class="h-card">Andrew Fedoniouk</span>,
  1498 <span class="h-card">Al Gilman</span>,
  1499 <span class="h-card">Ian Hickson</span>,
  1500 <span class="h-card">Bjoern Hoehrmann</span>,
  1501 <span class="h-card">Alan Hogan</span>,
  1502 <span class="h-card">David Hyatt</span>,
  1503 <span class="h-card">Richard Ishida</span>,
  1504 <span class="h-card">Sho Kuwamoto</span>,
  1505 <span class="h-card">Yves Lafon</span>,
  1506 <span class="h-card">Stuart Langridge</span>,
  1507 <span class="h-card">Susan Lesch</span>,
  1508 <span class="h-card">Peter Linss</span>,
  1509 <span class="h-card">Kang-Hao Lu</span>,
  1510 <span class="h-card">Masayuki Nakano</span>,
  1511 <span class="h-card">Mats Palmgren</span>,
  1512 <span class="h-card">Brad Pettit</span>,
  1513 <span class="h-card">Chris Rebert</span>,
  1514 <span class="h-card">François Remy</span>,
  1515 <span class="h-card">Andrey Rybka</span>,
  1516 <span class="h-card">Simon Sapin</span>,
  1517 <span class="h-card">Alexander Savenkov</span>,
  1518 <span class="h-card">Sebastian Schnitzenbaumer</span>,
  1519 <span class="h-card">Lea Verou</span>,
  1520 <span class="h-card">Etan Wexler</span>,
  1521 <span class="h-card">David Woolley</span>,
  1522 <span class="h-card">Frank Yan</span>,
  1523 <span class="h-card">Boris Zbarsky</span>,
  1524 and
  1525 <span class="h-card">Domel</span>.
  1528 <h2 class="no-num" id="changes">Appendix B. Changes</h2>
  1530 This appendix is <em>informative</em>.
  1532 This appendix describes changes from the
  1533 <a href="http://www.w3.org/TR/2015/CR-css-ui-3-20150707/"
  1534    >Candidate Recommendation (CR) of 7 Jul 2015</a>.
  1536 <ul>
  1537 	<li>Editorial and markup tweaks
  1538 	<li>Clarify that cursor selection is based on hit testing
  1539 	<li>Clean-up default style sheet additions for HTML
  1540 	<li>Optionally allow the ''resize'' property to apply to
  1541 	    replaced elements representing images or videos
  1542 	    and to iframes,
  1543 	    for compatibility with level 4.
  1544 </ul>
  1546 <h2 class="no-num" id="security-privacy-considerations">Appendix C. Considerations for Security and Privacy</h2>
  1548 This appendix is <em>informative</em>.
  1550 The W3C TAG is developing a
  1551 <a href="https://w3ctag.github.io/security-questionnaire/">Self-Review Questionnaire: Security and Privacy</a>
  1552 for editors of specifications to informatively answer.
  1554 Per the <a href="https://w3ctag.github.io/security-questionnaire/#questions">Questions to Consider</a>
  1556 <ol>
  1557 <li>Does this specification deal with personally-identifiable information?
  1558 <p>No.</p>
  1559 </li>
  1561 <li>Does this specification deal with high-value data?
  1562 <p>No.</p>
  1563 </li>
  1565 <li>Does this specification introduce new state for an origin that persists across browsing sessions?
  1566 <p>No.</p>
  1567 </li>
  1569 <li>Does this specification expose persistent, cross-origin state to the web?
  1570 <p>No.</p>
  1571 </li>
  1573 <li>Does this specification expose any other data to an origin that it doesn’t currently have access to?
  1574 <p>No.</p>
  1575 </li>
  1577 <li>Does this specification enable new script execution/loading mechanisms?
  1578 <p>Yes. The 'cursor' property accepts <<image>> values which may include URLs to be loaded.</p>
  1579 </li>
  1581 <li>Does this specification allow an origin access to a user’s location?
  1582 <p>No.</p>
  1583 </li>
  1585 <li>Does this specification allow an origin access to sensors on a user’s device?
  1586 <p>Yes. The directional focus navigation properties indirectly allow access to the device's keyboard navigation input mechanism such as arrow keys.</p>
  1587 </li>
  1589 <li>Does this specification allow an origin access to aspects of a user’s local computing environment?
  1590 <p>No.</p>
  1591 </li>
  1593 <li>Does this specification allow an origin access to other devices?
  1594 <p>No.</p>
  1595 </li>
  1597 <li>Does this specification allow an origin some measure of control over a user agent’s native UI?
  1598 <p>Yes. The 'cursor' and 'caret-color' properties enable the page to change the display of the cursor and text insertion caret of the user agent’s native UI. In addition the 'outline-style' property’s ''outline-style/auto'' value (and thus 'outline' shorthand) enable the page to potentially display a native focused element outline presentation around any element.</p>
  1599 </li>
  1601 <li>Does this specification expose temporary identifiers to the web?
  1602 <p>No.</p>
  1603 </li>
  1605 <li>Does this specification distinguish between behavior in first-party and third-party contexts?
  1606 <p>No.</p>
  1607 </li>
  1609 <li>How should this specification work in the context of a user agent’s "incognito" mode?
  1610 <p>No differently.</p>
  1611 </li>
  1613 <li>Does this specification persist data to a user’s local device?
  1614 <p>No.</p>
  1615 </li>
  1617 <li>Does this specification have a "Security Considerations" and "Privacy Considerations" section?
  1618 <p>Yes.</p>
  1619 </li>
  1621 <li>Does this specification allow downgrading default security characteristics?
  1622 <p>No.</p>
  1623 </li>
  1624 </ol>
  1626 <h2 class="no-num" id="default-style-sheet">Appendix D. Default style sheet additions for HTML</h2>
  1628 This appendix is <em>informative</em>.
  1630 Potential additions to the base style sheet to express HTML form controls, and a few dynamic presentation attributes:
  1632 <pre class="lang-css">
  1634 :enabled:focus {
  1635  outline: 2px inset;
  1638 button,
  1639 input[type=button],
  1640 input[type=reset],
  1641 input[type=submit],
  1642 input[type=checkbox],
  1643 input[type=radio],
  1644 textarea,
  1645 input,
  1646 input[type=text],
  1647 input[type=password],
  1648 input[type=image]
  1650  display: inline-block;
  1653 input[type=button],
  1654 input[type=reset],
  1655 input[type=submit],
  1656 input[type=checkbox],
  1657 input[type=radio],
  1658 input,
  1659 input[type=text],
  1660 input[type=password],
  1661 input[type=image]
  1663  white-space: nowrap;
  1666 button
  1668 /* white space handling of BUTTON tags in particular */
  1669  white-space:normal;
  1672 input[type=reset]:lang(en)
  1674 /* default content of HTML input type=reset button, per language */
  1675  content: "Reset";
  1678 input[type=submit]:lang(en)
  1680 /* default content of HTML input type=submit button, per language */
  1681  content: "Submit";
  1684 /* UAs should use language-specific Reset/Submit rules for others. */
  1686 input[type=button],
  1687 input[type=reset][value],
  1688 input[type=submit][value]
  1690 /* text content/labels of HTML "input" buttons */
  1691  content: attr(value);
  1694 textarea
  1696 /* white space handling of TEXTAREA tags in particular */
  1697  white-space:pre-wrap;
  1698  resize: both;
  1701 input[type=hidden]
  1703 /* appearance of the HTML hidden text field in particular */
  1704  display: none !important;
  1707 input[type=image]
  1709  content: attr(src,url);
  1710  border: none;
  1713 select[size]
  1715 /* HTML4/XHTML1 &lt;select&gt; w/ size more than 1 - appearance of list */
  1716  display: inline-block;
  1717  height: attr(size,em);
  1720 select,select[size=1]
  1722 /* HTML4/XHTML1 &lt;select&gt; without size, or size=1 - popup-menu */
  1723  display: inline-block;
  1724  height: 1em;
  1725  overflow: hidden;
  1728 select[size]:active
  1730 /* active HTML &lt;select&gt; w/ size more than 1 - appearance of active list */
  1731  display: inline-block;
  1734 optgroup,option
  1736  display: block;
  1737  white-space: nowrap;
  1740 optgroup[label],option[label]
  1742  content: attr(label);
  1745 option[selected]::before
  1747  display: inline;
  1748  content: check;
  1751 /* Though FRAME resizing is not directly addressed by this specification,
  1752    the following rules may provide an approximation of reasonable behavior. */
  1754 /*
  1756 frame { resize:both }
  1757 frame[noresize] { resize:none }
  1759 */
  1761 </pre>
  1764 <h2 class="no-num" id="test-suite">Appendix E: Test Suite</h2>
  1766 This appendix is <em>informative</em>.
  1768 There is a partial test suite
  1769 written according to the <a href="http://www.w3.org/Style/CSS/Test/testsuitedocumentation">CSS Test Suite Documentation</a>
  1770 and following the <a href="http://www.w3.org/Style/CSS/Test/guidelines.html">CSS2.1 Test Case Authoring Guidelines</a>.
  1771 The test suite shall allow user agents to verify their basic conformance to the specification.
  1772 This test suite does not pretend to be exhaustive and does not cover all possible combinations of user interface related features.
  1773 These tests will be made available from the <a href="http://www.w3.org/Style/CSS/Test/">CSS Test Suites</a> home page.

mercurial