Files
wekan/client/components/cards/cardAddFields.css
T
Lauri Ojansivu a6b10e3592 Dark themes: the quiet greys, Card Settings, popups and sidebars are readable again.
The accessibility audit made the quiet text greys dark for every theme, and
old rules never followed the dark themes: Card Settings drew white text on
light grey blocks, popup items, the sidebar's shortcuts row, quiet buttons and
sidebar labels were black on dark, and an !important list header beat each
theme's own. The quiet text is a variable with a light value on the dark
surfaces; Card Settings' sections, popup items and the other rules follow the
theme. axe-core finds no colour contrast failure in cleandark, moderndark, dark
and exodark on the board, sidebar, Card Settings, an opened card and the custom
fields popup.

Thanks to Samunosuke and xet7 !

Fixes #6863,
2026-11-03 11:41:58 +02:00

286 lines
10 KiB
CSS

/* Card Settings (Board Settings / Card, docs/Features/Cards/Card-Settings.md):
"Show" and its two choices, then the sections drawn like checklists. */
.card-settings-inline { padding: 4px 0 8px; }
/* Two panes, Minicard first (the start: left in a left-to-right page, right in
a right-to-left one) and Card after it (sidebar.jade boardCardSettingsPopup).
STACKED by default - Minicard above Card - and the container scrolls as one;
SIDE BY SIDE once the popup is wide enough for two panes of about 20em,
and then each pane's body scrolls on its own while the container does not.
A collapsed pane is its header only, and the other pane takes the width.
The popup's content wrapper does not scroll here (popup.css), so the
container is the one scroller in the stacked layout. */
.card-settings-panes-container {
container-type: inline-size;
container-name: card-settings-panes;
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
display: flex;
flex-direction: column;
}
.card-settings-panes {
display: flex;
flex-direction: column;
flex: 0 0 auto;
gap: 8px;
}
.card-settings-pane { min-width: 0; }
.card-settings-pane-head {
display: flex;
align-items: center;
gap: 6px;
padding-block: 4px 6px;
border-block-end: 1px solid #ddd;
margin-block-end: 8px;
}
.card-settings-pane-collapse {
padding: 2px 4px;
color: var(--wekan-quiet-text, #595959);
text-decoration: none;
cursor: pointer;
}
.card-settings-pane-collapse:hover,
.card-settings-pane-collapse:focus-visible { color: #2573a7; }
.card-settings-pane-title {
margin: 0;
font-size: calc(17px * var(--wekan-ui-font-scale, 1));
font-weight: bold;
}
.card-settings-pane-body[hidden] { display: none !important; }
/* The splitter: only side by side with neither pane collapsed (the container
query below shows it). A thin line with a wider grab area, the Admin Panel
left menu's grip (settingBody.css .left-menu-resize-handle) in look. */
.card-settings-splitter {
display: none;
flex: 0 0 10px;
align-self: stretch;
cursor: col-resize;
touch-action: none;
position: relative;
border-radius: 3px;
transition: background-color 0.2s ease;
}
.card-settings-splitter::before {
content: '';
position: absolute;
inset-block: 0;
inset-inline-start: 4px;
width: 2px;
background: #ddd;
}
.card-settings-splitter:hover,
.card-settings-splitter:focus-visible {
background: rgba(0, 123, 255, 0.4);
outline: none;
}
.card-settings-splitter:active { background: rgba(0, 123, 255, 0.6); }
body.card-settings-splitting-active {
user-select: none;
cursor: col-resize;
}
.card-settings-pane.is-pane-collapsed .card-settings-pane-head { margin-block-end: 0; }
@container card-settings-panes (min-width: 40em) {
.card-settings-panes {
flex-direction: row;
align-items: stretch;
flex: 1 1 auto;
min-height: 0;
gap: 0;
}
.card-settings-pane {
flex: 1 1 0;
display: flex;
flex-direction: column;
min-height: 0;
}
/* The Minicard pane takes its share of the width (the splitter between
them, models/lib/cardSettingsSplit.js); the Card pane takes the rest. */
.card-settings-panes:not(.has-collapsed-pane) > .card-settings-pane-minicard {
flex: 0 0 calc((100% - 10px) * var(--card-settings-split, 0.5));
}
.card-settings-pane.is-pane-collapsed { flex: 0 0 auto; }
.card-settings-panes:not(.has-collapsed-pane) > .card-settings-splitter { display: block; }
.card-settings-pane-body {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
padding-inline-end: 4px;
}
}
/* A section: the checklist's grey block, its title line and its items. */
.card-settings-inline-section {
/* The checklist's grey block; a dark theme has its own (#6863: white text on
this light grey was 1.07:1 in cleandark). */
background: var(--card-settings-section-bg, #f7f7f7);
border-radius: 3px;
margin-block-end: 8px;
padding: 4px 8px 6px;
}
.card-settings-inline-section.ui-sortable-helper {
box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.5);
cursor: grabbing;
}
.card-settings-inline-section-head {
display: flex;
align-items: center;
gap: 6px;
padding-block: 4px;
}
.card-settings-inline-section-title {
flex: 1 1 auto;
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0;
font-size: calc(16px * var(--wekan-ui-font-scale, 1));
min-width: 0;
overflow-wrap: anywhere;
}
.card-settings-inline-section-title.js-card-settings-section-handle { cursor: grab; }
.card-settings-inline-section-count { color: var(--wekan-quiet-text, #595959); white-space: nowrap; }
.card-settings-inline-collapse,
.card-settings-inline-section-move,
.card-settings-inline-menu {
padding: 2px 4px;
color: var(--wekan-quiet-text, #595959);
text-decoration: none;
cursor: pointer;
}
.card-settings-inline-collapse:hover,
.card-settings-inline-collapse:focus-visible,
.card-settings-inline-menu:hover,
.card-settings-inline-menu:focus-visible { color: #2573a7; }
/* The section's own checkbox, left of its title: the rows' look. A section
hidden whole on this side keeps its rows' ticks, drawn faded. */
.card-settings-section-side { flex: 0 0 auto; }
.card-settings-section-side > a.flex { margin: 0; }
.card-settings-inline-section.is-section-hidden .card-settings-inline-items { opacity: 0.55; }
/* One row on this side: one line, no caret - its checkbox where the other
sections' checkboxes are. */
.card-settings-inline-section.is-single .card-settings-inline-section-head {
padding-inline-start: calc(0.5em + 8px);
}
/* "+" under Custom Fields' items: a new custom field. */
.card-settings-add-custom-field { padding: 2px 0 0 22px; }
.card-settings-add-custom-field-button {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 28px;
min-height: 28px;
border-radius: 3px;
color: var(--wekan-quiet-text, #595959);
text-decoration: none;
}
.card-settings-add-custom-field-button:hover,
.card-settings-add-custom-field-button:focus-visible { background: rgba(0, 0, 0, 0.06); color: #2573a7; }
/* Collapsed: the items hidden, not removed, so their drag stays bound. */
.card-settings-inline-section.is-collapsed .card-settings-inline-items,
.card-settings-inline-section.is-collapsed .card-settings-add-custom-field { display: none; }
/* An item: the checkbox, the name, and its hamburger at the end
(sidebar.css .card-settings-line is the line itself). */
.card-settings-inline .card-settings-line {
grid-template-columns: auto minmax(0, 1fr) auto;
/* A space's width between the checkbox and the name, as in text. */
column-gap: 0.3em;
border-bottom: 0;
padding-inline-start: 22px;
}
.card-settings-inline .card-settings-line.ui-sortable-helper { background: var(--card-settings-helper-bg, #fff); }
.card-settings-inline .materialCheckBox { transition: none; }
.card-settings-inline .card-field-order-toggle.is-animating .materialCheckBox { transition: 0.2s; }
/* The hamburgers' checkboxes, likewise: only the one just clicked animates. */
.card-settings-section-menu .materialCheckBox,
.card-settings-item-menu .materialCheckBox { transition: none; }
.card-settings-section-menu .is-animating .materialCheckBox,
.card-settings-item-menu .is-animating .materialCheckBox { transition: 0.2s; }
/* The hamburgers' popups. */
.card-settings-item-menu,
.card-settings-section-menu { min-width: 16em; }
/* The hamburgers' checkboxes: a space's width before their label, as on
the rows. */
.card-settings-item-menu .card-settings-board-option > a.flex,
.card-settings-section-menu .card-settings-board-option > a.flex {
align-items: center;
column-gap: 0.3em;
}
/* A menu's options start at its edge, like its table: not .check-div's
indent for a form's checkboxes. */
.card-settings-item-menu .card-settings-board-option,
.card-settings-section-menu .card-settings-board-option {
margin-inline-start: 0;
}
/* A tick is drawn rotated (forms.css #6786) and reaches about 3px past its
box toward the label, which ate the space: drawn 3px further left, it keeps
it - the box, and so the label, do not move when it is ticked. Right to
left the label is on the other side of the box and the tick leans away
from it, so it stays as it is. */
:root:not([dir="rtl"]) .card-settings-inline .materialCheckBox.is-checked,
:root:not([dir="rtl"]) .card-settings-item-menu .materialCheckBox.is-checked,
:root:not([dir="rtl"]) .card-settings-section-menu .materialCheckBox.is-checked {
left: -6px;
}
/* A hamburger's panel (sidebar.jade cardSettingsInlinePanel): what the
hamburger holds, opened UNDER its line inside the pane, pushing the rest
down - not a popup. The open hamburger is tinted, and the panel hangs from
it in the same tint, with a notch pointing up at the line it belongs to. */
.card-settings-inline-menu.is-open,
.card-settings-add-custom-field-button.is-open {
background: rgba(41, 128, 185, 0.15);
color: #2573a7;
border-radius: 3px;
}
.card-settings-inline-panel {
position: relative;
margin-block: 6px 8px;
padding: 10px 12px 8px;
border: 1px solid rgba(41, 128, 185, 0.45);
border-radius: 4px;
background: rgba(41, 128, 185, 0.06);
/* Its own block, the width of what it hangs from. */
flex: 0 0 100%;
box-sizing: border-box;
}
.card-settings-inline-panel::before {
content: '';
position: absolute;
inset-block-start: -7px;
inset-inline-end: 10px;
width: 12px;
height: 12px;
background: inherit;
border-inline-start: 1px solid rgba(41, 128, 185, 0.45);
border-block-start: 1px solid rgba(41, 128, 185, 0.45);
transform: rotate(45deg);
background-color: var(--card-settings-notch-bg, #eef4f9);
}
/* The + is at the start of its line: the notch is under it there. */
.card-settings-inline-panel-create::before {
inset-inline-end: auto;
inset-inline-start: 6px;
}
.card-settings-inline-panel-close {
/* Above the notch, which is drawn at the same end of the panel's top. */
z-index: 1;
position: absolute;
inset-block-start: 4px;
inset-inline-end: 6px;
color: var(--wekan-quiet-text, #595959);
padding: 2px 4px;
}
.card-settings-inline-panel-close:hover,
.card-settings-inline-panel-close:focus-visible { color: #2573a7; }
.card-settings-section-action-title {
display: flex;
align-items: center;
gap: 6px;
margin: 0 0 6px;
}