[ Pobierz całość w formacie PDF ]

Example(s):
P { cursor : url("mything.cur"), url("second.csr"), text; }
18.2 User preferences for colors
In addition to being able to assign pre-defined color values [p. 48] to text, back-
grounds, 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:
1. They produce pages that fit the user’s defined look and feel.
2. They produce pages that may be more accessible as the current user
settings may be related to a disability.
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.
The following lists additional values for color-related CSS attributes and their
general meaning. Any color property (e.g., ’color’ or ’background-color’) can take
one of the following names. Although these are case-insensitive, it is recom-
mended that the mixed capitalization shown below be used, to make the names
more legible.
ActiveBorder
Active window border.
ActiveCaption
Active window caption.
AppWorkspace
Background color of multiple document interface.
Background
Desktop background.
ButtonFace
Face color for three-dimensional display elements.
ButtonHighlight
Dark shadow for three-dimensional display elements (for edges facing away
from the light source).
ButtonShadow
Shadow color for three-dimensional display elements.
ButtonText
Text on push buttons.
272
CaptionText
Text in caption, size box, and scrollbar arrow box.
GrayText
Grayed (disabled) text. This color is set to #000 if the current display driver
does not support a solid gray color.
Highlight
Item(s) selected in a control.
HighlightText
Text of item(s) selected in a control.
InactiveBorder
Inactive window border.
InactiveCaption
Inactive window caption.
InactiveCaptionText
Color of text in an inactive caption.
InfoBackground
Background color for tooltip controls.
InfoText
Text color for tooltip controls.
Menu
Menu background.
MenuText
Text in menus.
Scrollbar
Scroll bar gray area.
ThreeDDarkShadow
Dark shadow for three-dimensional display elements.
ThreeDFace
Face color for three-dimensional display elements.
ThreeDHighlight
Highlight color for three-dimensional display elements.
ThreeDLightShadow
Light color for three-dimensional display elements (for edges facing the light
source).
ThreeDShadow
Dark shadow for three-dimensional display elements.
Window
Window background.
WindowFrame
Window frame.
WindowText
Text in windows.
Example(s):
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 { color: WindowText; background-color: Window }
273
18.3 User preferences for fonts
As for colors, authors may specify fonts in a way that makes use of a user’s
system resources. Please consult the ’font’ property for details.
18.4 Dynamic outlines: the ’outline’ property
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.
CSS2 outlines differ from borders [p. 88] in the following ways:
1. Outlines do not take up space.
2. Outlines may be non-rectangular.
The outline properties control the style of these dynamic outlines.
’outline’
Value:
[ ’outline-color’ || ’outline-style’ || ’outline-width’ ] |
inherit
Initial:
see individual properties
Applies to:
all elements
Inherited:
no
Percentages: N/A
Media:
visual, interactive
’outline-width’
Value:
border-width | inherit
Initial:
medium
Applies to:
all elements
Inherited:
no
Percentages: N/A
Media:
visual, interactive
’outline-style’
Value:
border-style | inherit
Initial:
none
Applies to:
all elements
Inherited:
no
Percentages: N/A
Media:
visual, interactive
’outline-color’
274
Value:
color | invert | inherit
Initial:
invert
Applies to:
all elements
Inherited:
no
Percentages: N/A
Media:
visual, interactive
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.
The outline is drawn starting just outside the border edge [p. 82] .
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 borders [p. 88] , the outline is not open at the line box’s end
or start, but is always fully connected.
The ’outline-width’ property accepts the same values as ’border-width’.
The ’outline-style’ property accepts the same values as ’border-style’, except
that ’hidden’ is not a legal outline style.
The ’outline-color’ accepts all colors, as well as the keyword ’invert’. ’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 back-
ground.
The ’outline’ property is a shorthand property, and sets all three of
’outline-style’, ’outline-width’, and ’outline-color’.
Note that the outline is the same on all sides. In contrast to borders, there is no
’outline-top’ or ’outline-left’ property.
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.
Note. 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.
Example(s):
Here’s an example of drawing a thick outline around a BUTTON element:
BUTTON { outline-width : thick }
Scripts may be used to dynamically change the width of the outline, without
provoking reflow.
18.4.1 Outlines and the focus
Graphical user interfaces may use outlines around elements to tell the user
which element on the page has the focus. 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 enter-
ing text, selecting a button, etc.). User agents supporting the interactive media
group [p. 79] 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.
275
Example(s): [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • girl1.opx.pl
  •