Summary Files Commits Branches @commit @diff @stats
path: root / src / media.less
diff options
context:
space:
mode:
Commit135ea0010024826b090789f4dcab8af8e85ecfc6 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-01-24 19:01:19 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-01-24 19:01:19 +0800
Files820e71e55afba5948249cec4ea13ad4115f1eeac /src/media.less
Spectre-Dark-Gruvbox-135ea0010024826b090789f4dcab8af8e85ecfc6.tar
Spectre-Dark-Gruvbox-135ea0010024826b090789f4dcab8af8e85ecfc6.tar.gz
Spectre-Dark-Gruvbox-135ea0010024826b090789f4dcab8af8e85ecfc6.zip
Parentbdc68333d66fca64db3f65a790a11de2d15db958 (diff)
CHG: Improve media, docs, Asian typography and examples
1 files changed, 20 insertions, 4 deletions
-rw-r--r--src/media.less24
diff --git a/src/media.less b/src/media.less
index d4d2f89..1072304 100644
--- a/src/media.less
+++ b/src/media.less
@@ -6,18 +6,26 @@
}
.video-responsive {
- height: 0;
+ display: block;
overflow: hidden;
- padding-bottom: 56.25%; /* Default 16:9, you can calculate this value by dividing 9 by 16 */
- padding-top: 3rem;
+ padding: 0;
position: relative;
+ width: 100%;
+
+ &::before {
+ content: "";
+ display: block;
+ padding-bottom: 56.25%; /* Default 16:9, you can calculate this value by dividing 9 by 16 */
+ }
iframe,
object,
embed {
+ bottom: 0;
height: 100%;
left: 0;
position: absolute;
+ right: 0;
top: 0;
width: 100%;
}
@@ -29,7 +37,15 @@
}
.video-responsive-4-3 {
- padding-bottom: 75%; /* 4:3 */
+ &::before {
+ padding-bottom: 75%; /* 4:3 */
+ }
+}
+
+.video-responsive-1-1 {
+ &::before {
+ padding-bottom: 100%; /* 1:1 */
+ }
}
.figure {