1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>User interface</title>
<link rel="stylesheet" href="style/default.css" type="text/css">
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-CR.css" type="text/css">
<link rel="prev" href="tables.html">
<link rel="next" href="aural.html">
<link rel="contents" href="cover.html#minitoc">
<link rel="CSS-properties" href="propidx.html" title="properties">
<link rel="index" href="indexlist.html" title="index">
<link rel="first" href="cover.html">
<meta name="editor" lang="tr" content="Tantek Çelik">
<style type="text/css">
.current,.proposed,span.delcurrent { background:#feb }
ins.proposed,span.insproposed { background:#bfb }
del.proposed,span.delproposed { background:#fbb }
span.insproposed { text-decoration:underline }
span.delproposed,span.delcurrent { text-decoration:line-through }
body>del,body>ins {display:block}
</style>
</head>
<body>
<div class="navbar">
<p><a href="tables.html">previous</a>
<a href="aural.html">next</a>
<a href="cover.html#minitoc">contents</a>
<a href="propidx.html">properties</a>
<a href="indexlist.html">index</a>
</div>
<hr class="navbar">
<h1><a name="q0">18 User interface</a></h1>
<div class="subtoc">
<p><strong>Contents</strong>
<ul class="toc">
<li class="tocline2"><a href="ui.html#cursor-props" class="tocxref">18.1 Cursors: the <span class="propinst-cursor">'cursor'</span> property</a>
<li class="tocline2"><a href="ui.html#system-colors" class="tocxref">18.2 System Colors</a>
<li class="tocline2"><a href="ui.html#system-fonts" class="tocxref">18.3 User preferences for fonts</a>
<li class="tocline2"><a href="ui.html#dynamic-outlines" class="tocxref">18.4 Dynamic outlines: the <span class="index-def" title="outline">'outline'</span> property</a>
<ul class="toc">
<li class="tocline3"><a href="ui.html#outline-focus" class="tocxref">18.4.1 Outlines and the focus</a>
</ul>
<li class="tocline2"><a href="ui.html#magnification" class="tocxref">18.5 Magnification</a>
</ul>
</div>
<h2>18.1 <a name="cursor-props">Cursors:</a> the <a href="ui.html#propdef-cursor" class="noxref"><span
class="propinst-cursor">'cursor'</span></a> property</h2>
<div class="propdef">
<dl><dt>
<span class="index-def" title="'cursor'"><a name="propdef-cursor" class="propdef-title"><strong>'cursor'</strong></a></span>
<dd>
<table class="propinfo" cellspacing=0 cellpadding=0>
<tr valign=baseline><td><em>Value:</em> <td>[ [<a href="syndata.html#value-def-uri" class="noxref"><span class="value-inst-uri"><uri></span></a> ,]* [ auto | crosshair | default | pointer | move | e-resize
| ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize
| w-resize | text | wait | help | progress ] ] | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
<tr valign=baseline><td><em>Initial:</em> <td>auto
<tr valign=baseline><td><em>Applies to:</em> <td>all elements
<tr valign=baseline><td><em>Inherited:</em> <td>yes
<tr valign=baseline><td><em>Percentages:</em> <td>N/A
<tr valign=baseline><td><em>Media:</em> <td><a href="media.html#visual-media-group" class="noxref">visual</a>, <a href="media.html#interactive-media-group" class="noxref">interactive</a>
<tr valign=baseline><td><em>Computed value:</em> <td>as specified, except with any relative URLs converted to absolute
</table>
</dl>
</div>
<p>This property specifies the type of cursor to be displayed for the
pointing device. Values have the following meanings:
</p>
<dl>
<dt>auto</dt>
<dd>The UA determines the cursor to display based on the current
context.</dd>
<dt>crosshair</dt>
<dd>A simple crosshair (e.g., short line segments resembling a "+" sign).
</dd>
<dt>default</dt>
<dd>The platform-dependent default cursor. Often rendered as an arrow.
</dd>
<dt>pointer</dt>
<dd>The cursor is a pointer that indicates a link.
</dd>
<dt>move</dt>
<dd>Indicates something is to be moved.
</dd>
<dt>e-resize, ne-resize, nw-resize, n-resize, se-resize,
sw-resize, s-resize, w-resize</dt>
<dd>Indicate that some edge is to be moved. For example, the
'se-resize' cursor is used when the movement starts from the
south-east corner of the box.
</dd>
<dt>text</dt>
<dd>Indicates text that may be selected. Often rendered as an I-beam.
</dd>
<dt>wait</dt>
<dd>Indicates that the program is busy and the user should
wait. Often rendered as a watch or hourglass.
</dd>
<dt>progress</dt>
<dd>A progress indicator. The program is performing some processing,
but is different from 'wait' in that the user may still interact with the program.
Often rendered as a spinning beach ball,
or an arrow with a watch or hourglass.
</dd>
<dt>help</dt>
<dd>Help is available for the object under the cursor. Often rendered
as a question mark or a balloon.
</dd>
<dt><span class="index-inst" title="<uri>"><a name="x1" href="syndata.html#value-def-uri" class="noxref"><span
class="value-inst-uri"><uri></span></a></span></dt>
<dd>The user agent retrieves the cursor from the resource
designated by the URI. If the user agent cannot handle
the first cursor of a list of cursors, it should attempt
to handle the second, etc. If the user agent cannot handle
any user-defined cursor, it must use the generic cursor
at the end of the list.
Intrinsic sizes for cursors are calculated as for <a
href="colors.html#background-properties">background images,</a> except
that a UA-defined rectangle is used in place of the rectangle that
establishes the coordinate system for the 'background-image' property.
This UA-defined rectangle should be based on the size of a typical
cursor on the UA's operating system. If the resulting cursor size does
not fit within this rectangle, the UA may proportionally scale the
resulting cursor down until it fits within the rectangle.</dd> </dl>
<div class="example"><P style="display:none">Example(s):</P>
<pre><code class="css">
:link,:visited { cursor: url(example.svg#linkcursor), url(hyper.cur), pointer }
</code></pre>
<p>This example sets the cursor on all hyperlinks (whether visited or not)
to an external <a href="http://www.w3.org/TR/SVG/interact.html#CursorElement">SVG cursor</a>.
User agents that don't support SVG cursors would simply skip to the
next value and attempt to use the "hyper.cur" cursor.
If that cursor format was also not supported, the UA would skip to the next value and simply render the 'pointer' cursor.
</p>
</div>
<h2>18.2 <a name="system-colors">System Colors</a></h2>
<div class="note"><p><em><strong>Note.</strong>
The System Colors are deprecated in the CSS3 Color Module <a href="refs.html#ref-CSS3COLOR" rel="biblioentry" class="noxref"><span class="informref">[CSS3COLOR]</span></a>.
</em></p>
</div>
<p>In addition to being able to assign pre-defined <a
href="syndata.html#color-units">color values</a> to text, backgrounds, etc., CSS2 introduced a set of named color values that allows authors to specify colors in a manner that integrates them into the operating system's graphic environment.
</p>
<p>For systems that do not have a corresponding value, the
specified value should be mapped to the nearest system value, or to a default color.</p>
<p>The following lists additional values for color-related CSS properties and their general meaning. Any color property (e.g., <a href="colors.html#propdef-color" class="noxref"><span
class="propinst-color">'color'</span></a> or <a href="colors.html#propdef-background-color" class="noxref"><span
class="propinst-background-color">'background-color'</span></a>) can take
one of the following names. Although these are case-insensitive, it is
recommended that the mixed capitalization shown below be used, to
make the names more legible.</p>
<dl>
<dt>ActiveBorder</dt>
<dd>Active window border.</dd>
<dt>ActiveCaption</dt>
<dd>Active window caption.</dd>
<dt>AppWorkspace</dt>
<dd>Background color of multiple document interface.</dd>
<dt>Background</dt>
<dd>Desktop background.</dd>
<dt>ButtonFace</dt>
<dd>Face color for three-dimensional display elements.</dd>
<dt>ButtonHighlight</dt>
<dd>Highlight color for three-dimensional display elements (for
edges facing away from the light source).</dd>
<dt>ButtonShadow</dt>
<dd>Shadow color for three-dimensional display elements.</dd>
<dt>ButtonText</dt>
<dd>Text on push buttons.</dd>
<dt>CaptionText</dt>
<dd>Text in caption, size box, and scrollbar arrow box.</dd>
<dt>GrayText</dt>
<dd>Grayed (disabled) text. This color is set to #000 if
the current display driver does not support a solid gray color.</dd>
<dt>Highlight</dt>
<dd>Item(s) selected in a control.</dd>
<dt>HighlightText</dt>
<dd>Text of item(s) selected in a control.</dd>
<dt>InactiveBorder</dt>
<dd>Inactive window border.</dd>
<dt>InactiveCaption</dt>
<dd>Inactive window caption.</dd>
<dt>InactiveCaptionText</dt>
<dd>Color of text in an inactive caption.</dd>
<dt>InfoBackground</dt>
<dd>Background color for tooltip controls.</dd>
<dt>InfoText</dt>
<dd>Text color for tooltip controls.</dd>
<dt>Menu</dt>
<dd>Menu background.</dd>
<dt>MenuText</dt>
<dd>Text in menus.</dd>
<dt>Scrollbar</dt>
<dd>Scroll bar gray area.</dd>
<dt>ThreeDDarkShadow</dt>
<dd>Dark shadow for three-dimensional display elements.</dd>
<dt>ThreeDFace</dt>
<dd>Face color for three-dimensional display elements.</dd>
<dt>ThreeDHighlight</dt>
<dd>Highlight color for three-dimensional display elements.</dd>
<dt>ThreeDLightShadow</dt>
<dd>Light color for three-dimensional display elements
(for edges facing the light source).</dd>
<dt>ThreeDShadow</dt>
<dd>Dark shadow for three-dimensional display elements.</dd>
<dt>Window</dt>
<dd>Window background.</dd>
<dt>WindowFrame</dt>
<dd>Window frame.</dd>
<dt>WindowText</dt>
<dd>Text in windows.</dd>
</dl>
<div class="example"><P style="display:none">Example(s):</P><p>
For example, to set the foreground and background colors of a paragraph
to the same foreground and background colors of the user's window,
write the following:
</p>
<pre><code class="css">
p { color: WindowText; background-color: Window }
</code></pre>
</div>
<h2>18.3 <a name="system-fonts">User preferences for fonts</a></h2>
<p>As for colors, authors may specify fonts in a way that makes use of
a user's system resources. Please consult the <a href="fonts.html#propdef-font" class="noxref"><span
class="propinst-font">'font'</span></a> property for details.
</p>
<h2>18.4 <a name="dynamic-outlines">Dynamic outlines:</a> the <a name="x2"><span
class="index-def" title="outline">'outline'</span></a> property</h2>
<p>At times, style sheet authors may want to create outlines around
visual objects such as buttons, active form fields, image maps, etc.,
to make them stand out. CSS 2.1 outlines differ from <a
href="box.html#border-properties">borders</a> in the following
ways:</p>
<ol>
<li>Outlines do not take up space. </li>
<li>Outlines may be non-rectangular. </li>
</ol>
<p>The outline properties control the style of these dynamic outlines.
</p>
<div class="propdef">
<dl><dt>
<span class="index-def" title="'outline'"><a name="propdef-outline" class="propdef-title"><strong>'outline'</strong></a></span>
<dd>
<table class="propinfo" cellspacing=0 cellpadding=0>
<tr valign=baseline><td><em>Value:</em> <td>[ <a href="ui.html#propdef-outline-color" class="noxref"><span class="propinst-outline-color"><'outline-color'></span></a> || <a href="ui.html#propdef-outline-style" class="noxref"><span class="propinst-outline-style"><'outline-style'></span></a> || <a href="ui.html#propdef-outline-width" class="noxref"><span class="propinst-outline-width"><'outline-width'></span></a> ] | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
<tr valign=baseline><td><em>Initial:</em> <td>see individual properties
<tr valign=baseline><td><em>Applies to:</em> <td>all elements
<tr valign=baseline><td><em>Inherited:</em> <td>no
<tr valign=baseline><td><em>Percentages:</em> <td>N/A
<tr valign=baseline><td><em>Media:</em> <td><a href="media.html#visual-media-group" class="noxref">visual</a>, <a href="media.html#interactive-media-group" class="noxref">interactive</a>
<tr valign=baseline><td><em>Computed value:</em> <td>see individual properties
</table>
</dl>
</div>
<div class="propdef">
<dl><dt>
<span class="index-def" title="'outline-width'"><a name="propdef-outline-width" class="propdef-title"><strong>'outline-width'</strong></a></span>
<dd>
<table class="propinfo" cellspacing=0 cellpadding=0>
<tr valign=baseline><td><em>Value:</em> <td><a href="box.html#value-def-border-width" class="noxref"><span class="value-inst-border-width"><border-width></span></a> | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
<tr valign=baseline><td><em>Initial:</em> <td>medium
<tr valign=baseline><td><em>Applies to:</em> <td>all elements
<tr valign=baseline><td><em>Inherited:</em> <td>no
<tr valign=baseline><td><em>Percentages:</em> <td>N/A
<tr valign=baseline><td><em>Media:</em> <td><a href="media.html#visual-media-group" class="noxref">visual</a>, <a href="media.html#interactive-media-group" class="noxref">interactive</a>
<tr valign=baseline><td><em>Computed value:</em> <td>absolute length; '0' if the outline style is 'none'
</table>
</dl>
</div>
<div class="propdef">
<dl><dt>
<span class="index-def" title="'outline-style'"><a name="propdef-outline-style" class="propdef-title"><strong>'outline-style'</strong></a></span>
<dd>
<table class="propinfo" cellspacing=0 cellpadding=0>
<tr valign=baseline><td><em>Value:</em> <td><a href="box.html#value-def-border-style" class="noxref"><span class="value-inst-border-style"><border-style></span></a> | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
<tr valign=baseline><td><em>Initial:</em> <td>none
<tr valign=baseline><td><em>Applies to:</em> <td>all elements
<tr valign=baseline><td><em>Inherited:</em> <td>no
<tr valign=baseline><td><em>Percentages:</em> <td>N/A
<tr valign=baseline><td><em>Media:</em> <td><a href="media.html#visual-media-group" class="noxref">visual</a>, <a href="media.html#interactive-media-group" class="noxref">interactive</a>
<tr valign=baseline><td><em>Computed value:</em> <td>as specified
</table>
</dl>
</div>
<div class="propdef">
<dl><dt>
<span class="index-def" title="'outline-color'"><a name="propdef-outline-color" class="propdef-title"><strong>'outline-color'</strong></a></span>
<dd>
<table class="propinfo" cellspacing=0 cellpadding=0>
<tr valign=baseline><td><em>Value:</em> <td><a href="syndata.html#value-def-color" class="noxref"><span class="value-inst-color"><color></span></a> | invert | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
<tr valign=baseline><td><em>Initial:</em> <td>invert
<tr valign=baseline><td><em>Applies to:</em> <td>all elements
<tr valign=baseline><td><em>Inherited:</em> <td>no
<tr valign=baseline><td><em>Percentages:</em> <td>N/A
<tr valign=baseline><td><em>Media:</em> <td><a href="media.html#visual-media-group" class="noxref">visual</a>, <a href="media.html#interactive-media-group" class="noxref">interactive</a>
<tr valign=baseline><td><em>Computed value:</em> <td>as specified
</table>
</dl>
</div>
<p>The outline created with the outline properties is drawn "over" a
box, i.e., the outline is always on top, and doesn't influence the
position or size of the box, or of any other boxes. Therefore,
displaying or suppressing outlines does not cause reflow or overflow.
</p>
<p>The outline may be drawn starting just outside the <a
href="box.html#border-edge">border edge</a>.
</p>
<p>Outlines may be non-rectangular. For example, if the element is
broken across several lines, the outline is the minimum outline that
encloses all the element's boxes. In contrast to <a
href="box.html#border-properties">borders</a>, the outline is not
open at the line box's end or start, but is always fully connected if possible.
</p>
<p>The <a href="ui.html#propdef-outline-width" class="noxref"><span class="propinst-outline-width">'outline-width'</span></a>
property accepts the same values as <a href="box.html#propdef-border-width" class="noxref"><span
class="propinst-border-width">'border-width'</span></a>.
</p>
<p>The <a href="ui.html#propdef-outline-style" class="noxref"><span class="propinst-outline-style">'outline-style'</span></a>
property accepts the same values as <a href="box.html#propdef-border-style" class="noxref"><span
class="propinst-border-style">'border-style'</span></a>,
except that 'hidden' is not a legal outline style.
</p>
<p>The <a href="ui.html#propdef-outline-color" class="noxref"><span class="propinst-outline-color">'outline-color'</span></a>
accepts all colors, as well as the keyword <span class="index-def"
title="invert"><a class="value-def"
name="value-def-invert">'invert'</a></span>. 'Invert' is expected to
perform a color inversion on the pixels on the screen. This is a
common trick to ensure the focus border is visible, regardless of
color background.
</p>
<p>
Conformant UAs may ignore the 'invert' value on platforms that do not
support color inversion of the pixels on the screen. If the UA does not
support the 'invert' value then the initial value of the 'outline-color'
property is the value of the 'color' property, similar to the initial value
of the 'border-top-color' property.
</p>
<p>The <a href="ui.html#propdef-outline" class="noxref"><span class="propinst-outline">'outline'</span></a> property is a
shorthand property, and sets all three of <a href="ui.html#propdef-outline-style" class="noxref"><span
class="propinst-outline-style">'outline-style'</span></a>, <a href="ui.html#propdef-outline-width" class="noxref"><span
class="propinst-outline-width">'outline-width'</span></a>, and <a href="ui.html#propdef-outline-color" class="noxref"><span
class="propinst-outline-color">'outline-color'</span></a>.
</p>
<div class="note"><p><em><strong>Note.</strong>
The outline is the same on all sides. In
contrast to borders, there is no 'outline-top' or 'outline-left'
property.
</em></p>
</div>
<p>This specification does not define how multiple overlapping
outlines are drawn, or how outlines are drawn for boxes that are
partially obscured behind other elements.
</p>
<div class="note"><p>
<em><strong>Note.</strong>
Since the outline does not affect formatting (i.e., no
space is left for it in the box model), it may well overlap
other elements on the page.
</em></p>
</div>
<div class="example"><P style="display:none">Example(s):</P><p>
Here's an example of drawing a
thick outline around a BUTTON element:
</p>
<pre><code class="css">
button { outline : thick solid}
</code></pre>
<p>Scripts may be used to dynamically change the width
of the outline, without provoking a reflow.
</p>
</div>
<h3>18.4.1 <a name="outline-focus">Outlines and the focus</a></h3>
<p>Graphical user interfaces may use outlines around elements to tell
the user which element on the page has the <a name="x8"><span class="index-def"
title="focus"><dfn>focus</dfn></span></a>. These outlines are in addition
to any borders, and switching outlines on and off should not cause
the document to reflow. The focus is the subject of user interaction
in a document (e.g., for entering text, selecting a button,
etc.). User agents supporting the <a
href="media.html#interactive-media-group">interactive media group</a>
must keep track of where the focus lies and must also represent the
focus. This may be done by using dynamic outlines in conjunction with
the :focus pseudo-class.
</p>
<div class="example"><P style="display:none">Example(s):</P>
<p>For example, to draw a thick black line around an element when it
has the focus, and a thick red line when it is active, the following
rules can be used:
</p>
<pre><code class="css">
:focus { outline: thick solid black }
:active { outline: thick solid red }
</code></pre>
</div>
<h2>18.5 <a name="magnification">Magnification</a></h2>
<p>The CSS working group considers that the magnification of a
document or portions of a document should not be specified through
style sheets. User agents may support such magnification in different ways
(e.g., larger images, louder sounds, etc.)
</p>
<p>When magnifying a page, UAs should preserve the relationships
between positioned elements. For example, a comic strip may be
composed of images with overlaid text elements. When magnifying this
page, a user agent should keep the text within the comic strip balloon.
</p>
<hr class="navbar">
<div class="navbar">
<p><a href="tables.html">previous</a>
<a href="aural.html">next</a>
<a href="cover.html#minitoc">contents</a>
<a href="propidx.html">properties</a>
<a href="indexlist.html">index</a>
</div>
</body>
</html>
|