Summary Files Commits Branches @commit @diff @stats
path: root / src / media.less
diff options
context:
space:
mode:
Commit8784804ed7aaa3ffc563c02499935cfbf3344848 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-04-05 13:27:15 +0800
Committer
 GitHub <noreply@github.com>
2017-04-05 13:27:15 +0800
Files2ee411f6c0c81c12211ebe5cce3ed488e55d6be3 /src/media.less
Spectre-Dark-Gruvbox-0.2.12.tar
Spectre-Dark-Gruvbox-0.2.12.tar.gz
Spectre-Dark-Gruvbox-0.2.12.zip
Parentc4baa9b63a835edcbc1053e320bdec9902de0961 (diff)
Parent9a7c233bd93d55bace2174651c42d9d26eeccd38 (diff)
Merge pull request #180 from picturepan2/feature/0.2.12 v0.2.12
Feature/0.2.12
1 files changed, 14 insertions, 3 deletions
-rw-r--r--src/media.less17
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
}
}