Created
August 30, 2018 17:56
-
-
Save mrtag23/0f0a472a888521f1c06548002c1a9887 to your computer and use it in GitHub Desktop.
Creates intrinsic ratio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use this for creating scalable elements (usually images / background images) that maintain a ratio. | |
// USAGE: @include responsive-ratio(16,9); | |
@mixin responsive-ratio($x,$y) { | |
height: 0; | |
padding-bottom: percentage($y / $x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment