diff options
| author | Nicole Sullivan <[email protected]> | 2014-10-14 17:09:57 -0400 |
|---|---|---|
| committer | Jenn Dodd <[email protected]> | 2014-10-23 18:48:18 -0400 |
| commit | 919b4ccb15209d47f7cc3f740654b0bcd5cf1870 (patch) | |
| tree | 09785574ad3e3d951c48fd7ddcf9ffdb39e80ba0 /less | |
| parent | 3bea2a45ef036b87dbf1a73897f471c46dab1f35 (diff) | |
| download | bootstrap-919b4ccb15209d47f7cc3f740654b0bcd5cf1870.tar.xz bootstrap-919b4ccb15209d47f7cc3f740654b0bcd5cf1870.zip | |
Fixes #14799: Add vertical alignment of image in media component
Signed-off-by: Jenn Dodd <[email protected]>
Diffstat (limited to 'less')
| -rw-r--r-- | less/media.less | 67 |
1 files changed, 30 insertions, 37 deletions
diff --git a/less/media.less b/less/media.less index 5ad22cd6d..eee1c78f3 100644 --- a/less/media.less +++ b/less/media.less @@ -1,50 +1,43 @@ -// Media objects -// Source: http://stubbornella.org/content/?p=497 -// -------------------------------------------------- - - -// Common styles -// ------------------------- - -// Clear the floats -.media, -.media-body { - overflow: hidden; - zoom: 1; -} - -// Proper spacing between instances of .media -.media, -.media .media { +.media { + // Proper spacing between instances of .media margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -// For images and videos, set to block -.media-object { - display: block; -} + // Proper spacing of .media-right + .media-right, + .pull-right { + padding-left: 10px; + } -// Reset margins on headings for tighter default spacing -.media-heading { - margin: 0 0 5px; -} + // Proper spacing of .media-left + .media-left, + .pull-left { + padding-right: 10px; + } + &:first-child { + margin-top: 0; + } -// Media image alignment -// ------------------------- + .media-left, + .media-right, + .media-body { + display: table-cell; + vertical-align: top; + } -.media { - > .pull-left { - margin-right: 10px; + .media-middle { + vertical-align: middle; } - > .pull-right { - margin-left: 10px; + + .media-bottom { + vertical-align: bottom; } } +// Reset margins on headings for tighter default spacing +.media-heading { + margin: 0 0 5px 0; +} // Media list variation // ------------------------- |
