From fc1176acae6d15f1bc078cacd2559a83112bec67 Mon Sep 17 00:00:00 2001 From: Jeff Atwood <jatwood@codinghorror.com> Date: Wed, 15 Oct 2014 22:34:56 -0700 Subject: [PATCH] FIX: use overflow:hidden on reply expansions --- .../stylesheets/desktop/topic-post.scss | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scss index e8377a1c7..3496bae76 100644 --- a/app/assets/stylesheets/desktop/topic-post.scss +++ b/app/assets/stylesheets/desktop/topic-post.scss @@ -238,39 +238,30 @@ nav.post-controls { h1, h2, h3 {margin: 10px 0;} a.mention {background: darken(scale-color-diff(), 10%);} - p img { - max-width: 579px; - } .topic-body { width: 86%; padding-left: 1%; padding-right: 1%; - border: none; - } + border-top: none; + // WARNING: overflow hide is required for quoted / embedded images + // which expect "normal" post width, but expansions are narrower + overflow: hidden; + } .topic-avatar { width: 45px; margin: 0 10px 0 15px; border: none; - } // bottom means "reply expansion" below a post &.bottom { &.hidden {display: block; opacity: 0; } } - &.bottom .arrow {float: right; margin: 0 0 0 0;} + &.bottom .arrow {float: right;} &.bottom { - margin-top: -11px; - // WARNING *ONLY* DO THIS ON REPLY EXPANSIONS! - // auto-sizing of images causes massive havoc with regular post stream - // but we have to do this on reply expansions because the width is - // unavoidably narrower than a regular post - .lightbox-wrapper img { - width: 100%; - height: auto; + margin-top: -11px; } -} // top means "in reply to expansion" above a post &.top {