forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.src
More file actions
344 lines (278 loc) · 12.5 KB
/
Copy pathui.src
File metadata and controls
344 lines (278 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<!-- $Id: ui.src,v 2.7 1998-03-16 14:38:39 ijacobs Exp $ -->
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>User interface</TITLE>
</HEAD>
<BODY>
<H1 align="center">User interface</H1>
<!-- Not decided yet: Add 'focus-outline' (compound property):
<color>||<border-style>||<length>. ChrisW. 26/2/98 -->
<H2><a name="cursor-props">Cursors:</a> the <span
class="propinst-cursor">'cursor'</span> property</H2>
<!-- #include src=properties/cursor.srb -->
<P>This property specifies the type of cursor to be displayed for the
pointing device. Values have the following meanings:
<dl>
<dt><strong>auto</strong>
<dd>The UA determines the cursor to display based on the current
context.
<dt><strong>crosshair</strong>
<dd>A simple crosshair (e.g., short line segments resembling a "+" sign).
<dt><strong>default</strong>
<dd>The platform-dependent default cursor. Often rendered as an arrow.
<dt><strong>pointer</strong>
<dd>The cursor is a pointer that indicates a link.
<dt><strong>move</strong>
<dd>Indicates something is to be moved
<dt><strong>*-resize</strong>
<dd>Indicates that the edge is to be moved.
<dt><strong>text</strong>
<dd> Indicates text that may be selected. Often rendered as an I-bar.
<dt><strong>wait</strong>
<dd>A cursor to indicate that the program is busy and the user should
wait. Often rendered as a watch or hourglass.
<dt><strong>help</strong>
<dd>Help is available for the object under the cursor. Often rendered
as a question mark or a balloon.
<dt><span class="value-inst-uri"><strong><uri></strong></span>
<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.
</dl>
<div class="example"><P>
<PRE>
P { cursor : url(mything.cur), url(second.csr), text; }
</PRE>
</div>
<H2><a name="focus-outline">Representing the focus</a></H2>
<P>Most computer-human interfaces have the concept of user <span
class="index-def" title="focus"><dfn>focus</dfn></span>, 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. Visual user agents often represent the focus by outlining
the relevant control or element.
<P>Focus outlines are functionally distinct from normal CSS borders
for several reasons:</p>
<ul>
<li>The focus outline does not change the layout of the page - it is
drawn "over" the element, but do not change the position or layout
of a box.
<li>The focus outline may be drawn around regular CSS borders - e.g., a
three-dimensional button (a common user-interface element) may
be seen as a text element with an outset border, and when the element has
the focus, an additional border is drawn around the outset border.
<li>The focus outline does not have to be rectangular. Most of
today's user agents are capable of showing the focus around image map
areas, which may not be rectangular.
</ul>
<P>On CSS boxes, focus outlines are drawn directly outside the <a
href="visuren.html#border-edge">border edge</a>. If an inline element
has a focus border, the border may be drawn as a series of boxes when
line breaking occurs. The boxes are closed on all sides.
<P>The following properties control the presentation of the focus
outline. They may only be used in conjunction with the <a
href="selector.html#dynamic-pseudo-classes">:focus</a> pseudo-class.
<!-- #include src=properties/focus-outline-width.srb -->
<P>This property sets the width of the focus outline. The actual
widths of 'thin', 'medium', and 'thick' may vary between user agents,
but the values must increase in width from 'thin' to 'medium' to
'thick'. Users may also specify an explicit <span class="index-inst"
title="<length>"><span
class="value-inst-length"><length></span></span>.
<div class="note"><P>
<em><strong>Note.</strong>
Since the focus 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>
</div>
<!-- #include src=properties/focus-outline-style.srb -->
<P>This property sets the style of the focus outline. Values have the
same meaning as for <span class="index-inst"
title="<border-style>"><span
class="value-inst-border-style"><border-style></span></span>
except that 'hidden' is not a legal outline style.
<!-- #include src=properties/focus-outline-color.srb -->
<P>This property sets the color of the focus outline. Values may
either be a <span class="index-inst" title="<color>"><span
class="value-inst-color"><color></span></span> or 'invert',
which is expected to perform a color inversion on the pixels on the
screen. This is a common technique ensuring that the focus outline
remains visible, regardless of background color.
<!-- #include src=properties/focus-outline.srb -->
<P>This is a shorthand property for setting the <span
class="propinst-focus-outline-width">'focus-outline-width'</span>, <span
class="propinst-focus-outline-style">'focus-outline-style'</span>, and <span
class="propinst-focus-outline-color">'focus-outline-color'</span> at the same
place in the style sheet.
<P> For a definition of allowed and initial values, see the previously
defined properties. A sub-property for which no value has been
specified takes that property's initial value, <em>not</em> the
inherited value.
<div class="example"><P>
The following rule sets three characteristics of the focus
outline to follow behavior of some popular user agents:</p>
<PRE>
:focus { thin dotted invert }
</PRE>
</div>
<H2><a name="system-colors">User preferences for colors</a></H2>
<p>In addition to being able to assign pre-defined color values to
text, backgrounds, etc., CSS2 allows authors to specify colors in a
manner that integrates them into the user's graphic environment. Style
rules that take into account user preferences thus offer the following
advantages:
<ol>
<li>They produce pages that fit the user's defined look and feel.</li>
<li>They produce pages that may be more accessible as the current user
settings may be related to a disability.</li>
</ol>
<p>The set of values defined for system colors is intended to be
exhaustive. For systems that do not have a corresponding value, the
specified value should be mapped to the nearest system attribute, or
to a default color.</p>
<p>The following lists additional values for color related CSS
attributes and their general meaning. Any color property (e.g., <span
class="propinst-color">'color'</span> or <span
class="propinst-background-color">'background-color'</span>) can take
one of the following names:</p>
<dl>
<dt><strong>active-border</strong>
<dd>Active window border.
<dt><strong>active-caption</strong>
<dd>Active window caption.
<dt><strong>app-workspace</strong>
<dd>Background color of multiple document interface.
<dt><strong>background</strong>
<dd>Desktop background.
<dt><strong>button-face</strong>
<dd>Face color for three-dimensional display elements.
<dt><strong>button-highlight</strong>
<dd>Dark shadow for three-dimensional display elements (for
edges facing away from the light source).
<dt><strong></strong>
<dd>Shadow color for three-dimensional display elements.
<dt><strong>button-text</strong>
<dd>Text on push buttons.
<dt><strong>caption-text</strong>
<dd>Text in caption, size box, and scroll bar arrow box.
<dt><strong>gray-text</strong>
<dd>Grayed (disabled) text. This color is set to #000 if
the current display driver does not support a solid gray color.
<dt><strong>highlight</strong>
<dd>Item(s) selected in a control.
<dt><strong>highlight-text</strong>
<dd>Text of item(s) selected in a control.
<dt><strong>inactive-border</strong>
<dd>Inactive window border.
<dt><strong>inactive-caption</strong>
<dd>Inactive window caption.
<dt><strong>inactive-caption-text</strong>
<dd>Color of text in an inactive caption.
<dt><strong>info-background</strong>
<dd>Background color for tooltip controls.
<dt><strong>info-text</strong>
<dd>Text color for tooltip controls.
<dt><strong>menu</strong>
<dd>Menu background.
<dt><strong>menu-text</strong>
<dd>Text in menus.
<dt><strong>scrollbar</strong>
<dd>Scroll bar gray area.
<dt><strong>three-d-dark-shadow</strong>
<dd>Dark shadow for three-dimensional display elements.
<dt><strong>three-d-face</strong>
<dd>Face color for three-dimensional display elements.
<dt><strong>three-d-highlight</strong>
<dd>Highlight color for three-dimensional display elements.
<dt><strong>three-d-light-shadow</strong>
<dd>Light color for three-dimensional display elements
(for edges facing the light source).
<dt><strong>three-d-shadow</strong>
<dd>Dark shadow for three-dimensional display elements.
<dt><strong>window</strong>
<dd>Window background.
<dt><strong>window-frame</strong>
<dd>Window frame.
<dt><strong>window-text</strong>
<dd>Text in windows.
</dl>
<div class="example"><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:
<PRE>
P { color: windowtext; background-color: window }
</PRE>
</div>
<H2><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 <span
class="propinst-font">'font'</span> property for details.
<h2>Dynamic outlines: the <span class="index-def"
title="outline">'outline'</span> property</h2>
<p>[This section is tentative, awaiting decision on 'outline' by WG.]
<!-- include src=properties/outline.srb -->
<!-- include src=properties/outline-width.srb -->
<!-- include src=properties/outline-style.srb -->
<!-- include src=properties/outline-color.srb -->
<p>Interactive UAs often draw attention to an element by drawing an
outline around it. Most often this is done to indicate that an element
has the focus (see the <a
href="selector.html#dynamic-pseudo-classes">':focus'</a>
pseudo-class).
<div class="example">
<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:
<pre>
:focus {outline: thick solid black}
:active {outline: thick solid red}
</pre>
</div>
<p>The outline created with the 'outline' properties is drawn "over"
the element, i.e. the outline is always on top, and doesn't influence
the position or size of the element, or of any other elements.
<p>The outline is drawn just outside the <a
href="visuren.html#border-edge">border edge</a>.
<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="visudet.html#border-properties">borders</a>, the outline is not
open at the line box's end or start, but is always fully connected.
<p>'Outline-width' accepts the same values as <span
class="propinst-border-width">'border-width'</span>. 'Outine-style'
accepts the same values as <span
class="propinst-border-style">'border-style'</span>.
<p>'Outline-color' 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>'Outline' is a shorthand property, and sets all three of
'outline-style', 'outline-width', and 'outline-color'.
<p class="note">Note that the outline is the same on all sides. In
contrast to borders, there is no "outline-top" or "outline-left"
property.
<p>It is undefined how multiple overlapping outlines are drawn, or how
outlines are drawn of elements that are partially obscured behind
other elements.
<H2>Magnification</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>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.
</BODY>
</html>