Created
September 25, 2012 15:07
-
-
Save rob-bar/3782485 to your computer and use it in GitHub Desktop.
Commenting, shorthand css and function calls:
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
/* -- COMMENTING -- */ | |
/* -- 1linecomment -- */ or /* comment */ | |
/* ============================================================================= | |
sectionname | |
========================================================================== */ | |
/* -- SHORT HAND CSS -- */ | |
/* -- BAD -- */ | |
#identifier { | |
margin-left: 20px; | |
background-color: transparent; | |
background-image: url('image.jpg'); | |
background-repeat: no-repeat; | |
background-position: top right; | |
background-attachment: scroll; | |
} | |
/* -- GOOD -- */ | |
#identifier { | |
margin: 0 0 0 20px; /* -- 1 2 3 OR 4 parameters-- */ | |
background: transparent url('image.jpg') no-repeat scroll top right; | |
} | |
/* -- FUNCTION CALLS -- */ | |
/* -- BAD -- */ | |
#identifier { | |
color: rgba(0,0,0,.2); | |
} | |
/* -- GOOD -- */ | |
#identifier { | |
color: rgba(0, 0, 0, 0.2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment