Skip to content

Instantly share code, notes, and snippets.

@rob-bar
Created September 25, 2012 15:07
Show Gist options
  • Save rob-bar/3782485 to your computer and use it in GitHub Desktop.
Save rob-bar/3782485 to your computer and use it in GitHub Desktop.
Commenting, shorthand css and function calls:
/* -- 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