Hi, On Sat, Dec 19, 2009 at 10:18 AM, Phillip Senn <[email protected]> wrote: > In screen.css, the "box" class uses background:#E5ECF9. > Why wouldn't it use background-color: #E5ECF9 instead? > Is background the preferred way to set the background color, or > background-color?
I can't give you the reason behind this specific instance, but 'background' is the 'shortcut' property where you can set all of the background properties in a single declaration: /* Example using all background properties: */ background-color:#f90; background-image:url(foo/bar.gif); background-attachment:fixed; background-repeat:no-repeat; background-position:0 0; /* Example using only background: */ background:#f90 url(foo/bar.gif) fixed no-repeat 0 0; In practice, it's common for developers to use something like 'background:#f90;' to ensure that all the *other* background properties are set to their default values. This is possible since 'background' used alone overrides ALL other background properties for the selected elements. Further reading: http://www.w3.org/TR/CSS21/colors.html#background-properties -- Christopher Torgalson http://www.typo3apprentice.com/ -- You received this message because you are subscribed to the Google Groups "Blueprint CSS" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/blueprintcss?hl=en.
