CSS Shorthand Guide
Sunday, October 23rd, 2005Using CSS shorthands instead of the regular rules will help reduce the weight of your CSS files dramatically. Instead of writing bloated rules such as:
element {
background-color: red;
background-repeat: no-repeat;
background-image: url(image.png);
}
we could use the following, which does exactly the same thing:
element {
background: red url(image.png) no-repeat;
}
To make our life easier, Dustin Diaz has compiled a comprehensive CSS shorthand guide, explaining all the possibilities and highlighting some of the quirks and things you need to keep in mind.
There’s a nice
Everyone’s been blogging about it, but in case you missed it: a number of sessions from
parasight.de