Pro HTML5 and CSS3 Design Patterns

(avery) #1

CHAPTER 1 DESIGN PATTERNS: MAKING CSS EASY!


support is poor for numerical font weights, generally treating 100 through 400 as
normal and 500 through 900 as bold. Furthermore, bolder and lighter are rarely
supported by browsers and/or operating system fonts. Thus, I rarely use any value
for font-weight other than normal or bold.)

Later in the chapter, I present a four-page chart that lists all usable CSS properties and values. color
is the only property in the chart that has an incomplete list of usable values. It shows 79 of the 170 color
constants. I organized the 79 color constants into three groups that you may find useful: the 16 standard
colors organized by hue, 35 common colors organized by hue from light to dark, and the 28 operating
system colors. Throughout this book, I often use the color gold. I also use related hues such as wheat,
orange, tomato, firebrick, and yellow.

■ Tip You can disable a rule by placing the number 1 (or any other character for that matter) immediately in
front of a property name—for example, 1background-color:white. This invalidates the rule, but only the one
rule. All other valid rules before and after the invalid one are still processed. I often use this technique to invalidate
one rule temporarily to disable its effect while testing other rules.
Free download pdf