From 89167be99a65e8d0a69ddd92d391e8b8a5821aaf Mon Sep 17 00:00:00 2001 From: Kris Aubuchon Date: Wed, 16 Jul 2014 01:01:03 -0400 Subject: [PATCH] fitting images in posts without violating max width/height --- app/assets/stylesheets/common/base/lightbox.scss | 4 ++++ app/assets/stylesheets/desktop/topic-post.scss | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/common/base/lightbox.scss b/app/assets/stylesheets/common/base/lightbox.scss index d941d33c6da..05168514873 100644 --- a/app/assets/stylesheets/common/base/lightbox.scss +++ b/app/assets/stylesheets/common/base/lightbox.scss @@ -11,6 +11,10 @@ .lightbox-wrapper { display: inline-block; + a img { + width: 100%; + height: 100%; + } } .meta { diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss index d7ac9748e18..f5e16df5c14 100644 --- a/app/assets/stylesheets/desktop/topic-post.scss +++ b/app/assets/stylesheets/desktop/topic-post.scss @@ -251,7 +251,10 @@ nav.post-controls { .embedded-posts { h1, h2, h3 {margin: 10px 0;} a.mention {background: darken(scale-color-diff(), 10%);} - + p img { + width: 100%; + height: 100%; + } .topic-body { width: 84%; padding-left: 1%; @@ -264,8 +267,6 @@ nav.post-controls { } - - // bottom means "reply expansion" below a post &.bottom { &.hidden {display: block; opacity: 0; }