Skip to content

Instantly share code, notes, and snippets.

View hrallo's full-sized avatar

Hilary Rallo hrallo

View GitHub Profile
// aspect-ratio()
//
// Use on a container that you want to maintain a specific aspect ratio when scaling
//
// $width - in pixels
// $height - in pixels
@mixin aspect-ratio($width, $height) {
position: relative;
$colors: (
black: $black,
white: $white,
"gray-50": $gray-50,
"gray-100": $gray-100,
"gray-200": $gray-200,
"gray-300": $gray-300,
"gray-400": $gray-400,
"gray-500": $gray-500,
"gray-600": $gray-600,