mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Textarea Editor CSS Improvements
References https://github.com/TryGhost/Ghost/pull/4373 * Consistent line-height & padding cross-browser * Remove drag handle from textarea * Partially clean up the CSS to more closely match the new standard
This commit is contained in:
parent
5db6fc4f18
commit
a7b82f4c4c
2 changed files with 55 additions and 51 deletions
|
@ -177,53 +177,50 @@
|
||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
.entry-markdown-content {
|
.entry-markdown-content {
|
||||||
textarea {
|
position: absolute;
|
||||||
border: 0;
|
top: 0;
|
||||||
width: 100%;
|
right: 0;
|
||||||
min-height: auto;
|
bottom: 0;
|
||||||
height: calc(100% - 40px);
|
left: 0;
|
||||||
max-width: 100%;
|
}
|
||||||
margin: 0;
|
|
||||||
padding: 22px 20px 35px 20px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
|
|
||||||
font-size: 2rem;
|
.markdown-editor {
|
||||||
line-height: 1.7em;
|
position: absolute;
|
||||||
font-family: $font-family-mono;
|
top: 0;
|
||||||
color: lighten($darkgrey, 10%);
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
&:focus {
|
height: 100%;
|
||||||
outline: 0;
|
max-width: 100%;
|
||||||
}
|
|
||||||
|
|
||||||
::selection {
|
overflow: auto;
|
||||||
color: $darkgrey;
|
-webkit-overflow-scrolling: touch;
|
||||||
background: lighten($blue, 20%);
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
resize: none;
|
||||||
padding: 10px;
|
border: 0;
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 601px) and (max-width: 1000px) {
|
font-size: 1.6rem;
|
||||||
padding: 15px;
|
line-height: 2.5rem;
|
||||||
}
|
font-family: $font-family-mono;
|
||||||
|
color: lighten($darkgrey, 10%);
|
||||||
|
|
||||||
@media (min-width: 1001px) {
|
&:focus {
|
||||||
top: 40px;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-height: 560px) {
|
@media (max-width: 450px) {
|
||||||
height: calc(100% - 5px);
|
padding: 15px;
|
||||||
}
|
}
|
||||||
} // textarea
|
|
||||||
} // .entry-markdown-content
|
@media (min-width: 451px) and (max-width: 1000px) {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1001px) {
|
||||||
|
padding: 62px 20px 36px 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.entry-preview {
|
.entry-preview {
|
||||||
// Align the tab of entry-preview on the right
|
// Align the tab of entry-preview on the right
|
||||||
|
@ -242,7 +239,7 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 60px 40px 40px 40px;
|
padding: 60px 40px 37px 40px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
|
@ -281,6 +278,21 @@
|
||||||
}//.editor
|
}//.editor
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Firefox Editor Hacks
|
||||||
|
// --------------------------------------------------
|
||||||
|
@-moz-document url-prefix() {
|
||||||
|
.editor .markdown-editor {
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
top: 40px;
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Markdown Help Icon
|
// Markdown Help Icon
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
@ -365,7 +377,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}//.entry-preview-content, .content-preview-content
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -550,14 +562,6 @@ body.zen {
|
||||||
bottom: 49px;
|
bottom: 49px;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
&.fade-in-scale {
|
|
||||||
animation-duration: 0.1s;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.fade-out {
|
|
||||||
animation-duration: 0.01s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
top: auto;
|
top: auto;
|
||||||
left: auto;
|
left: auto;
|
||||||
|
|
|
@ -34,7 +34,7 @@ $box-shadow: rgba(0,0,0,0.05) 0 1px 5px;
|
||||||
$settings-menu-transition: 0.4s;
|
$settings-menu-transition: 0.4s;
|
||||||
$settings-menu-bezier: 0.1, 0.7, 0.1, 1;
|
$settings-menu-bezier: 0.1, 0.7, 0.1, 1;
|
||||||
$font-family: 'Open Sans', sans-serif;
|
$font-family: 'Open Sans', sans-serif;
|
||||||
$font-family-mono: monospace;
|
$font-family-mono: Courier, 'Lucida Sans Typewriter', 'Lucida Typewriter', monospace;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue