OOCSS

Object
Oriented
CSS

#action {
  border-radius: 5px;
  padding: 30px 40px;
  #action-info{ float: left;
    h1.logo{ text-indent: -9999px; overflow: hidden; background: url('/images/bg-action-logo.png') no-repeat; width: 282px; height: 33px; margin-bottom: 10px;}
    h2{ font-size: 18px; color: #8e8f94; strong{ font-size: 27px; color: #fff;}}
  }
  #action-call{ float: right;
    a{ text-decoration: none; font-weight: bold; padding-right: 60px; background: url('/images/bg-action-circle.png') no-repeat right center; display: block; text-align: right; margin-top: 15px;
      strong{ font-size: 24px; color: #c85040; display: block;}
      span{ font-size: 11px; color: #fff; display: block;}
    }
  }
}

body#sheet{
  #nav * { display: none;}
  #main{
    margin: -30px auto 0;
    width: 940px;
  }
}

.article #comments ul > li > a.button {
  /* Crazy town */
}

Lions Tigers & Bears

Separation

  • Structure from skin
  • Containers and content
#button {
	width: 200px;
	height: 50px;
	padding: 10px;
	border: solid 1px #ccc;
	background: linear-gradient(#ccc, #222);
	box-shadow: rgba(0, 0, 0, .5) 2px 2px 5px;
}

#box {
	width: 400px;
	overflow: hidden;
	border: solid 1px #ccc;
	background: linear-gradient(#ccc, #222);
	box-shadow: rgba(0, 0, 0, .5) 2px 2px 5px;
}

#widget {
	width: 500px;
	min-height: 200px;
	overflow: auto;
	border: solid 1px #ccc;
	background: linear-gradient(#ccc, #222);
	box-shadow: rgba(0, 0, 0, .5) 2px 2px 5px;
}
.button {
	width: 200px;
	height: 50px;
}

.box {
	width: 400px;
	overflow: hidden;
}

.widget {
	width: 500px;
	min-height: 200px;
	overflow: auto;
}

.skin {
	border: solid 1px #ccc;
	background: linear-gradient(#ccc, #222);
	box-shadow: rgba(0, 0, 0, .5) 2px 2px 5px;
}

Structure - Skin

OOCSS

By Krzysztof Jung

OOCSS

  • 1,087