Skip to content

Instantly share code, notes, and snippets.

@steveebenezer
Created November 21, 2018 13:23
Show Gist options
  • Select an option

  • Save steveebenezer/9ef7f22651b0ea5473ac81f273890c43 to your computer and use it in GitHub Desktop.

Select an option

Save steveebenezer/9ef7f22651b0ea5473ac81f273890c43 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
:root {--width: 800px;}
.container {
max-width: var(--width);
background-color: ghostwhite;
margin: 0 auto;
}
.row {display: flex;}
.flex-column {flex-direction: column;}
.container > .row:first-child > div {
background-color: lightblue;
border: 1px solid red;
height: 100px;
width: calc(var(--width)/5)
}
.container > .row:nth-child(2) > .row:nth-child(2n+1) > div {
background-color: lightgreen;
border: 1px solid green;
height: 100px;
width: calc(var(--width) / 8.4);
}
.container > .row:nth-child(2) > .row:nth-child(2) > div {
background-color: beige;
border: 1px solid green;
height: 200px;
width: calc(var(--width)/4);
}
.container > .row:nth-child(3) > div {
background-color: blue;
border: 1px solid red;
height: 100px;
width: calc(var(--width)/4);
}
<!-- content to be placed inside <body>…</body> -->
<div class="container">
<div class="row">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="row">
<div class="row flex-column">
<div></div>
<div></div>
</div>
<div class="row">
<div></div>
<div></div>
<div></div>
</div>
<div class="row flex-column">
<div></div>
<div></div>
</div>
</div>
<div class="row">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment