Skip to content

Instantly share code, notes, and snippets.

@robhrt7
Last active August 29, 2015 13:56
Show Gist options
  • Save robhrt7/9058860 to your computer and use it in GitHub Desktop.
Save robhrt7/9058860 to your computer and use it in GitHub Desktop.
CSS organisation
/*
CSS organisation principles
==============================================================================================
*/
.elem-no-rules {}
.elem-no-rules_child {
display: inline-block;
}
/*
==============================================================================================
*/
/* Elem
-------------------------------------------------- */
.elem {
display: block;
}
.elem:hover {
display: none;
}
.elem.__special {
height: 180px;
}
.elem_child {
background: red;
}
.elem.__n1 { color: red; }
.elem.__n2 { color: green; }
.elem.__n3 { color: yellow; }
.elem-elem {
text-align: center;
}
.elem-elem_child {
text-align: left;
}
.elem-elem_child:first-child {
font-size: 10px;
}
.elem-elem_child:before,
.elem-elem_child:after {
content: "";
display: block;
}
.elem-elem_child:before:hover {
opacity: .5;
}
.ie8 .elem-elem_child {
font-size: 11px;
}
.elem-elem-foo,
.elem-elem-goo,
.elem-elem-bar {
text-align: left;
font-weight: bold;
}
.elem-elem-bar {
color: red;
}
.elem-elem-bar {
position: static;
}
/* /Elem */
/*
==============================================================================================
*/
.mb-5 {margin-bottom: 5px;}
.mb-10 {margin-bottom: 10px;}
.mb-15 {margin-bottom: 15px;}
.mb-20 {margin-bottom: 20px;}
.mb-5 {margin-bottom: 5px;}
.mb-10 {margin-bottom: 10px;}
.mb-15 {margin-bottom: 15px;}
.mb-20 {margin-bottom: 20px;}
/*
==============================================================================================
*/
a.white:hover,
.white_hover:hover {color:#ccc;}
/*
==============================================================================================
*/
.stub-img__32,
.stub-img__40,
.stub-img__50,
.stub-img__128,
.stub-img__150,
.stub-img__180,
.stub-img__190,
.stub-img__photo120
{
background-repeat: no-repeat;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment