Created
November 14, 2013 04:13
-
-
Save carlos-sanchez/7461231 to your computer and use it in GitHub Desktop.
CSS Shorthand Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
no-repeat | |
scroll | |
center center / 50% | |
content-box content-box; | |
} | |
Only on firefox: | |
text-decoration: text-decoration-line, text-decoration-color, text-decoration-style | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment