0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

flex variation for media

This commit is contained in:
Mark Otto 2015-04-27 01:50:38 -07:00
parent 391b62f968
commit 15692d5e5b

View File

@ -2,29 +2,58 @@
// Media // Media
// -------------------------------------------------- // --------------------------------------------------
@if $enable-flex {
.media {
display: flex;
margin-bottom: $spacer;
}
.media-body {
flex: 1;
}
} @else {
.media { .media {
// Proper spacing between instances of .media
margin-top: 15px; margin-top: 15px;
&:first-child { &:first-child {
margin-top: 0; margin-top: 0;
} }
} }
.media, .media,
.media-body { .media-body {
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
} }
.media-body { .media-body {
width: 10000px; width: 10000px;
} }
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
}
//
// Images/elements as the media anchor
//
.media-object { .media-object {
display: block; display: block;
} }
//
// Alignment
//
.media-right, .media-right,
.media > .pull-right { .media > .pull-right {
padding-left: 10px; padding-left: 10px;
@ -35,30 +64,21 @@
padding-right: 10px; padding-right: 10px;
} }
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle { //
vertical-align: middle; // Headings
} //
.media-bottom {
vertical-align: bottom;
}
// Reset margins on headings for tighter default spacing
.media-heading { .media-heading {
margin-top: 0; margin-top: 0;
margin-bottom: 5px; margin-bottom: 5px;
} }
//
// Media list variation // Media list variation
// //
// Undo default ul/ol styles
.media-list { .media-list {
padding-left: 0; padding-left: 0;
list-style: none; list-style: none;