Skip to content

Instantly share code, notes, and snippets.

@itamar
Created February 20, 2014 00:28
Show Gist options
  • Select an option

  • Save itamar/9104510 to your computer and use it in GitHub Desktop.

Select an option

Save itamar/9104510 to your computer and use it in GitHub Desktop.
CSS Best Practices
/* instead of this: */
.row#categories .block-list li#mixing {
background: white url(/assets/home/mixing.jpg) top center no-repeat;
background-size: cover;
}
.row#categories .block-list li#mastering {
background: white url(/assets/home/mastering.jpg) top center no-repeat;
background-size: cover;
}
/* I would go with */
.categories .block-list li {
background-size: cover;
}
.categories .block-list li.mixing {
background: white url(/assets/home/mixing.jpg) top center no-repeat;
}
.categories .block-list li.mastering {
background: white url(/assets/home/mastering.jpg) top center no-repeat;
}
/* */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment