Last active
August 29, 2015 14:04
-
-
Save andreimoment/2a734aa4a0e99b2866e9 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="parent"> | |
<div class="child"> | |
<p>child 1</p> | |
<div class="grandchild">Grandchild 1</div> | |
<div class="grandchild last">Grandchild 2</div> | |
</div> | |
<div class="child last">child 2</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.12) | |
// Compass (v1.0.0.alpha.21) | |
// Susy (v2.1.3) | |
// ---- | |
@import "compass"; | |
@import "susy"; | |
*, *:before, *:after { | |
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; | |
} | |
$susy: ( | |
columns: 12, | |
column-width: 4em, | |
gutters: 1/4, | |
math: fluid, | |
output: float, | |
gutter-position:inside, | |
global-box-sizing: border-box, | |
debug: ( | |
image: show, | |
color: rgba(200,100,100,.3), | |
output: overlay, | |
toggle: top right, | |
), | |
); | |
.parent { | |
@include container(); | |
@include show-grid(background); | |
padding:0; | |
@include clearfix; | |
} | |
.child { | |
background-color: rgba(100,100,200, 0.5); | |
@include span(first 6 of 12); | |
&.last { | |
@include span(last 6 of 12); | |
} | |
} | |
.grandchild { | |
background-color: rgba(100,100,200, 0.5); | |
@include span(first 3 of 6); | |
&.last { | |
@include span(last 3 of 6); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.parent { | |
max-width: 60em; | |
margin-left: auto; | |
margin-right: auto; | |
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJz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nPiA='); | |
background-size: 100%; | |
background-image: -moz-linear-gradient(left, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), -moz-linear-gradient(top, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-image: -webkit-linear-gradient(left, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-image: linear-gradient(to right, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-size: 8.33333%, 100% 24px; | |
background-origin: content-box, border-box; | |
background-clip: content-box, border-box; | |
background-position: left top; | |
padding: 0; | |
overflow: hidden; | |
*zoom: 1; | |
} | |
.parent:after { | |
content: " "; | |
display: block; | |
clear: both; | |
} | |
head { | |
display: block; | |
position: fixed; | |
right: 10px; | |
top: 10px; | |
z-index: 999; | |
color: #333; | |
background: rgba(255, 255, 255, 0.25); | |
} | |
head:before { | |
content: "|||"; | |
display: block; | |
padding: 5px 10px; | |
font-family: sans-serif; | |
font-size: 16px; | |
font-weight: bold; | |
} | |
head:hover { | |
background: rgba(255, 255, 255, 0.5); | |
color: red; | |
} | |
head:hover ~ .parent, head:hover ~ body .parent { | |
position: relative; | |
} | |
head:hover ~ .parent:before, head:hover ~ body .parent:before { | |
position: absolute; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
content: " "; | |
z-index: 998; | |
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2M4NjQ2NCIgc3RvcC1vcGFjaXR5PSIwLjMiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkYzljOWMiIHN0b3Atb3BhY2l0eT0iMC4zIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'), url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAuNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); | |
background-size: 100%; | |
background-image: -moz-linear-gradient(left, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), -moz-linear-gradient(top, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-image: -webkit-linear-gradient(left, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-image: linear-gradient(to right, rgba(200, 100, 100, 0.3), rgba(220, 156, 156, 0.3)), linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 1px, rgba(0, 0, 0, 0) 1px); | |
background-size: 8.33333%, 100% 24px; | |
background-origin: content-box, border-box; | |
background-clip: content-box, border-box; | |
background-position: left top; | |
} | |
.child { | |
background-color: rgba(100, 100, 200, 0.5); | |
width: 50%; | |
float: left; | |
padding-left: 0.83333%; | |
padding-right: 0.83333%; | |
} | |
.child.last { | |
width: 50%; | |
float: right; | |
padding-left: 0.83333%; | |
padding-right: 0.83333%; | |
} | |
.grandchild { | |
background-color: rgba(100, 100, 200, 0.5); | |
width: 50%; | |
float: left; | |
padding-left: 1.66667%; | |
padding-right: 1.66667%; | |
} | |
.grandchild.last { | |
width: 50%; | |
float: right; | |
padding-left: 1.66667%; | |
padding-right: 1.66667%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="parent"> | |
<div class="child"> | |
<p>child 1</p> | |
<div class="grandchild">Grandchild 1</div> | |
<div class="grandchild last">Grandchild 2</div> | |
</div> | |
<div class="child last">child 2</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment