Skip to content

Instantly share code, notes, and snippets.

@neaf
Created July 7, 2010 10:01
Show Gist options
  • Save neaf/466518 to your computer and use it in GitHub Desktop.
Save neaf/466518 to your computer and use it in GitHub Desktop.
// Mixins and variables
@mixin clearfix {
&:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
* html & { height: 1px }
}
// Reset and default
html, body, div, span, object, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, samp, small, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
table { border-collapse: collapse; border-spacing: 0; }
th, td { vertical-align: top; }
th { text-align: left; }
li { list-style: none; }
hr { display: none; }
strong { font-weight: bold; }
em { font-style: italic; }
del { text-decoration: line-through; }
th { font-weight: normal; }
address, cite, dfn { font-style: normal; }
abbr, acronym { border-bottom: 1px dotted #999; cursor: help; }
input, textarea, select { font-family: Verdana, Arial, Helvetica, sans-serif; }
header, nav { display: block; }
// Basic and layout
body {
background: #1c1c1c;
color: #fff;
font: 62.5%/1.5 Verdana, Arial, Helvetica, sans-serif;
}
a, a:visited { color: #fff; text-decoration: none; }
a:hover, a:active { color: #fff; text-decoration: underline; }
#container {
width: 960px;
margin: 20px auto;
}
header.main {
position: relative;
height: 175px;
padding-left: 200px;
background: url('../images/logo.png') no-repeat left;
}
#logo {
position: absolute;
top: 50%;
margin-top: -0.9em;
font-size: 5em;
}
#user-controls {
position: absolute;
top: 0;
right: 0;
font-size: 1.2em;
li {
float: left;
a, span {
display: block;
margin-left: 30px;
padding-left: 30px;
height: 25px;
line-height: 25px;
background: no-repeat left;
}
&.login a, &.login span {
background-image: url("../images/ico_user.png");
}
&.login span a {
display: inline !important;
margin: 0;
padding: 0;
background: none;
}
&.cart a {
background-image: url("../images/ico_cart.png");
}
}
}
nav.main, nav.secondary {
ul { @include clearfix; }
}
nav.main {
margin-top: 20px;
text-transform: lowercase;
li {
float: left;
width: 160px;
text-align: center;
font-size: 1.6em;
}
a {
display: block;
padding: 20px 0;
background: url('../images/bg_nav_item.png') no-repeat;
&:hover {
background: #f07901 url('../images/bg_nav_item_active.png') no-repeat;
text-decoration: none;
}
}
.home a {
background-image: none;
}
}
nav.secondary {
margin-top: 20px;
border-bottom: 2px solid #f07901;
font-size: 2em;
text-align: center;
text-transform: lowercase;
li {
float: left;
margin-right: 30px;
&.last {
margin-right: 0;
}
}
a {
display: block;
width: 300px;
background: url('../images/bg_subnav_item.png') no-repeat right bottom;
text-decoration: none;
span {
display: block;
height: 49px;
line-height: 49px;
margin-right: 20px;
background: url('../images/bg_subnav_item.png') no-repeat bottom left;
text-indent: 10px;
}
&:hover {
background-position: right top;
span {
background-position: left top;
}
}
}
}
// Content
section.main {
font-size: 1.2em;
}
// Pages
body.videos-index {
ul.videos {
margin-top: 20px;
li {
@include clearfix;
width: 460px;
margin-bottom: 30px;
padding-top: 30px;
border-top: 1px solid #666;
&.odd {
clear: both;
float: left;
}
&.even {
float: right;
}
&.no-border {
padding-top: 0;
border: none;
}
}
.details {
float: left;
width: 210px;
}
.description {
float: right;
width: 240px;
}
a.img {
display: block;
margin-bottom: 10px;
padding: 4px;
background: #666;
img {
display: block;
border: 1px solid #333;
}
}
.applications li {
float: left;
margin: 0 10px 0 0;
padding: 0;
height: 32px;
width: 32px;
border: none;
img { display: block; }
}
a.price {
float: right;
padding-left: 10px;
background: url('../images/bg_price_link.png') no-repeat left top;
font-size: 0.83em;
font-weight: bold;
text-shadow: 1px 1px 1px #000;
text-decoration: none;
span {
display: block;
padding-right: 10px;
height: 26px;
line-height: 26px;
background: url('../images/bg_price_link.png') no-repeat right top;
}
.tooltip {
display: none;
overflow: hidden;
position: absolute;
top: 0;
left: 0;
padding: 0 0 0 6px;
width: 94px;
height: 37px;
line-height: 36px;
background: url(../images/bg_tooltip.png) no-repeat;
font-size: 1.1em;
font-weight: bold;
text-align: center;
text-transform: uppercase;
z-index: 3;
}
}
h2 {
font-size: 1.5em;
}
p {
margin-top: 1.3em;
}
}
}
body.pages-home {
ul.disciplines {
margin-top: 30px;
li {
float: left;
width: 320px;
font-size: 2em;
text-align: center;
text-transform: lowercase;
a {
display: block;
padding: 30px 0;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment