From 919b4ccb15209d47f7cc3f740654b0bcd5cf1870 Mon Sep 17 00:00:00 2001 From: Nicole Sullivan Date: Tue, 14 Oct 2014 17:09:57 -0400 Subject: Fixes #14799: Add vertical alignment of image in media component Signed-off-by: Jenn Dodd --- less/media.less | 67 ++++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 37 deletions(-) (limited to 'less') 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 // ------------------------- -- cgit v1.2.3