centralize shared .cooked and #wmd-preview styles

This commit is contained in:
Jeff Atwood 2014-06-30 02:06:13 -07:00
parent 37df22eac6
commit d379012dbc
3 changed files with 23 additions and 60 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {