Created
June 13, 2018 09:17
-
-
Save graham73may/e49af20ddfb12b8b3ad3168e09aeaa7a to your computer and use it in GitHub Desktop.
e.g. to achieve responsive 16:9 images
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
&__image { | |
background-color : red; | |
position : relative; | |
overflow : hidden; | |
width : 100%; | |
// Top Image (custom ratio image - closer to 4:3 than 16:9) | |
&:before { | |
display : block; | |
content : ""; | |
padding-top : 61.25%; | |
width : 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment