Skip to Content
CSS: The Definitive Guide, 3rd Edition
book

CSS: The Definitive Guide, 3rd Edition

by Eric A. Meyer
November 2006
Intermediate to advanced content levelIntermediate to advanced
536 pages
17h 6m
English
O'Reilly Media, Inc.
Content preview from CSS: The Definitive Guide, 3rd Edition

Chapter 13. User Interface Styles

The vast majority of CSS is concerned with styling documents, but it offers a passel of useful interface-styling tools for more than just documents. For example, Mozilla’s developers created its browser’s interface (and that of many Mozilla clones) using a language called XUL. XUL employs CSS and CSS-like declarations to present the navigation buttons, sidebar tabs, dialog boxes, status boxes, and other pieces of the chrome itself.

Similarly, you can reuse aspects of the user’s default environment to style a document’s fonts and colors; it’s even possible to exert influence over focus highlighting and the mouse cursor. CSS2’s interface capabilities can make the user’s experience more enjoyable—or more confusing, if you aren’t careful.

System Fonts and Colors

There may be times when you want your document to mimic the user’s computing environment as closely as possible. An obvious example is if you’re creating web-based applications, where the goal is to make the web component seem like a part of the user’s operating system. While CSS2 doesn’t make it possible to reuse every last aspect of the operating system’s appearance in your documents, you can choose from a wide variety of colors and a short list of fonts.

System Fonts

Let’s say you’ve created an element that functions as a button (via JavaScript, for example). By making the control look just like a button in the user’s computing environment, you meet the user’s expectations of how a control ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CSS: The Definitive Guide, 4th Edition

CSS: The Definitive Guide, 4th Edition

Eric Meyer, Estelle Weyl
CSS in Depth

CSS in Depth

Keith Grant

Publisher Resources

ISBN: 0596527330Supplemental ContentErrata Page