From 6c745ed6a92381e54314a563ab58a956b4cbaceb Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Sat, 26 Sep 2026 00:10:06 +0200 Subject: [PATCH] Use solid borders and quieter colors in the forms and the editor. --- publish/editor.css | 190 +++++++++++++++++++++++++-------------------- publish/editor.js | 6 +- publish/style.css | 32 ++++++-- 3 files changed, 134 insertions(+), 94 deletions(-) diff --git a/publish/editor.css b/publish/editor.css index 54c6a36..8928495 100644 --- a/publish/editor.css +++ b/publish/editor.css @@ -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; } diff --git a/publish/editor.js b/publish/editor.js index 864534b..7049c7f 100644 --- a/publish/editor.js +++ b/publish/editor.js @@ -24,9 +24,9 @@ var XxxEditor = (function () { // Icons in a 16-unit box. "fill" paths are solid shapes; "stroke" paths // are lines, in their own box size. var ICONS = { - bold: { fill: ["M4 2h4.8c2 0 3.4 1.2 3.4 3 0 1.1-.6 2-1.5 2.4 1.2.4 2 1.4 2 2.8 0 2.1-1.6 3.8-3.9 3.8H4z" + - "M6.5 4.1v2.9h2c.9 0 1.5-.6 1.5-1.45S9.4 4.1 8.5 4.1z" + - "M6.5 9v3.9h2.4c1 0 1.7-.8 1.7-1.95S9.9 9 8.9 9z"] }, + bold: { fill: ["M3.5 2h5.2c2.3 0 3.7 1.2 3.7 3.05 0 1.2-.6 2.1-1.6 2.6 1.3.4 2.2 1.5 2.2 3 0 2.1-1.6 3.35-4 3.35H3.5z" + + "M6.2 4.3v2.6h2.2c.9 0 1.4-.5 1.4-1.3s-.5-1.3-1.4-1.3z" + + "M6.2 9.1v2.7h2.5c1 0 1.6-.5 1.6-1.35s-.6-1.35-1.6-1.35z"] }, italic: { fill: ["M6.5 2h6v1.8h-2.1L8.1 12.2h2.1V14h-6v-1.8h2.1l2.3-8.4H6.5z"] }, alignleft: { fill: ["M1 2h14v2H1zM1 6h9v2H1zM1 10h14v2H1zM1 14h9v2H1z"] }, aligncenter: { fill: ["M1 2h14v2H1zM3.5 6h9v2h-9zM1 10h14v2H1zM3.5 14h9v2h-9z"] }, diff --git a/publish/style.css b/publish/style.css index 3dfa5b4..ffca117 100644 --- a/publish/style.css +++ b/publish/style.css @@ -13,11 +13,18 @@ input { } #main .grid .rightcolumn > input { display: block; + box-sizing: border-box; width: 300px; + padding: 3px 8px; font-size: 12pt; - border: 1px dashed #006633; + border: 1px solid #b8c9be; border-radius: 8px; } +#main .grid .rightcolumn > input:focus { + border-color: #006633; + outline: none; + box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.15); +} #main .grid .rightcolumn input#remember { margin-top: 7px; width: initial; @@ -39,10 +46,18 @@ input { } #main .submission button { - border: 1px dashed #006633; + padding: 4px 14px; + border: 1px solid #006633; + border-radius: 6px; background-color: #FFFFFF; - font-weight: bold; + color: #006633; + font: bold 11pt "Noto Sans", "Verdana", sans-serif; margin-right: 5px; + cursor: pointer; +} +#main .submission button:hover { + background-color: #006633; + color: #FFFFFF; } #main .grid #hidden { display: block; @@ -56,7 +71,7 @@ input { #main .grid textarea.submission { margin-top: 10px; - border: 1px dotted #006633; + border: 1px solid #b8c9be; border-radius: 8px; font-size: 12pt; } @@ -112,7 +127,8 @@ div.note { #uploadparent { height: 200px; - border: 1px dashed #006633; + border: 1px solid #b8c9be; + border-radius: 8px; margin-bottom: 10px; } #uploadparent>div { @@ -133,7 +149,9 @@ div.note { } ul.error-box { - border: 2px dotted red; + border: 1px solid #cc0000; + border-radius: 8px; + background-color: #fff5f5; padding: 10px 30px; } fieldset.mi_group_prevacct ul.error-box { @@ -153,7 +171,7 @@ ul.error-box li { } #captcha #recaptcha_image { margin-left: 120px; - border: 1px dotted #006633; + border: 1px solid #b8c9be; border-radius: 8px; } #captcha .icons {