diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss index 1991f91e566..a5b762f5ac5 100644 --- a/app/assets/stylesheets/common/base/topic-post.scss +++ b/app/assets/stylesheets/common/base/topic-post.scss @@ -20,17 +20,18 @@ } } -/* global styles for the cooked HTML content in posts */ -.cooked { +/* global styles for the cooked HTML content in posts (and preview) */ +.cooked, #wmd-preview { word-wrap: break-word; h1, h2, h3, h4, h5, h6 { margin: 30px 0 10px; } h1 { line-height: 1em; } /* normalize.css sets h1 font size but not line height */ a { word-wrap: break-word; } - .highlight { - background-color: scale-color($highlight, $lightness: 40%); - padding: 2px; - margin: -2px; - } +} + +.cooked .highlight { + background-color: scale-color($highlight, $lightness: 40%); + padding: 2px; + margin: -2px; } .post-action { diff --git a/app/assets/stylesheets/desktop/compose.scss b/app/assets/stylesheets/desktop/compose.scss index 3c9bf782102..337726fa881 100644 --- a/app/assets/stylesheets/desktop/compose.scss +++ b/app/assets/stylesheets/desktop/compose.scss @@ -288,21 +288,19 @@ } #wmd-input, #wmd-preview { color: $primary; - - video { - max-width: 100%; - height: auto; - } - - audio { - max-width: 100%; - } } + #wmd-preview { border: 1px dashed scale-color-diff(); overflow: auto; visibility: visible; - + video { + max-width: 100%; + height: auto; + } + audio { + max-width: 100%; + } &.hidden { width: 0; visibility: hidden; @@ -311,6 +309,7 @@ #wmd-input { bottom: 35px; } + .submit-panel { position: absolute; display: block; @@ -393,34 +392,17 @@ margin: 0; background-color: $secondary; word-wrap: break-word; - - // set up proper header margins in post preview - h1, h2, h3, h4, h5, h6 { - margin: 30px 0 10px; - } - p { - margin-top: 19px; - } - blockquote p:first-of-type {margin-top: 0px;} } #wmd-input, #wmd-preview-scroller { position: absolute; left: 0; top: 0; - height: 100%; - min-height: 100%; - @include box-sizing(border-box); - border: 0; border-top: 30px solid transparent; - box-shadow: none; - @include border-radius-all(0); - transition: none; } #wmd-preview-scroller { font-size: 13px; line-height: 18px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: normal; overflow: scroll; visibility: hidden; .marker, .caret { diff --git a/app/assets/stylesheets/mobile/compose.scss b/app/assets/stylesheets/mobile/compose.scss index e28eb41278d..e8ab1a06bba 100644 --- a/app/assets/stylesheets/mobile/compose.scss +++ b/app/assets/stylesheets/mobile/compose.scss @@ -223,22 +223,17 @@ display: none; } #wmd-input, #wmd-preview { color: darken($primary, 40%); - - video { - max-width: 100%; - height: auto; - } - - audio { - max-width: 100%; - } } #wmd-preview { border: 1px dashed scale-color-diff(); overflow: auto; visibility: visible; - p { - margin-top: 0; + video { + max-width: 100%; + height: auto; + } + audio { + max-width: 100%; } &.hidden { width: 0; @@ -318,30 +313,15 @@ display: none; margin: 0; background-color: $secondary; word-wrap: break-word; - - // set up proper header margins in post preview - h1, h2, h3, h4, h5, h6 { - margin: 30px 0 10px; - } - p { - margin-top: 19px; - } } #wmd-input, #wmd-preview-scroller { position: absolute; left: 0; top: 0; - height: 100%; - min-height: 100%; - @include box-sizing(border-box); - border: 0; - @include border-radius-all(0); - transition: none; font-size: 16px; } #wmd-preview-scroller { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: normal; overflow: scroll; visibility: hidden; .marker, .caret {