Files
wekan/client/components/main/customTheme.css
T
Lauri Ojansivu 05ddc83cb7 Board tiles carry the whole theme, and Clean Light is readable on it.
A board on the clearpink theme was a pink rectangle floating inside a grey
tile, while the flat-coloured board beside it filled its tile edge to edge.

Two lists decided what a tile is coloured with. boardColors.css painted
.board-list .board-color-<name> a - the link inside the tile, which sits inside
the tile's own 24px/18px padding and so can never reach its edges - and
boardsList.css carried a hand-copied list of seventeen flat background colours
on the tile itself, which is what made the flat themes look right. The five
colour slide themes added later were never copied into that list, so their
tiles kept the default grey; clearblue was in it, flattened to one hex, so it
did not show its slide either; and cleandark and cleanlight were in neither.
Each theme now paints .board-list li.board-color-<name> where it paints its
header bar and its Public Boards row, and the copy is gone.

A tile writes its title in #f6f6f6, which is invisible on a light one: Apple
Glass Pastel's tile is a pastel wash from #f6f7fb, so its name and description
were white on near-white. Both light themes write their title, description and
archive line in their own dark ink and darken the card-count pill and the
unstarred star with them, in one block named as the place a third light theme
goes.

In Clean Light's top bar, header.css paints every icon white by id. The buttons
inside a ul li escaped that through a more specific color: inherit; the house
and the notification bell are in no ul li and stayed white on #F1F1F3. Both are
dark now, and the bar's labels move from 0.5 to the same 0.85, so there is one
shade in it instead of three. The current entry, which used to be the dark one
among pale ones, is the full-black heavier one instead. An unread bell keeps
its white glyph on the red circle.

Thanks to xet7 !
2026-08-14 17:52:48 +03:00

109 lines
4.7 KiB
CSS

/* Custom theme colors (docs/Theme/Theme.md) — the flat/clear categories let the
* user pick their own colors, applied as CSS variables on :root by
* globalThemeColor.js and consumed here. This is the initial, highest-impact
* surface (the header bars, primary buttons, sidebar button); deeper theming can
* grow from here. dark/special themes never set these variables. */
/* Flat: a single accent recolors the header bars and primary controls. The class
* lives on <body>; #header / #header-quick-access are descendants. */
.has-custom-theme-color #header,
.has-custom-theme-color #header-quick-access {
background: var(--theme-accent) !important;
}
.has-custom-theme-color button[type=submit].primary,
.has-custom-theme-color input[type=submit].primary,
.has-custom-theme-color .sidebar .sidebar-content .sidebar-btn {
background-color: var(--theme-accent) !important;
}
/* Clear: a two-color slide (gradient) across the header bars. */
.has-custom-theme-slide #header,
.has-custom-theme-slide #header-quick-access {
background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-2)) !important;
}
/* Select Color picker: category groups with a visible name above each group of
* colour swatches (docs/Theme/Theme.md). */
.theme-color-picker .theme-category-group {
margin-bottom: 8px;
clear: both; /* start below the previous group's floated swatches */
}
.theme-color-picker .theme-category-label {
display: block;
width: 100%;
clear: both; /* drop below the previous group's floats... */
text-align: start; /* ...so Flat/Clear/Dark/Special all sit at the start edge */
font-weight: bold;
margin: 2px 0 4px;
text-transform: capitalize;
}
/* No empty band above the first (Flat) title. */
.theme-color-picker .theme-category-group:first-child .theme-category-label {
margin-top: 0;
}
/* Tighten the Default (no override) row above the groups (Member Settings). */
.theme-color-picker ul.pop-over-list {
margin: 0 0 4px;
padding: 0;
}
/* Two switches, one row: what the theme IS on the start side ("Default (no
override)"), and where it ALSO applies on the end side ("All Boards", which
paints the overview's tiles in the theme's lighter colour). They are one
decision about the same theme, so they are one row rather than two stacked
menus, and each takes half the width so neither reads as the heading of the
other. On a narrow popup the row wraps and they stack, which is the same
layout one item at a time. */
.theme-color-picker ul.pop-over-list.theme-scope-row {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.theme-color-picker ul.pop-over-list.theme-scope-row > li {
flex: 1 1 12em;
min-width: 0;
}
/* The chosen one is filled, not merely ticked: the tick alone is easy to miss on
a row that is otherwise identical to the one beside it. Same fill as the
selected row of the All Boards left menu and of the Admin Panel - one
selected-thing look everywhere.
`--theme-accent-fill`, not `--theme-accent`: the accent is one colour - the
solid end of a colour-slide theme - so on clearorange this button was flat
orange while the menu row behind the popup slid, which is two looks for one
selected thing. The fill is the slide where the theme has one. */
.theme-color-picker ul.pop-over-list.theme-scope-row > li.active > a,
.theme-color-picker ul.pop-over-list.theme-scope-row > li.active > a:hover {
background: var(--theme-accent-fill, var(--theme-accent, #2980b9));
color: #fff !important;
}
.theme-color-picker ul.pop-over-list.theme-scope-row > li.active > a i {
color: #fff !important;
}
/* As many colour swatches visible at once as the width allows.
*
* The swatch list is shared with the board-background picker, where it is a
* float-based TWO-column grid (boardsList.css: `float: inline-start; width: 50%`).
* Two columns is right for background thumbnails; for the Select Color picker it
* meant Flat, Clear, Dark and Special each ran down the popup in a narrow pair,
* and most of them were below the fold however wide the browser was.
*
* Auto-filling columns instead - the same answer as the Change Language popup
* (popup.css), for the same reason. `auto-fill` + `minmax` takes as many columns
* as fit and collapses to one on a narrow window, so no media query is needed and
* a phone is unaffected. Scoped to `.theme-color-picker`, so the board-background
* picker keeps its pairs.
*
* The float rules have to be undone explicitly: a floated grid item is still
* floated, and `width: 50%` would leave every other column half empty. */
.theme-color-picker .board-backgrounds-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 8px;
}
.theme-color-picker .board-backgrounds-list .board-background-select {
float: none;
width: auto;
padding: 0;
}