HTML and CSS Reference
In-Depth Information
Why Designers Took So Long to Embrace CSS
According to the W3C, the CSS specification was drawn up in response to “pressure from authors for richer
visual control.” The demand for better control of web pages was certainly there, but browsers in the late 1990s
implemented CSS very poorly or not at all. Only the very brave or foolhardy adopted CSS in the early stages.
Nevertheless, the W3C published CSS2 in 1998. CSS2 retained all the features of CSS1 and added some new ones.
Those brave enough to embrace CSS ended up banging their heads on their keyboards in frustration. The
specification was a statement of what the W3C thought browsers ought to do. The reality was completely different.
Neither of the main browsers, Netscape Navigator or Microsoft Internet Explorer (IE), had good support for CSS.
However, Microsoft put a huge effort into improving its browser, sparking off what became known as the browser
wars. By the time IE 6 was released in 2001, it supported most of CSS, and won the battle for market share.
With Netscape in terminal decline, adventurous designers began to use CSS in earnest, but IE 6 was far from
perfect. Worse, Microsoft sat on its laurels and made no effort to improve CSS support in IE 6 until it began to
see its market share eroded by new browsers, such as Firefox, Safari, and Opera. Microsoft's response eventually
emerged in the form of IE 7 in 2006. IE 8, which followed in 2009, finally offered support for the whole of CSS2.1
(an updated version of CSS2). In the meantime, the rest of the browser market had already started supporting the
next generation of standards, CSS3.
Understanding the Different Versions of CSS
Because no two browsers ever managed to implement the full CSS2 specification, the W3C issued a revised
specification called CSS2.1 in 2002. However, it took a further nine years before CSS2.1 finally received the
formal seal of approval in June 2011. Coincidentally, the first part of CSS3—the Color module—became a formal
recommendation on the same day as CSS2.1. To speed up the development and adoption of CSS3, the W3C has
divided the specification into some 50 modules. Work on some of them is already at an advanced stage. Others
are only ideas, and don't yet have any formal proposals.
Tip
for an up-to-date list of CSS3 modules and their status, visit www.w3.org/Style/CSS/current-work .
The CSS3 Color module expands the type of color formats that you can use in websites to include HSL (hue,
saturation, lightness) and alpha transparency. The following year, the Media Queries module also became a formal
recommendation. Media queries serve different styles to devices depending on screen width and orientation.
Other modules at an advanced stage of development—and widely supported by browsers—at the time of writing
include Backgrounds and Borders, and Multi-column Layout. The Background and Borders module makes it easy
to add multiple backgrounds to page elements, and to create rounded corners and drop shadows without the need
for images. There's also strong support for embedding web fonts.
All the main browser makers now seem committed to implementing CSS3 features as quickly as possible,
and the pace at which new versions of browsers are released has rapidly accelerated. This means there's no need
to wait for a particular module to gain formal approval. You can begin using many parts of CSS3 in your designs
right now. One of the best places to get up-to-date information on which features are supported is the website at
http://caniuse.com (see Figure 1-2 ).
 
 
Search WWH ::




Custom Search