From cb6b9ccc6db0460a74ae92f7a036bd18de948cc0 Mon Sep 17 00:00:00 2001 From: Jeff Atwood <jatwood@codinghorror.com> Date: Thu, 28 Mar 2013 17:07:57 -0700 Subject: [PATCH] make h1 margins specific to .cooked, and preview --- app/assets/stylesheets/application/compose.css.scss | 12 ++++++++++++ .../stylesheets/application/topic-post.css.scss | 8 +++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/application/compose.css.scss b/app/assets/stylesheets/application/compose.css.scss index b7b3e67b638..46a9dbed473 100644 --- a/app/assets/stylesheets/application/compose.css.scss +++ b/app/assets/stylesheets/application/compose.css.scss @@ -355,6 +355,13 @@ position: absolute; top: 50px; bottom: 48px; + + // this removes the topmost margin; + // if we don't have this, all posts would have extra space at the top + #wmd-preview > *:first-child { + margin-top: 0px !important; + } + #wmd-input, #wmd-preview { box-sizing: border-box; -moz-box-sizing: border-box; @@ -365,6 +372,11 @@ margin: 0; background-color: $white; word-wrap: break-word; + + // set up proper header margins in post preview + h1, h2, h3, h4, h5, h6 { + margin: 20px 0 10px; + } } #wmd-input { position: absolute; diff --git a/app/assets/stylesheets/application/topic-post.css.scss b/app/assets/stylesheets/application/topic-post.css.scss index 9758b905588..e2442b6f7fb 100644 --- a/app/assets/stylesheets/application/topic-post.css.scss +++ b/app/assets/stylesheets/application/topic-post.css.scss @@ -590,9 +590,11 @@ margin-top: 0px !important; } - // set up proper header margins in posts - h1, h2, h3, h4, h5, h6 { - margin: 20px 0 10px; + .cooked { + // set up proper header margins in posts + h1, h2, h3, h4, h5, h6 { + margin: 20px 0 10px; + } } // this is the little pointy bit of the speech bubble on the post, on the left side