Saturday 18th of November 2017 04:52:25 PM

Style Guide

CSS: Style Sheet Guidelines (1)

According to its creators at W3C, Cascading Style Sheets “is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.” Let's expand that definition to see what it means for Web designers and developers:

  1. CSS is a standard layout language for the Web—one that controls colors, typography, and the size and placement of elements and images.
  2. Though precise and powerful, CSS is easy to author by hand.
  3. It is bandwidth–friendly technology: a single 10K CSS document can control the appearance of an entire website, comprising thousands of pages and hundreds of megabytes. (For an example, see the Sophisticated Style Sheet on page 2.)
  4. window onto the document. If the document is too long to be displayed in the window, then the user can scroll back and forth through the document. The center could be two or three "screens" below the beginning of the document, or just far enough down to push much of the background image beyond the bottom of the browser window, as shown in Figure 6-53.

    Figure 6-53

    Figure 6-53. The background image appears too low to be seen fully

    Furthermore, even assuming that the background image is initially visible, it always scrolls with the document. Perhaps you don't

  5. CSS is intended by its creators (W3C) to replace HTML table-based layouts, frames, and other presentational hacks.
  6. CSS, together with other web standards such as XHTML, helps us separate style from content, making the Web more accessible, and opening it up to more powerful applications and technologies to come.

Laying out pages with CSS instead of HTML tables—or using CSS simply to replace redundant, non–standard HTML hacks, such as invalid extensions to the <font> tag or the <body> tag—provides the following benefits:

  1. Conserve bandwidth (less markup for visitors to download)
  2. Reduce design/development time
  3. Reduce updating and maintenance time
  4. Increased accessibility (fewer, or no, HTML tables; no invalid junk markup)
  5. Adhere to W3C recommendations, improving interoperability and ensuring greater longevity (sites will not become obsolete)
  6. Better, more professional appearance (line–height, borders, padding, margins)
  7. Increased readability (line–height, borders, padding, margins)
  8. More easily transition in future to more powerful standards such as XML (because page content no longer contains junk markup)

On the next page, we explore the basics of CSS and its recommended usage at NYPL. »

« CSS Section Index | CSS Guidelines 2 »

recreated using the CSS2 property font-stretch, but sadly, this property was not supported at the time of this writing. See Chapter 10, "CSS2: A Look Ahead" for a look at font-stretch.

The opening dropped capital "T" also doesn't seem to quite match up. This might also be addressed using font-stretch, or perhaps by giving the letter a font-weight of 900. However, it might be best to leave things as they are, since this is a small