Last active
September 12, 2017 20:27
-
-
Save castastrophe/eb22d8dca826fdb9225836ee4d40a0d4 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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
> 1% | |
last 2 versions |
This file contains 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="container"> | |
<div class="box">1</div> | |
<div class="box">2</div> | |
<div class="box">3</div> | |
<div class="box">4</div> | |
<div class="box">5</div> | |
<div class="box">6</div> | |
<div class="box">7</div> | |
</div> |
This file contains 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.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
.container { | |
display: grid; | |
grid-template-columns: repeat(6, 1fr); | |
grid-gap: 10px; | |
> * { | |
&:not(:nth-child(n+3)) { | |
grid-column: span 3; | |
color: red; | |
} | |
&:nth-child(n+3) { | |
grid-column: span 2; | |
color: blue; | |
} | |
} | |
} | |
.box { | |
min-width: 200px; | |
min-height: 100px; | |
background: lightgray; | |
font-size: 2em; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} |
This file contains 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
.container { | |
display: grid; | |
grid-template-columns: repeat(6, 1fr); | |
grid-gap: 10px; | |
} | |
.container > *:not(:nth-child(n+3)) { | |
grid-column: span 3; | |
color: red; | |
} | |
.container > *:nth-child(n+3) { | |
grid-column: span 2; | |
color: blue; | |
} | |
.box { | |
min-width: 200px; | |
min-height: 100px; | |
background: lightgray; | |
font-size: 2em; | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: -ms-flexbox; | |
display: flex; | |
-webkit-box-align: center; | |
-webkit-align-items: center; | |
-ms-flex-align: center; | |
align-items: center; | |
-webkit-box-pack: center; | |
-webkit-justify-content: center; | |
-ms-flex-pack: center; | |
justify-content: center; | |
} |
This file contains 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="container"> | |
<div class="box">1</div> | |
<div class="box">2</div> | |
<div class="box">3</div> | |
<div class="box">4</div> | |
<div class="box">5</div> | |
<div class="box">6</div> | |
<div class="box">7</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment