Skip to content

Instantly share code, notes, and snippets.

@mloberg
Created January 17, 2012 19:11
Show Gist options
  • Save mloberg/1628239 to your computer and use it in GitHub Desktop.
Save mloberg/1628239 to your computer and use it in GitHub Desktop.
Responsive Grid
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}
q, blockquote {
quotes: none;
}
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}
a img {
border: none;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.clear {
clear: both;
}
.hide {
display: none;
}
.show {
display: block;
}
hr {
border: 0;
border-bottom: 1px solid #eee;
margin: 20px 0 19px;
}
/*
TYPEFACE
*/
body {
background-color: #fff;
color: #404040;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: normal;
line-height: 18px;
}
a {
color: #0069d6;
font-weight: inherit;
line-height: inherit;
text-decoration: none;
}
a:hover {
color: #00438a;
text-decoration: underline;
}
p {
margin-bottom: 9px;
}
p small {
color: #bfbfbf;
font-size: 11px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
line-height: 36px;
}
h1 small, h2 small, h3 small, h4 small, h5 small, h6 small {
color: #bfbfbf;
}
h1 {
font-size: 30px;
margin-bottom: 18px;
}
h1 small {
font-size: 18px;
}
h2 {
font-size: 24px;
}
h2 small {
font-size: 14px;
}
h3 {
font-size: 18px;
}
h3 small {
font-size: 14px;
}
h4 {
font-size: 16px;
}
h4 small {
font-size: 12px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
strong {
font-style: inherit;
font-weight: bold;
}
em {
font-style: italic;
font-weight: inherit;
line-height: inherit;
}
/*
LISTS
*/
ul, ol {
margin: 0 0 18px 25px;
}
ul ul, ul ol, ol ul, ol ol {
margin-bottom: 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
}
li {
line-height: 18px;
color: #808080;
}
ul.unstyled {
list-style: none;
margin-left: 0;
}
/*
BLOCKS
*/
blockquote {
margin-bottom: 18px;
border-left: 5px solid #eee;
padding-left: 15px;
}
blockquote p {
font-size: 14px;
font-weight: 300;
margin-bottom: 0;
}
blockquote small {
color: #bfbfbf;
display: block;
font-size: 12px;
font-weight: 300;
}
blockquote small:before {
content: '\2014 \00A0';
}
code, pre {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-ms-border-radius: 3px;
-khtml-border-radius: 3px;
border-radius: 3px;
font-family: Monaco, "Andale Mono", "Courier New", monospace;
font-size: 12px;
padding: 0 3px 2px;
}
code {
color: #000;
color: rgba(0, 0, 0, 0.75);
}
pre {
background-color: #f5f5f5;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.15);
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-ms-border-radius: 3px;
-khtml-border-radius: 3px;
border-radius: 3px;
display: block;
font-size: 12px;
margin: 0 0 18px;
padding: 8.5px;
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
GRID
*/
.container {
margin: 0 auto;
padding: 0 20px;
zoom: 1;
}
.container:before, .container:after {
content: "";
display: table;
zoom: 1;
}
.container:after {
clear: both;
}
.row {
zoom: 1;
}
.row:before, .row:after {
content: "";
display: table;
zoom: 1;
}
.row:after {
clear: both;
}
.row > [class*="span"] {
display: inline;
float: left;
margin: 5px 1%;
}
.span1 {
width: 6.33%;
}
.span2 {
width: 14.66%;
}
.span3 {
width: 23%;
}
.span4 {
width: 31.33%;
}
.span5 {
width: 39.66%;
}
.span6 {
width: 48%;
}
.span7 {
width: 56.33%;
}
.span8 {
width: 64.66%;
}
.span9 {
width: 73%;
}
.span10 {
width: 81.33%;
}
.span11 {
width: 89.66%;
}
.span12 {
width: 98%;
}
.row > .offset1 {
margin-left: 9.33%;
}
.row > .offset2 {
margin-left: 17.66%;
}
.row > .offset3 {
margin-left: 26%;
}
.row > .offset4 {
margin-left: 34.33%;
}
.row > .offset5 {
margin-left: 42.66%;
}
.row > .offset6 {
margin-left: 51%;
}
.row > .offset7 {
margin-left: 59.33%;
}
.row > .offset8 {
margin-left: 67.66%;
}
.row > .offset9 {
margin-left: 76%;
}
.row > .offset10 {
margin-left: 84.33%;
}
.row > .offset11 {
margin-left: 92.66%;
}
img, embed, object, video {
max-width: 100%;
}
@media screen and (max-width:767px) {
.row > [class*="span"] {
display: block;
clear: both;
float: none;
width: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment