Skip to content

Instantly share code, notes, and snippets.

@badri
Created March 26, 2014 01:21
Show Gist options
  • Save badri/9775157 to your computer and use it in GitHub Desktop.
Save badri/9775157 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="page">
<div class="right">
<h2> right, fixed</h2>
</div>
<div class="left">
<h2> left, scrollable</h2>
</div>
</div>
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// Breakpoint (v2.4.2)
// Susy (v2.1.1)
// ----
@import "compass";
@import "breakpoint";
@import "susyone";
$c1: #fae7b3;
$c2: #ea9fc3;
$c3: #ee9e9c;
$c4: #71dad2;
$c5: #eeddf7;
$c6: #eee;
$total-columns: 12;
$column-width: 80px;
$gutter-width: 5px;
$grid-padding: 0px;
$container-style: fluid;
$media-narrow: max-width 600px;
@include border-box-sizing;
#page {
@include container;
@include susy-grid-background;
}
div.left {
background-color: $c1;
height: 1000px;
min-width: 600px;
@include span-columns(8, 12);
@include breakpoint($media-narrow) {
position: relative;
left: 0;
margin: 0;
padding:0;
}
}
div.right {
background-color: $c2;
position: fixed;
min-width: 600px;
left: 30px;
right: 0px;
@include isolate(9, 12);
@include span-columns(4 omega, 12);
@include breakpoint($media-narrow) {
left: 10px;
position: relative;
}
}
h2 {
text-align: center;
font-size: 1rem;
font-weight: bold;
padding-top: 1.8rem;
padding-bottom: 1.8rem;
text-transform: uppercase;
}
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#page {
*zoom: 1;
padding-left: 0px;
padding-left: 0rem;
padding-right: 0px;
padding-right: 0rem;
margin-left: auto;
margin-right: auto;
background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(121, 121, 229, 0.25) 0%, rgba(79, 79, 221, 0.25) 7.88177%, rgba(0, 0, 0, 0) 7.88177%, rgba(0, 0, 0, 0) 8.37438%, rgba(121, 121, 229, 0.25) 8.37438%, rgba(79, 79, 221, 0.25) 16.25616%, rgba(0, 0, 0, 0) 16.25616%, rgba(0, 0, 0, 0) 16.74877%, rgba(121, 121, 229, 0.25) 16.74877%, rgba(79, 79, 221, 0.25) 24.63054%, rgba(0, 0, 0, 0) 24.63054%, rgba(0, 0, 0, 0) 25.12315%, rgba(121, 121, 229, 0.25) 25.12315%, rgba(79, 79, 221, 0.25) 33.00493%, rgba(0, 0, 0, 0) 33.00493%, rgba(0, 0, 0, 0) 33.49754%, rgba(121, 121, 229, 0.25) 33.49754%, rgba(79, 79, 221, 0.25) 41.37931%, rgba(0, 0, 0, 0) 41.37931%, rgba(0, 0, 0, 0) 41.87192%, rgba(121, 121, 229, 0.25) 41.87192%, rgba(79, 79, 221, 0.25) 49.75369%, rgba(0, 0, 0, 0) 49.75369%, rgba(0, 0, 0, 0) 50.24631%, rgba(121, 121, 229, 0.25) 50.24631%, rgba(79, 79, 221, 0.25) 58.12808%, rgba(0, 0, 0, 0) 58.12808%, rgba(0, 0, 0, 0) 58.62069%, rgba(121, 121, 229, 0.25) 58.62069%, rgba(79, 79, 221, 0.25) 66.50246%, rgba(0, 0, 0, 0) 66.50246%, rgba(0, 0, 0, 0) 66.99507%, rgba(121, 121, 229, 0.25) 66.99507%, rgba(79, 79, 221, 0.25) 74.87685%, rgba(0, 0, 0, 0) 74.87685%, rgba(0, 0, 0, 0) 75.36946%, rgba(121, 121, 229, 0.25) 75.36946%, rgba(79, 79, 221, 0.25) 83.25123%, rgba(0, 0, 0, 0) 83.25123%, rgba(0, 0, 0, 0) 83.74384%, rgba(121, 121, 229, 0.25) 83.74384%, rgba(79, 79, 221, 0.25) 91.62562%, rgba(0, 0, 0, 0) 91.62562%, rgba(0, 0, 0, 0) 92.11823%, rgba(121, 121, 229, 0.25) 92.11823%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%);
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(121, 121, 229, 0.25) 0%, rgba(79, 79, 221, 0.25) 7.88177%, rgba(0, 0, 0, 0) 7.88177%, rgba(0, 0, 0, 0) 8.37438%, rgba(121, 121, 229, 0.25) 8.37438%, rgba(79, 79, 221, 0.25) 16.25616%, rgba(0, 0, 0, 0) 16.25616%, rgba(0, 0, 0, 0) 16.74877%, rgba(121, 121, 229, 0.25) 16.74877%, rgba(79, 79, 221, 0.25) 24.63054%, rgba(0, 0, 0, 0) 24.63054%, rgba(0, 0, 0, 0) 25.12315%, rgba(121, 121, 229, 0.25) 25.12315%, rgba(79, 79, 221, 0.25) 33.00493%, rgba(0, 0, 0, 0) 33.00493%, rgba(0, 0, 0, 0) 33.49754%, rgba(121, 121, 229, 0.25) 33.49754%, rgba(79, 79, 221, 0.25) 41.37931%, rgba(0, 0, 0, 0) 41.37931%, rgba(0, 0, 0, 0) 41.87192%, rgba(121, 121, 229, 0.25) 41.87192%, rgba(79, 79, 221, 0.25) 49.75369%, rgba(0, 0, 0, 0) 49.75369%, rgba(0, 0, 0, 0) 50.24631%, rgba(121, 121, 229, 0.25) 50.24631%, rgba(79, 79, 221, 0.25) 58.12808%, rgba(0, 0, 0, 0) 58.12808%, rgba(0, 0, 0, 0) 58.62069%, rgba(121, 121, 229, 0.25) 58.62069%, rgba(79, 79, 221, 0.25) 66.50246%, rgba(0, 0, 0, 0) 66.50246%, rgba(0, 0, 0, 0) 66.99507%, rgba(121, 121, 229, 0.25) 66.99507%, rgba(79, 79, 221, 0.25) 74.87685%, rgba(0, 0, 0, 0) 74.87685%, rgba(0, 0, 0, 0) 75.36946%, rgba(121, 121, 229, 0.25) 75.36946%, rgba(79, 79, 221, 0.25) 83.25123%, rgba(0, 0, 0, 0) 83.25123%, rgba(0, 0, 0, 0) 83.74384%, rgba(121, 121, 229, 0.25) 83.74384%, rgba(79, 79, 221, 0.25) 91.62562%, rgba(0, 0, 0, 0) 91.62562%, rgba(0, 0, 0, 0) 92.11823%, rgba(121, 121, 229, 0.25) 92.11823%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%);
background-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(121, 121, 229, 0.25) 0%, rgba(79, 79, 221, 0.25) 7.88177%, rgba(0, 0, 0, 0) 7.88177%, rgba(0, 0, 0, 0) 8.37438%, rgba(121, 121, 229, 0.25) 8.37438%, rgba(79, 79, 221, 0.25) 16.25616%, rgba(0, 0, 0, 0) 16.25616%, rgba(0, 0, 0, 0) 16.74877%, rgba(121, 121, 229, 0.25) 16.74877%, rgba(79, 79, 221, 0.25) 24.63054%, rgba(0, 0, 0, 0) 24.63054%, rgba(0, 0, 0, 0) 25.12315%, rgba(121, 121, 229, 0.25) 25.12315%, rgba(79, 79, 221, 0.25) 33.00493%, rgba(0, 0, 0, 0) 33.00493%, rgba(0, 0, 0, 0) 33.49754%, rgba(121, 121, 229, 0.25) 33.49754%, rgba(79, 79, 221, 0.25) 41.37931%, rgba(0, 0, 0, 0) 41.37931%, rgba(0, 0, 0, 0) 41.87192%, rgba(121, 121, 229, 0.25) 41.87192%, rgba(79, 79, 221, 0.25) 49.75369%, rgba(0, 0, 0, 0) 49.75369%, rgba(0, 0, 0, 0) 50.24631%, rgba(121, 121, 229, 0.25) 50.24631%, rgba(79, 79, 221, 0.25) 58.12808%, rgba(0, 0, 0, 0) 58.12808%, rgba(0, 0, 0, 0) 58.62069%, rgba(121, 121, 229, 0.25) 58.62069%, rgba(79, 79, 221, 0.25) 66.50246%, rgba(0, 0, 0, 0) 66.50246%, rgba(0, 0, 0, 0) 66.99507%, rgba(121, 121, 229, 0.25) 66.99507%, rgba(79, 79, 221, 0.25) 74.87685%, rgba(0, 0, 0, 0) 74.87685%, rgba(0, 0, 0, 0) 75.36946%, rgba(121, 121, 229, 0.25) 75.36946%, rgba(79, 79, 221, 0.25) 83.25123%, rgba(0, 0, 0, 0) 83.25123%, rgba(0, 0, 0, 0) 83.74384%, rgba(121, 121, 229, 0.25) 83.74384%, rgba(79, 79, 221, 0.25) 91.62562%, rgba(0, 0, 0, 0) 91.62562%, rgba(0, 0, 0, 0) 92.11823%, rgba(121, 121, 229, 0.25) 92.11823%, rgba(79, 79, 221, 0.25) 100%, rgba(0, 0, 0, 0) 100%, rgba(0, 0, 0, 0) 100%);
background-position: left top;
-moz-background-origin: content;
-o-background-origin: content-box;
-webkit-background-origin: content;
background-origin: content-box;
-moz-background-clip: content;
-o-background-clip: content-box;
-webkit-background-clip: content;
background-clip: content-box;
}
#page:after {
content: "";
display: table;
clear: both;
}
div.left {
background-color: #fae7b3;
height: 1000px;
min-width: 600px;
width: 66.50246%;
float: left;
margin-right: 0.49261%;
display: inline;
}
@media (max-width: 600px) {
div.left {
position: relative;
left: 0;
margin: 0;
padding: 0;
}
}
div.right {
background-color: #ea9fc3;
position: fixed;
min-width: 600px;
left: 30px;
right: 0px;
margin-right: -100%;
margin-left: 66.99507%;
width: 33.00493%;
float: right;
margin-right: 0;
*margin-left: -5px;
display: inline;
}
@media (max-width: 600px) {
div.right {
left: 10px;
position: relative;
}
}
h2 {
text-align: center;
font-size: 1rem;
font-weight: bold;
padding-top: 1.8rem;
padding-bottom: 1.8rem;
text-transform: uppercase;
}
<div id="page">
<div class="right">
<h2> right, fixed</h2>
</div>
<div class="left">
<h2> left, scrollable</h2>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment