<div class="column-container">
<div class="column light">
<p>$light-gray: lighten($gray, 5%)</p>
<p>#d9d9d9</p>
</div>
<div class="column">
<p>$gray</p>
<p>#ccc</p>
</div>
<div class="column dark">
<p>$dark-gray: darken($gray, 5%)</p>
<p>#bfbfbf</p>
</div>
</div>
$gray: #ccc;
$light-gray: lighten($gray, 5%);
$dark-gray: darken($gray, 5%);
.column-container {
width: 100%;
height: 100%;
}
.column {
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
width: 100%;
height: 33.33%;
background-color: $gray;
&.light {
background-color: $light-gray;
}
&.dark {
background-color: $dark-gray;
}
p {
text-align: center;
font-size: 1rem;
line-height: .8em;
font-weight: normal;
color: lighten(black, 25%);
&:last-child {
font-style: normal;
font-style: italic;
font-size: 2rem;
font-weight: bold;
}
}
}
@media screen and (min-width: 768px) {
.column {
width: 33.33%;
height: 100%;
&:last-child {
font-size: 2.5rem;
}
}
}
View Compiled
This Pen doesn't use any external JavaScript resources.