aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-01-13 20:01:54 -0800
committerMark Otto <[email protected]>2014-01-13 20:01:54 -0800
commitf4dd6221d4e7a8eaa9cd8ebe0457ad016f5058cc (patch)
treec75b7a1c96df2d5095a61fc838aead93b5c27849 /less
parentdf70e8d8458b63ca813466c9d8d0fa3aa2b716ff (diff)
parent29e495f03cda05fd7fc362420ae86619c27b582e (diff)
downloadbootstrap-f4dd6221d4e7a8eaa9cd8ebe0457ad016f5058cc.tar.xz
bootstrap-f4dd6221d4e7a8eaa9cd8ebe0457ad016f5058cc.zip
Merge branch 'responsive-embed' of https://github.com/boulox/bootstrap into boulox-responsive-embed
Conflicts: dist/css/bootstrap.css.map dist/css/bootstrap.min.css
Diffstat (limited to 'less')
-rw-r--r--less/utilities.less36
1 files changed, 36 insertions, 0 deletions
diff --git a/less/utilities.less b/less/utilities.less
index a26031214..415d76a8a 100644
--- a/less/utilities.less
+++ b/less/utilities.less
@@ -54,3 +54,39 @@
.affix {
position: fixed;
}
+
+
+// Embeds responsive
+// -------------------------
+
+// Credit: Nicolas Gallagher
+
+.embed-responsive {
+ position: relative;
+ display: block;
+ height: 0;
+ padding: 0;
+ overflow: hidden;
+
+ .embed-responsive-item,
+ iframe,
+ embed,
+ object {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ height: 100%;
+ width: 100%;
+ }
+
+ // Modifier class for 16:9 aspect ratio
+ &.embed-responsive-16by9 {
+ padding-bottom: 56.25%;
+ }
+
+ // Modifier class for 4:3 aspect ratio
+ &.embed-responsive-4by3 {
+ padding-bottom: 75%;
+ }
+}