-
-
Save GabeStah/7d452e3b78b2d07bec8d to your computer and use it in GitHub Desktop.
Use Shorthand Properties
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
/* Use Shorthand Properties */ | |
/* Bad, these properties can be combined into one shorthand line. */ | |
.menu { | |
background: url(book.png); | |
background-color: #eee; | |
background-repeat: repeat; | |
margin-bottom: 1em; | |
margin-right: 2em; | |
margin-top: 1em; | |
padding-right: 2em; | |
padding-top: 4em; | |
} | |
/* Good, consolidated our properties as much as possible. */ | |
.menu { | |
background: url(book.png) #eee repeat; | |
margin: 1em 2em 1em; | |
padding: 4em 2em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment