11/14/2013 - 4:13 AM

CSS Shorthand Rules

CSS Shorthand Rules

font: bold italic small-caps 1em/1.5em verdana,sans-serif

background: [background-color] [background-image] [background-repeat]
            [background-attachment] [background-position] / [ background-size]
            [background-origin] [background-clip];
Notice the forward slash, similar to how font shorthand and border-radius can be written. The slash allows you to include a background-size value after the position in supporting browsers.

In addition, you also have up to two optional declarations for background-origin and background-clip.

.example {
  background: aquamarine url(img.png)
              center center / 50%
              content-box content-box;

Only on firefox:
text-decoration:  text-decoration-line, text-decoration-color, text-decoration-style