Skip to content

Instantly share code, notes, and snippets.

@timhettler
Last active October 23, 2015 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhettler/d9f82ce355ace677611f to your computer and use it in GitHub Desktop.
Save timhettler/d9f82ce355ace677611f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="container">
<div class="fpo"></div>
<div class="fpo"></div>
<div class="fpo"></div>
</div>
// ----
// libsass (v3.2.5)
// ----
@mixin fpo() {
background-color: slategray;
position: relative;
&:before {
content: '';
display: block;
padding-bottom: 100%;
}
&:after {
content: 'FPO';
color: #fff;
font: 20px/1 Helvetica;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.fpo {
@include fpo();
width: 20%;
}
.container {
display: flex;
justify-content: space-around;
width: 100%;
}
.fpo {
background-color: slategray;
position: relative;
width: 20%;
}
.fpo:before {
content: '';
display: block;
padding-bottom: 100%;
}
.fpo:after {
content: 'FPO';
color: #fff;
font: 20px/1 Helvetica;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.container {
display: flex;
justify-content: space-around;
width: 100%;
}
<div class="container">
<div class="fpo"></div>
<div class="fpo"></div>
<div class="fpo"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment