Skip to content

Instantly share code, notes, and snippets.

@Rykian
Created April 15, 2014 19:57
Show Gist options
  • Save Rykian/10766209 to your computer and use it in GitHub Desktop.
Save Rykian/10766209 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="container1">
Container 1
</div>
<div id="container2">
Container 2
</div>
// ----
// Sass (v3.3.4)
// Compass (v)
// Breakpoint (v)
// Susy (v)
// ----
@import 'compass/reset';
@import 'susy';
@import 'breakpoint';
$susy: layout(960px 4 1/4 inside-static);
$computer: 900px;
$computer-columns: 12;
body {
@include container;
@include susy-breakpoint(800px, 8) {
@include container(8);
background: black;
}
@include susy-breakpoint($computer, $computer-columns) {
@include container($computer-columns);
background: grey;
}
#container1 {
background: blue;
@include span(4);
@include susy-breakpoint($computer, $computer-columns) {
@include span(3);
}
}
#container2 {
background: red;
@include span(4);
@include susy-breakpoint($computer, $computer-columns) {
@include span(9);
}
}
}
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: inherit;
font-size: 100%;
vertical-align: baseline;
}
html {
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, main, menu, nav, section, summary {
display: block;
}
body {
max-width: 960px;
margin-left: auto;
margin-right: auto;
}
body::after {
content: " ";
display: block;
clear: both;
}
@media (min-width: 800px) {
body {
max-width: 960px;
margin-left: auto;
margin-right: auto;
background: black;
}
body::after {
content: " ";
display: block;
clear: both;
}
}
@media (min-width: 900px) {
body {
max-width: 960px;
margin-left: auto;
margin-right: auto;
background: grey;
}
body::after {
content: " ";
display: block;
clear: both;
}
}
body #container1 {
background: blue;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
float: left;
padding-left: 2.5%;
padding-right: 2.5%;
}
@media (min-width: 900px) {
body #container1 {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 25%;
float: left;
padding-left: 0.8333333333%;
padding-right: 0.8333333333%;
}
}
body #container2 {
background: red;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
float: left;
padding-left: 2.5%;
padding-right: 2.5%;
}
@media (min-width: 900px) {
body #container2 {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 75%;
float: left;
padding-left: 0.8333333333%;
padding-right: 0.8333333333%;
}
}
<div id="container1">
Container 1
</div>
<div id="container2">
Container 2
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment