diff options
Diffstat (limited to 'less')
| -rw-r--r-- | less/scaffolding.less | 10 | ||||
| -rw-r--r-- | less/thumbnails.less | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/less/scaffolding.less b/less/scaffolding.less index e74a4db1c..79447c3f5 100644 --- a/less/scaffolding.less +++ b/less/scaffolding.less @@ -59,12 +59,14 @@ a:focus { // ------------------------- img { - // Responsive images (ensure images don't scale beyond their parents) + vertical-align: middle; +} + +// Responsive images (ensure images don't scale beyond their parents) +.img-responsive { + display: block; max-width: 100%; // Part 1: Set a maximum relative to the parent height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching - - // Match vertical alignment with other comment elements - vertical-align: middle; } // Rounded corners diff --git a/less/thumbnails.less b/less/thumbnails.less index f31d78617..b15b8d25a 100644 --- a/less/thumbnails.less +++ b/less/thumbnails.less @@ -17,6 +17,10 @@ border-radius: @thumbnail-border-radius; .transition(all .2s ease-in-out); } +.thumbnail > img, +.img-thumbnail { + .img-responsive(); +} .thumbnail { display: block; } @@ -32,8 +36,6 @@ a.thumbnail:focus { // Images and captions .thumbnail > img { - display: block; - max-width: 100%; margin-left: auto; margin-right: auto; } |
