Summary Files Commits Branches @commit @diff @stats
path: root / src / media.less
diff options
context:
space:
mode:
Commit48f0d7e0e6d6d6569dbf98dd56091466520ae206 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-01-25 18:45:24 +0800
Committer
 GitHub <noreply@github.com>
2017-01-25 18:45:24 +0800
Files62c5f08d27a6ba1b87782e0433dcf9559d37ed94 /src/media.less
Spectre-Dark-Gruvbox-0.1.32.tar
Spectre-Dark-Gruvbox-0.1.32.tar.gz
Spectre-Dark-Gruvbox-0.1.32.zip
Parenta5076e547192bf098ddde4049c31cfd4c899ff01 (diff)
Parentf87896f812b712f730bddd304cead9aa8090d21a (diff)
Merge pull request #136 from picturepan2/hotfix/fixes v0.1.32
Hotfix/fixes
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 {