Skip to content

Instantly share code, notes, and snippets.

@maddesigns
Created March 2, 2014 21:23
Show Gist options
  • Save maddesigns/9314148 to your computer and use it in GitHub Desktop.
Save maddesigns/9314148 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div class="wrapperclass">
<span> 16:9 </span>
</div>
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// Toolkit (v2.0.0.alpha.10)
// ----
@import "toolkit";
@import "toolkit/kickstart";
.wrapperclass {
@include intrinsic-ratio(16/9, 33%);
background-color: red;
text-align: center;
color: white;
font-size: 15em;
margin: 0 auto;
span {
padding-top: 50px;
background-color: green;
}
}
*, *:before, *:after {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
img, video {
max-width: 100%;
height: auto;
}
.wrapperclass {
position: relative;
height: 0;
padding-top: 18.5625%;
width: 33%;
background-color: red;
text-align: center;
color: white;
font-size: 15em;
margin: 0 auto;
}
.wrapperclass > * {
display: block;
position: absolute;
width: 100% !important;
height: 100% !important;
top: 0;
margin: 0;
padding: 0;
}
.wrapperclass span {
padding-top: 50px;
background-color: green;
}
<div class="wrapperclass">
<span> 16:9 </span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment