Sat, 21 Feb 2026 15:27:17 +0100
add support for dark mode - resolves #730
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2021 Mike Becker. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * */ :root { --color-background: white; --color-background-popup: ghostwhite; --color-foreground: #1c204e; --color-foreground-inverted: white; --color-link: #3060f8; --color-background-mainmenu: #e0e0e5; --color-background-mainmenu-active: #d0d0d5; --color-background-sidemenu: #f7f7ff; --color-background-sidemenu-active: #e7e7ef; --color-background-th: #f0f0f0; --color-background-tr-even: #f7f7ff; --color-border-primary: #606060; --color-border-primary-fade: #d0d0d5; --color-border-secondary: #c0c0c0; --color-border-secondary-fade: #d3d3d3; --color-button-secondary: #f0f0f0; --color-button-secondary-hover: #f0f0ff; --color-button-primary: #20a0ff; --color-button-primary-text: white; --color-button-primary-hover: #1090cf; --color-background-issue-data: #f7f7f7; --color-background-comment-author: #e7e7ef; } @media (prefers-color-scheme: dark) { :root { --color-background: #2c404e; --color-foreground: #fefaf7; --color-foreground-inverted: #1c204e; --color-background-popup: #4f6778; --color-link: #90e8ff; --color-background-mainmenu: #3c3c49; --color-background-mainmenu-active: #5c5c69; --color-background-sidemenu: #5a5a80; --color-background-sidemenu-active: #7a7aa0; --color-background-th: #595970; --color-background-tr-even: #3c505e; --color-border-primary: #ececec; --color-border-primary-fade: #a9a9a9; --color-border-secondary: #d0d0d0; --color-border-secondary-fade: #959595; --color-button-secondary: #595970; --color-button-secondary-hover: #656585; --color-button-primary: #20a0ff; --color-button-primary-text: white; --color-button-primary-hover: #1090cf; --color-background-issue-data: #4c606e; --color-background-comment-author: #7a7aa0; } } .light-text { color: white; } .dark-text { color: #1c204e; } input, select, textarea { background: var(--color-background); color: var(--color-foreground); border: var(--color-border-primary) solid thin; border-radius: 2pt; } html { font-family: sans-serif; font-size: 11pt; background: var(--color-background); color: var(--color-foreground); margin: 0; padding: 0; height: 100vh; } body { height: 100%; margin: 0; padding: 0; } h2 { margin: 0.75em 0; } h3 { margin: 0.25em 0; } .edit-icon { margin-left: 1ex; margin-right: 1ex; } .edit-icon::before { display: inline-block; width: .8em; height: .8em; margin: 0; padding: 0; content: ''; mask-image: url('edit.svg'); mask-size: contain; mask-repeat: no-repeat; mask-position: center; background-color: currentColor; } textarea, input, button, select { font-family: inherit; font-size: inherit; } a { cursor: pointer; color: var(--color-link); text-decoration: none; } #page-area { display: flex; flex-flow: column nowrap; height: 100%; } #body-area { flex-grow: 1; display: flex; flex-flow: row nowrap; } #mainMenu { display: flex; flex-flow: row nowrap; border-image-source: linear-gradient(to right, var(--color-border-primary), var(--color-border-primary-fade)); border-image-slice: 1; border-bottom-style: solid; border-bottom-width: thin; background: var(--color-background-mainmenu); } #sideMenu { min-width: 32ex; width: 15vw; display: flex; flex-flow: column; color: var(--color-link); border-image-source: linear-gradient(to bottom, var(--color-border-primary), var(--color-border-primary-fade)); border-image-slice: 1; border-right-style: solid; border-right-width: thin; background: var(--color-background-sidemenu); } #mainMenu .menuEntry { font-size: 1.2rem; padding: .25em 1em .25em 1em; border-right-style: solid; border-right-width: thin; border-right-color: #9095a1; } #mainMenu .searchBox { margin-left: auto; padding: .25em 1em .25em 0; } #mainMenu .searchBox input { width: 30em; } #sideMenu .menuEntry { white-space: nowrap; padding: .25em; border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #d7d7df; } #sideMenu .menuEntry .edit-icon { display: none; } #sideMenu .menuEntry:hover .edit-icon { display: initial; } #mainMenu .menuEntry[data-active] { background: var(--color-background-mainmenu-active); } #sideMenu .menuEntry[data-active] { background: var(--color-background-sidemenu-active); } #sideMenu .level-0 { padding-left: .75em; } #sideMenu .level-1 { padding-left: 1.25em; } #sideMenu .level-2 { padding-left: 2.5em; } #content-area { flex-grow: 1; padding: 1.5em; } #whats-new { background: var(--color-background-popup); position: fixed; top: 10%; left: 50%; transform: translate(-50%, 0); padding: 1.5em; border: var(--color-foreground) solid 2px; border-radius: 4px; } .blurred { filter: blur(5px); } button, a.button { display: inline-block; font-size: medium; border-style: solid; border-width: thin; border-color: var(--color-border-primary); color: inherit; background: var(--color-button-secondary); padding: .25em .5em .25em .5em; cursor: default; text-decoration: none; text-align: center; font-variant-caps: small-caps; } button:hover, a.button:hover { background: var(--color-button-secondary-hover); } button[type=submit], a.button.submit { background: var(--color-button-primary); color: var(--color-button-primary-text); } button[type=submit]:hover, a.button.submit:hover { background: var(--color-button-primary-hover); } th { text-align: left; } table.datatable { border-style: solid; border-width: thin; border-color: var(--color-border-secondary); border-collapse: collapse; } table.datatable th { white-space: nowrap; font-weight: bold; background: var(--color-background-th); } table.datatable th, table.datatable td { border-style: solid; border-width: thin; border-color: var(--color-border-secondary-fade); padding: .4em; } table.datatable tr:nth-child(2n) { background: var(--color-background-tr-even); } table.formtable { border-style: none; border-collapse: separate; border-spacing: 1em; } table.formtable th { font-weight: bold; text-align: left; vertical-align: center; white-space: nowrap; } table.formtable tbody td > * { margin: 0; box-sizing: border-box; } table.formtable input[type=text], table.formtable input[type=url], table.formtable input[type=email], table.formtable input[type=number], table.formtable select, table.formtable textarea { width: 100%; } table.formtable tfoot td { text-align: right; } .fullwidth { width: 100%; } .vtop { vertical-align: top; } .hcenter { text-align: center; } .hright { text-align: right; } .smalltext { font-size: smaller; } .nowrap { white-space: nowrap; } .medskip { margin-top: .5em; } .bigskip { margin-top: 1.5em; } .info-box, .error-box { margin: 1.5em; border-style: dashed; border-width: thin; border-color: deepskyblue; padding: 1em; } .error-box { border-style: outset; border-color: red; background: lightcoral; } .table { display: table; border-spacing: .5em; margin: -.5em; } .row { display: table-row; } .caption { font-weight: bold; } .row > div { display: table-cell; } /* MARKDOWN STYLES */ div.markdown-styled p:first-child { margin-top: 0; } div.markdown-styled table { border-collapse: collapse; } div.markdown-styled td, div.markdown-styled th { padding: 0.25em; border-style: solid; border-color: darkgray; border-width: thin; } #language-choice { display: flex; flex-basis: content; flex-direction: column; align-items: flex-start; } #language-choice input { margin: .5em; } #settings-form button { margin-top: 1.5em; } /* browser language not available */ span.blNA { margin: .5em; color: red; font-style: italic; font-size: smaller; } #error-page h1 { font-size: 1.5em; } #error-page table { width: 100%; border-top-style: solid; border-top-width: thin; border-top-color: #606060; border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: #505050; border-collapse: separate; border-spacing: .5em; } #error-page table th { text-align: right; white-space: nowrap; } #error-page table td { width: 100%; } #about h1, #about h2 { font-variant-caps: small-caps; color: #505050; } .project-attributes { margin-bottom: 1em; } .project-attributes .row > div + div { padding-left: 2em; } span.phase-2 { text-decoration: line-through; } .issue-progress-bar { box-sizing: border-box; width: 100%; height: 0.5em; display: flex; position: relative; border-style: solid; border-width: thin; border-color: #6060cc; } .issue-progress-bar .open { height: 100%; background: steelblue; } .issue-progress-bar .active { height: 100%; background: gold; } .issue-progress-bar .done { height: 100%; background: green; } .issue-tag, .version-tag, .issue-tag-auto-color { padding: .1em 2ex .1em 2ex; display: inline-block; box-sizing: border-box; border-style: solid; border-width: thin; border-color: var(--color-border-secondary); border-radius: 4pt; background: darkgray; text-align: center; font-weight: bolder; font-size: x-small; } .issue-tag, .version-tag { color: whitesmoke; } .issue-tag.Bug { background: red; } .issue-tag.Improvement, .issue-tag.Feature { background: limegreen; } .issue-tag.Task { background: deepskyblue; } .issue-tag.Test { background: lightskyblue; } .issue-tag.phase-0 { background: steelblue; } .issue-tag.phase-1 { background: gold; color: black; } .issue-tag.phase-2 { background: green; } div.navmenu-icon { display: inline-block; width: .5em; height: .5em; margin-right: .25em; } .version-Future { background: lightskyblue; } .version-Unreleased { background: gold; color: black; } .version-Released { background: limegreen; } .version-LTS { background: green; } .version-Deprecated { color: lightgray; background: darkgray; } hr.issue-view-separator { border-image-source: linear-gradient(to right, var(--color-border-primary-fade), var(--color-border-primary), var(--color-border-primary-fade)); border-image-slice: 1; border-width: thin; border-style: none; border-top-style: solid; } div.comment { padding-left: .25rem; margin-bottom: 1.25em; } .comment-author { color: var(--color-link); background: var(--color-background-comment-author); margin-left: -.25rem; padding: .25rem; } .comment-author-name { color: inherit; } span.comment-edit-info { margin-left: 1ex; color: #556080; } div.mde-toolbar { margin-bottom: .25em; } div.mde-toolbar button { font-size: small; } div.mde-preview { border-style: solid; border-width: 2px; border-color: var(--color-border-secondary); padding: .25em; border-radius: 8px; } span.eta-overdue { color: red; } table.issue-view { border-collapse: collapse; margin-bottom: 1em; } table.issue-view td, table.issue-view th { background: var(--color-background-issue-data); border: solid var(--color-border-secondary) 1pt; padding: .5em; } table.issue-view th { white-space: nowrap; } .issue-variant-status { display: flex; gap: 1em; flex-wrap: wrap; } .selected-variant { font-weight: bolder; text-decoration: underline; } table.relation-editor input, table.relation-editor button, table.relation-editor .button { box-sizing: border-box; width: 100%; } table.relation-editor button, table.relation-editor .button { text-align: center; padding: .1em .25em .1em .25em; }