Use solid borders and quieter colors in the forms and the editor.

This commit is contained in:
tim
2026-09-26 00:10:06 +02:00
parent a9daa6a792
commit 6c745ed6a9
3 changed files with 134 additions and 94 deletions
+106 -84
View File
@@ -1,8 +1,11 @@
/*
* The story editor (publish/editor.js). The colors are the ones of the
* TinyMCE "xxx" skin that it replaces, and the size and border follow the
* TinyMCE 5 settings of the live site: at most 450px wide, at least 300px
* high, resizable, with the toolbar on top.
* The story editor (publish/editor.js). The size follows the TinyMCE 5
* settings of the live site: at most 450px wide, at least 300px high,
* resizable, with the toolbar on top.
*
* Colors: borders #b8c9be (lines inside the editor #dfe7e2), toolbar
* #f4f7f5, hover #e3ebe6, pressed #d2e2d8, and the site green #006633
* for focus and the main button.
*/
.xed {
box-sizing: border-box;
@@ -14,9 +17,12 @@
min-height: 300px;
overflow: hidden;
resize: both;
border: 1px dashed #006633;
border: 1px solid #b8c9be;
border-radius: 8px;
background-color: #e2f0e2;
background-color: #f4f7f5;
}
.xed:focus-within {
border-color: #006633;
}
.xed-area {
@@ -39,23 +45,40 @@
margin: 1em 40px;
}
/* The story textarea, shown in place of the editor by the source button */
.xed .xed-source {
box-sizing: border-box;
display: block;
flex: 1 1 300px;
width: 100%;
min-height: 0;
margin: 0;
padding: 8px;
border: 0;
border-radius: 0;
background-color: #ffffff;
color: #000000;
font: 10.5pt/1.5 "DejaVu Sans Mono", Menlo, Consolas, monospace;
resize: none;
outline: none;
}
.xed-toolbar {
display: flex;
flex-wrap: wrap;
flex: none;
padding: 2px 0 4px;
border-bottom: 1px dashed #006633;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
padding: 3px 2px;
border-bottom: 1px solid #dfe7e2;
}
.xed-group {
display: flex;
gap: 2px;
margin: 2px 0 0 2px;
gap: 1px;
margin: 1px 0;
}
.xed-group + .xed-group {
margin-left: 3px;
padding-left: 3px;
border-left: 1px solid #9ef89e;
margin-left: 4px;
padding-left: 4px;
border-left: 1px solid #dfe7e2;
}
.xed-btn {
@@ -64,28 +87,34 @@
align-items: center;
justify-content: center;
width: 28px;
height: 24px;
height: 26px;
margin: 0;
padding: 0;
border: 1px solid transparent;
border-radius: 0;
background-color: #e0efe0;
border: 0;
border-radius: 4px;
background: transparent;
color: #333333;
cursor: pointer;
}
.xed-btn:hover,
.xed-btn:hover {
background-color: #e3ebe6;
}
.xed-btn:focus-visible {
background-color: #cde8cd;
border-color: #86f686;
outline: none;
outline: 2px solid #006633;
outline-offset: -2px;
}
.xed-btn.xed-active {
background-color: #bfe7bf;
border-color: #86f686;
background-color: #d2e2d8;
color: #004d26;
}
.xed-btn:disabled {
background: transparent;
color: #333333;
opacity: 0.35;
cursor: default;
}
.xed-btn svg {
display: block;
filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.75));
}
/* Dialogs */
@@ -93,7 +122,11 @@
position: fixed;
inset: 0;
z-index: 1000;
background-color: rgba(0, 0, 0, 0.3);
background-color: rgba(0, 0, 0, 0.25);
}
/* A window that closes on a click outside it has a lighter backdrop */
.xed-modal-block.xed-modal-light {
background-color: rgba(0, 0, 0, 0.08);
}
.xed-window {
position: fixed;
@@ -105,35 +138,42 @@
max-width: calc(100vw - 20px);
max-height: calc(100vh - 20px);
overflow: auto;
border: 1px dashed #006633;
background-color: #e5fde5;
border: 1px solid #b8c9be;
border-radius: 8px;
background-color: #ffffff;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
color: #333333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-family: "Noto Sans", "Verdana", sans-serif;
font-size: 11pt;
text-align: left;
}
.xed-window-head {
display: flex;
align-items: center;
padding: 9px 15px;
border-bottom: 1px dashed #006633;
padding: 10px 15px;
border-bottom: 1px solid #dfe7e2;
}
.xed-title {
flex: 1;
padding-right: 10px;
font-size: 20px;
color: #006633;
font-size: 14pt;
font-weight: bold;
line-height: 20px;
line-height: 1.3;
}
.xed-close {
width: 28px;
height: 28px;
padding: 0;
border: 0;
border-radius: 4px;
background: none;
color: #6d6d6d;
font: bold 20px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
font: bold 20px/28px "Noto Sans", "Verdana", sans-serif;
cursor: pointer;
}
.xed-close:hover {
background-color: #e3ebe6;
color: #333333;
}
.xed-window-body {
@@ -142,36 +182,37 @@
.xed-foot {
display: flex;
justify-content: flex-end;
gap: 3px;
padding: 10px;
border-top: 1px dashed #006633;
gap: 6px;
padding: 10px 15px;
border-top: 1px solid #dfe7e2;
}
.xed-button {
box-sizing: border-box;
height: 30px;
padding: 4px 8px;
border: 1px solid transparent;
border-radius: 0;
background-color: #e0efe0;
min-width: 64px;
height: 32px;
padding: 4px 12px;
border: 1px solid #b8c9be;
border-radius: 6px;
background-color: #ffffff;
color: #333333;
font: 14px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
font: 11pt/1.4 "Noto Sans", "Verdana", sans-serif;
cursor: pointer;
}
.xed-button:hover,
.xed-button:hover {
background-color: #f0f5f2;
}
.xed-button:focus-visible {
background-color: #cde8cd;
border-color: #86f686;
outline: none;
outline: 2px solid #006633;
outline-offset: 1px;
}
.xed-button.xed-primary {
min-width: 52px;
background-color: #006dcc;
border-color: #006633;
background-color: #006633;
color: #ffffff;
font-weight: bold;
}
.xed-button.xed-primary:hover,
.xed-button.xed-primary:focus-visible {
background-color: #005fb3;
border-color: transparent;
.xed-button.xed-primary:hover {
background-color: #00522a;
}
/* Link dialog */
@@ -195,17 +236,18 @@
box-sizing: border-box;
flex: 1;
min-width: 0;
height: 30px;
padding: 0 4px;
border: 1px solid #c5c5c5;
border-radius: 0;
height: 32px;
padding: 0 8px;
border: 1px solid #b8c9be;
border-radius: 6px;
background-color: #ffffff;
color: #333333;
font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
font: 11pt "Noto Sans", "Verdana", sans-serif;
}
.xed-textbox:focus {
border-color: #59a5e1;
border-color: #006633;
outline: none;
box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.15);
}
/* Special character dialog */
@@ -224,15 +266,15 @@
min-width: 12px;
height: 20px;
padding: 2px;
border: 1px dashed #006633;
border: 1px solid #e3ebe6;
line-height: 20px;
text-align: center;
vertical-align: middle;
cursor: default;
cursor: pointer;
}
.xed-charmap td:hover,
.xed-charmap td:focus-visible {
background-color: #9ec49e;
background-color: #d2e2d8;
outline: none;
}
.xed-charmap-preview {
@@ -246,25 +288,5 @@
}
.xed-charmap-name {
margin-top: 10px;
font-size: 14px;
}
/* Source code dialog */
.xed-source {
box-sizing: border-box;
display: block;
width: 600px;
max-width: 100%;
height: 500px;
max-height: calc(100vh - 160px);
padding: 4px;
border: 1px solid #59a5e1;
border-radius: 0;
background-color: #ffffff;
color: #333333;
font: 14px "Helvetica Neue", Helvetica, Arial, sans-serif;
resize: none;
}
.xed-source:focus {
outline: none;
font-size: 10.5pt;
}