18 User interface


  1. Cursors: the 'cursor' property
  2. User preferences for colors
  3. User preferences for fonts
  4. Other rendering issues that depend on user agents
    1. Magnification

18.1 Cursors: the 'cursor' property


Property name:  'cursor'
Value:  [ [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ] || <uri>? ] | inherit
Initial:  auto
Applies to:  all elements
Inherited:  yes
Percentage values:  N/A
Media groups:  visual

This property specifies the type of cursor to be displayed for the pointing device. Values have the following meanings:

The UA determines the cursor to display based on the current context.
A simple crosshair (e.g., short line segments resembling a "+" sign).
The platform-dependent default cursor. Often rendered as an arrow.
The cursor is a pointer that indicates a link.
Indicates something is to be moved
Indicates that the edge is to be moved.
Indicates text that may be selected. Often rendered as an I-bar.
A cursor to indicate that the program is busy and the user should wait. Often rendered as a watch or hourglass.
Help is available for the object under the cursor. Often rendered as a question mark or a balloon.
The user agent should retrieve the cursor from the resource designated by the URI. It is an error if the resource is not a proper cursor. User agents may handle this error condition in different ways.

The following example makes the cursor stored in the resource mything.cur the "text" cursor.

P { cursor : text url(mything.cur) }

CSS2 does not allow users to specify animated cursors.

18.2 User preferences for colors

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. For instance, color-blind users may have their environment configured to avoid specific colors. 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:

Active window border.
Active window caption.
Background color of multiple document interface.
Desktop background.
Face color for three-dimensional display elements.
Dark shadow for three-dimensional display elements (for edges facing away from the light source).
Shadow color for three-dimensional display elements.
Text on push buttons.
Text in caption, size box, and scroll bar arrow box.
Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.
Item(s) selected in a control.
Text of item(s) selected in a control.
Inactive window border.
Inactive window caption.
Color of text in an inactive caption.
Background color for tooltip controls.
Text color for tooltip controls.
Menu background.
Text in menus.
Scroll bar gray area.
Dark shadow for three-dimensional display elements.
Face color for three-dimensional display elements.
Highlight color for three-dimensional display elements.
Light color for three-dimensional display elements (for edges facing the light source).
Dark shadow for three-dimensional display elements.
Window background.
Window frame.
Text in windows.

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 }

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 Other rendering issues that depend on user agents

18.4.1 Magnification

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.)

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.