aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-17 18:15:44 -0700
committerMark Otto <[email protected]>2012-09-17 18:15:44 -0700
commit26ca131a950398e0c3c447da01658939feb40df1 (patch)
tree027528656848e35d5764194ba6e083a75cf8244f /less
parentcaa79ed594daae704793a08e94a6e2d9da32eaf1 (diff)
parent143fef9f95daca088c1a910fccd07f2b520d8b0b (diff)
downloadbootstrap-26ca131a950398e0c3c447da01658939feb40df1.tar.xz
bootstrap-26ca131a950398e0c3c447da01658939feb40df1.zip
Merge branch 'wpbrains-media-component' into 2.1.2-wip
Diffstat (limited to 'less')
-rw-r--r--less/bootstrap.less1
-rw-r--r--less/media.less55
-rw-r--r--less/responsive-767px-max.less14
3 files changed, 70 insertions, 0 deletions
diff --git a/less/bootstrap.less b/less/bootstrap.less
index 3055c5cc4..a09708173 100644
--- a/less/bootstrap.less
+++ b/less/bootstrap.less
@@ -52,6 +52,7 @@
// Components: Misc
@import "thumbnails.less";
+@import "media.less";
@import "labels-badges.less";
@import "progress-bars.less";
@import "accordion.less";
diff --git a/less/media.less b/less/media.less
new file mode 100644
index 000000000..1decab71d
--- /dev/null
+++ b/less/media.less
@@ -0,0 +1,55 @@
+// Media objects
+// Source: http://stubbornella.org/content/?p=497
+// --------------------------------------------------
+
+
+// Common styles
+// -------------------------
+
+// Clear the floats
+.media,
+.media-body {
+ overflow: hidden;
+ *overflow: visible;
+ zoom: 1;
+}
+
+// Proper spacing between instances of .media
+.media,
+.media .media {
+ margin-top: 15px;
+}
+.media:first-child {
+ margin-top: 0;
+}
+
+// For images and videos, set to block
+.media-object {
+ display: block;
+}
+
+// Reset margins on headings for tighter default spacing
+.media-heading {
+ margin: 0 0 5px;
+}
+
+
+// Media image alignment
+// -------------------------
+
+.media .pull-left {
+ margin-right: 10px;
+}
+.media .pull-right {
+ margin-left: 10px;
+}
+
+
+// Media list variation
+// -------------------------
+
+// Undo default ul/ol styles
+.media-list {
+ margin-left: 0;
+ list-style: none;
+}
diff --git a/less/responsive-767px-max.less b/less/responsive-767px-max.less
index 6e4261047..5cd89e403 100644
--- a/less/responsive-767px-max.less
+++ b/less/responsive-767px-max.less
@@ -158,6 +158,20 @@
}
}
+ // Medias
+ // Reset float and spacing to stack
+ .media .pull-left,
+ .media .pull-right {
+ float: none;
+ display: block;
+ margin-bottom: 10px;
+ }
+ // Remove side margins since we stack instead of indent
+ .media-object {
+ margin-right: 0;
+ margin-left: 0;
+ }
+
// Modals
.modal {
top: 10px;