diff options
1 files changed, 14 insertions, 3 deletions
| -rw-r--r-- | src/media.less | 17 |
diff --git a/src/media.less b/src/media.less index 02c7be5..fcd22e0 100644 --- a/src/media.less +++ b/src/media.less @@ -5,6 +5,17 @@ max-width: 100%; } +// object-fit support is coming to Microsoft Edge +// https://developer.microsoft.com/en-us/microsoft-edge/platform/status/objectfitandobjectposition/ +.img-fit-cover { + object-fit: cover; +} + +.img-fit-contain { + object-fit: contain; +} + +// Video responsive .video-responsive { display: block; overflow: hidden; @@ -15,7 +26,7 @@ &::before { content: ""; display: block; - padding-bottom: 56.25%; /* Default 16:9, you can calculate this value by dividing 9 by 16 */ + padding-bottom: 56.25%; // Default ratio 16:9, you can calculate this value by dividing 9 by 16 } iframe, @@ -38,13 +49,13 @@ .video-responsive-4-3 { &::before { - padding-bottom: 75%; /* 4:3 */ + padding-bottom: 75%; // Ratio 4:3 } } .video-responsive-1-1 { &::before { - padding-bottom: 100%; /* 1:1 */ + padding-bottom: 100%; // Ratio 1:1 } } |