Define the tokens the stylesheet used but never had; add danger, mention, motion, shadow, layer and type tokens (#268, part of #282)
Seven undefined custom properties made borders fall back to the text colour (ExportDialog's dates, the emoji picker, the history gap, the voice play button); they now point at real tokens. theme.css gains visible hover/pressed/selected fills, red and amber, muted text, motion, shadow, z-index, radius, font-size and weight tokens, a keyboard focus ring and a global reduced-motion rule. Icon buttons hover neutral instead of blue. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+28
-28
@@ -1245,7 +1245,7 @@ button.video-tile {
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
padding-bottom: var(--spacing-xs);
|
||||
border-bottom: 1px solid var(--outline-low);
|
||||
border-bottom: 1px solid var(--outline-light);
|
||||
}
|
||||
|
||||
.search-filter {
|
||||
@@ -1285,7 +1285,7 @@ button.video-tile {
|
||||
justify-content: center;
|
||||
gap: var(--spacing-s);
|
||||
padding: var(--spacing-s) var(--spacing-m);
|
||||
color: var(--surface-text-muted);
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-size-small);
|
||||
}
|
||||
|
||||
@@ -3746,7 +3746,7 @@ img.smilie {
|
||||
height: 34px;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
color: var(--on-primary);
|
||||
color: var(--primary-text);
|
||||
background: var(--primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -3830,7 +3830,7 @@ img.smilie {
|
||||
/* Marked as changed-from-default, so a message left at double speed does not
|
||||
quietly stay that way unnoticed. */
|
||||
.voice-speed.changed {
|
||||
color: var(--on-primary);
|
||||
color: var(--primary-text);
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
@@ -5809,7 +5809,7 @@ video.lightbox-media {
|
||||
gap: 2px;
|
||||
flex: none;
|
||||
padding: 4px 2px;
|
||||
border-bottom: 1px solid var(--outline-variant);
|
||||
border-bottom: 1px solid var(--outline-medium);
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
@@ -5870,7 +5870,7 @@ video.lightbox-media {
|
||||
.kick-points {
|
||||
position: relative;
|
||||
flex: none;
|
||||
border-top: 1px solid var(--outline-variant);
|
||||
border-top: 1px solid var(--outline-medium);
|
||||
}
|
||||
|
||||
.kick-points-plaque {
|
||||
@@ -6002,10 +6002,10 @@ video.lightbox-media {
|
||||
|
||||
.export-range input[type='datetime-local'] {
|
||||
padding: 4px 6px;
|
||||
border: 1px solid var(--outline-variant);
|
||||
border: 1px solid var(--outline-medium);
|
||||
border-radius: 6px;
|
||||
background: var(--surface-container-lowest);
|
||||
color: var(--on-surface);
|
||||
color: var(--surface-text);
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
@@ -6958,7 +6958,7 @@ video.lightbox-media {
|
||||
align-items: center;
|
||||
gap: var(--spacing-s);
|
||||
padding: var(--spacing-xs) var(--spacing-xxs);
|
||||
border-bottom: 1px solid var(--outline-faint, var(--outline-medium));
|
||||
border-bottom: 1px solid var(--outline-light, var(--outline-medium));
|
||||
}
|
||||
|
||||
.space-room:last-child {
|
||||
@@ -7571,7 +7571,7 @@ video.lightbox-media {
|
||||
border: 0;
|
||||
border-radius: var(--corner-radius-small);
|
||||
background: transparent;
|
||||
color: var(--on-surface-variant, inherit);
|
||||
color: var(--surface-variant-text, inherit);
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
@@ -7583,7 +7583,7 @@ video.lightbox-media {
|
||||
|
||||
.emoji-tab.active {
|
||||
background: var(--surface-container-highest);
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
}
|
||||
|
||||
.emoji-search {
|
||||
@@ -7594,7 +7594,7 @@ video.lightbox-media {
|
||||
padding: 6px 10px;
|
||||
border-radius: var(--corner-radius-small);
|
||||
background: var(--surface-container-lowest, rgba(0, 0, 0, 0.25));
|
||||
color: var(--on-surface-variant, inherit);
|
||||
color: var(--surface-variant-text, inherit);
|
||||
}
|
||||
|
||||
.emoji-search input {
|
||||
@@ -7603,7 +7603,7 @@ video.lightbox-media {
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
@@ -7611,7 +7611,7 @@ video.lightbox-media {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
border-top: 1px solid var(--outline-variant);
|
||||
border-top: 1px solid var(--outline-medium);
|
||||
}
|
||||
|
||||
.emoji-body .emoji-scroll {
|
||||
@@ -7649,7 +7649,7 @@ video.lightbox-media {
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
color: var(--on-surface-variant, inherit);
|
||||
color: var(--surface-variant-text, inherit);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
transition: border-radius 0.12s;
|
||||
@@ -7674,7 +7674,7 @@ video.lightbox-media {
|
||||
flex: none;
|
||||
min-height: 48px;
|
||||
padding: 6px 12px;
|
||||
border-top: 1px solid var(--outline-variant);
|
||||
border-top: 1px solid var(--outline-medium);
|
||||
background: var(--surface-container, rgba(0, 0, 0, 0.15));
|
||||
}
|
||||
|
||||
@@ -7858,7 +7858,7 @@ video.lightbox-media {
|
||||
|
||||
.bufferlist-events:hover {
|
||||
background: var(--surface-container-highest);
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
}
|
||||
|
||||
/* The events pane and the create panel: Discord's dark rounded sheet. */
|
||||
@@ -7916,7 +7916,7 @@ video.lightbox-media {
|
||||
}
|
||||
|
||||
.event-card {
|
||||
border: 1px solid var(--outline-variant, var(--outline-medium));
|
||||
border: 1px solid var(--outline-medium, var(--outline-medium));
|
||||
border-radius: var(--corner-radius);
|
||||
background: var(--surface-container);
|
||||
overflow: hidden;
|
||||
@@ -7960,7 +7960,7 @@ video.lightbox-media {
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background: var(--surface-container-highest);
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
@@ -7978,7 +7978,7 @@ video.lightbox-media {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 16px;
|
||||
border-top: 1px solid var(--outline-variant, var(--outline-medium));
|
||||
border-top: 1px solid var(--outline-medium, var(--outline-medium));
|
||||
}
|
||||
|
||||
.event-card-where {
|
||||
@@ -7996,7 +7996,7 @@ video.lightbox-media {
|
||||
border: 0;
|
||||
border-radius: var(--corner-radius-small);
|
||||
background: var(--surface-container-highest);
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
font: inherit;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
@@ -8096,7 +8096,7 @@ video.lightbox-media {
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 20px;
|
||||
border-top: 1px solid var(--outline-variant, var(--outline-medium));
|
||||
border-top: 1px solid var(--outline-medium, var(--outline-medium));
|
||||
background: var(--surface-container);
|
||||
}
|
||||
|
||||
@@ -8167,7 +8167,7 @@ video.lightbox-media {
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 14px 20px 18px;
|
||||
border-top: 1px solid var(--outline-variant, var(--outline-medium));
|
||||
border-top: 1px solid var(--outline-medium, var(--outline-medium));
|
||||
background: var(--surface-container);
|
||||
}
|
||||
|
||||
@@ -8189,7 +8189,7 @@ video.lightbox-media {
|
||||
border: 0;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
@@ -8227,7 +8227,7 @@ video.lightbox-media {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
font: inherit;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
@@ -8260,7 +8260,7 @@ video.lightbox-media {
|
||||
|
||||
.live-event-join:disabled {
|
||||
background: var(--surface-container-highest);
|
||||
color: var(--on-surface-variant, inherit);
|
||||
color: var(--surface-variant-text, inherit);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@@ -8462,7 +8462,7 @@ video.lightbox-media {
|
||||
flex: none;
|
||||
border-radius: 50%;
|
||||
background: var(--primary);
|
||||
color: var(--on-primary, #fff);
|
||||
color: var(--primary-text, #fff);
|
||||
}
|
||||
|
||||
/* --- formatting in the message box ------------------------------------- */
|
||||
@@ -8527,7 +8527,7 @@ video.lightbox-media {
|
||||
|
||||
.format-button:hover {
|
||||
background: var(--surface-container-highest, var(--outline-medium));
|
||||
color: var(--on-surface, inherit);
|
||||
color: var(--surface-text, inherit);
|
||||
}
|
||||
|
||||
.format-colours {
|
||||
|
||||
+114
-8
@@ -44,15 +44,55 @@
|
||||
than as an alarm - which a warm colour here would. */
|
||||
--notice: #40e0d0;
|
||||
--notice-tint: rgba(64, 224, 208, 0.1);
|
||||
--surface-hover: rgba(66, 71, 78, 0.08);
|
||||
--surface-pressed: rgba(66, 71, 78, 0.12);
|
||||
--surface-selected: rgba(66, 71, 78, 0.15);
|
||||
/* A pointer over something, pressing it, and the one that is chosen.
|
||||
Light laid over whatever surface is underneath rather than a colour of
|
||||
their own, so they read the same on the sidebar, the list and a menu.
|
||||
They used to be the surface-variant grey at 8% - three levels of
|
||||
brightness on the sidebar, which is to say not visible. */
|
||||
--surface-hover: rgba(255, 255, 255, 0.05);
|
||||
--surface-pressed: rgba(255, 255, 255, 0.07);
|
||||
--surface-selected: rgba(255, 255, 255, 0.09);
|
||||
|
||||
--error: #f2b8b5;
|
||||
--warning: #ff9800;
|
||||
--info: #2196f3;
|
||||
--success: #4caf50;
|
||||
|
||||
/* Red that means red: something destroyed, a mention waiting, a call
|
||||
being refused. --error is the pale pink for text that went wrong, which
|
||||
is not a colour anything can be filled with. */
|
||||
--danger: #da373c;
|
||||
--danger-hover: #a12828;
|
||||
/* Red as text or an outline on a dark surface, where the fill red is too
|
||||
dim to read. */
|
||||
--danger-text: #f23f43;
|
||||
--mention: var(--danger);
|
||||
/* A message that names you: amber, so it is never mistaken for the blue
|
||||
of selection, of a jump target or of your own reaction. */
|
||||
--mention-row: rgba(250, 168, 26, 0.08);
|
||||
--mention-edge: #f0b232;
|
||||
/* Someone talking, and something live. */
|
||||
--speaking: #23a55a;
|
||||
--live: #3ba55d;
|
||||
--go: #248046;
|
||||
--go-hover: #1a6334;
|
||||
|
||||
/* Text on a coloured fill or over a picture, where the theme's own text
|
||||
colour would vanish. */
|
||||
--on-accent: #ffffff;
|
||||
/* Behind video and pictures: black, whatever the theme. */
|
||||
--media-backdrop: #000000;
|
||||
/* What is behind a dialog, and the darker one behind a picture. */
|
||||
--scrim: rgba(0, 0, 0, 0.6);
|
||||
--scrim-strong: rgba(0, 0, 0, 0.85);
|
||||
/* A control laid over a picture or a video. */
|
||||
--overlay-control: rgba(255, 255, 255, 0.12);
|
||||
--outline-hover: rgba(140, 145, 153, 0.35);
|
||||
|
||||
/* Timestamps, reply previews, system lines: there, but quieter than
|
||||
anything anybody said. Labels keep the brighter --surface-variant-text. */
|
||||
--text-muted: #949ba4;
|
||||
|
||||
/*
|
||||
* Bubble mode. Green for what you said, blue for what everyone else did.
|
||||
*
|
||||
@@ -80,17 +120,58 @@
|
||||
--spacing-l: 16px;
|
||||
--spacing-xl: 24px;
|
||||
|
||||
/* Text. Picture-sized glyphs (an emoji shown large, a code to copy) and
|
||||
miniatures (the chips inside a folder tile) keep their own sizes. */
|
||||
--font-size-xxs: 10px;
|
||||
--font-size-xs: 11px;
|
||||
--font-size-small: 12px;
|
||||
--font-size-compact: 13px;
|
||||
--font-size-medium: 14px;
|
||||
--font-size-large: 16px;
|
||||
--font-size-xlarge: 20px;
|
||||
|
||||
--weight-regular: 400;
|
||||
--weight-medium: 500;
|
||||
--weight-semibold: 600;
|
||||
--weight-bold: 700;
|
||||
|
||||
--icon-size: 24px;
|
||||
--icon-size-small: 16px;
|
||||
--icon-size-large: 32px;
|
||||
|
||||
--corner-radius: 12px;
|
||||
--corner-radius-small: 8px;
|
||||
--radius-xs: 4px;
|
||||
--radius-pill: 999px;
|
||||
--radius-bubble: 18px;
|
||||
|
||||
/* How long things take to move. Fast for anything under the pointer,
|
||||
the middle one for something opening, slow for a fill or a fade that
|
||||
should be noticed. */
|
||||
--motion-fast: 120ms;
|
||||
--motion: 200ms;
|
||||
--motion-slow: 400ms;
|
||||
--ease: cubic-bezier(0.2, 0, 0, 1);
|
||||
|
||||
/* Elevation: a chip or tooltip, a menu or popover, a dialog - and the one
|
||||
that casts upwards, for things that open above what opened them. */
|
||||
--shadow-1: 0 2px 10px rgba(0, 0, 0, 0.4);
|
||||
--shadow-2: 0 8px 28px rgba(0, 0, 0, 0.5);
|
||||
--shadow-3: 0 16px 48px rgba(0, 0, 0, 0.55);
|
||||
--shadow-up: 0 -6px 24px rgba(0, 0, 0, 0.4);
|
||||
|
||||
/* What sits above what, lowest first, in one place. Numbers inside a
|
||||
component (1, 2, 3...) stack its own parts and are left where they are. */
|
||||
--z-raised: 40;
|
||||
--z-popover: 60;
|
||||
--z-dialog: 60;
|
||||
--z-notice: 70;
|
||||
--z-lightbox: 200;
|
||||
--z-menu: 1000;
|
||||
--z-picker: 1500;
|
||||
--z-sheet: 1600;
|
||||
--z-toast: 2000;
|
||||
--z-call: 2100;
|
||||
|
||||
--font-family: 'Inter Variable', 'Inter', system-ui, -apple-system, sans-serif;
|
||||
--font-mono: 'Fira Code', ui-monospace, 'SF Mono', Menlo, monospace;
|
||||
@@ -205,11 +286,11 @@ a:hover {
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--outline-strong);
|
||||
border-radius: 4px;
|
||||
border-radius: var(--radius-xs);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(140, 145, 153, 0.35);
|
||||
background: var(--outline-hover);
|
||||
}
|
||||
|
||||
/* --- Shared primitives ------------------------------------------------ */
|
||||
@@ -238,12 +319,12 @@ a:hover {
|
||||
}
|
||||
|
||||
.icon-button:hover {
|
||||
background: var(--primary-hover-light);
|
||||
background: var(--surface-hover);
|
||||
color: var(--surface-text);
|
||||
}
|
||||
|
||||
.icon-button:active {
|
||||
background: var(--primary-pressed);
|
||||
background: var(--surface-pressed);
|
||||
}
|
||||
|
||||
.icon-button[disabled] {
|
||||
@@ -277,7 +358,7 @@ a:hover {
|
||||
border-radius: var(--corner-radius-small);
|
||||
background: var(--primary);
|
||||
color: var(--primary-text);
|
||||
font-weight: 500;
|
||||
font-weight: var(--weight-medium);
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
@@ -313,3 +394,28 @@ a:hover {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* --- Focus and motion, everywhere ------------------------------------ */
|
||||
|
||||
/* A ring for whoever is using the keyboard, and nobody else: a click does
|
||||
not draw one. Text fields mark focus with their border instead. */
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.text-field:focus-visible,
|
||||
[contenteditable]:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Asked for less motion: nothing slides, fades or grows. Animations that
|
||||
mean "still working" keep their own reduced versions, next to them. */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
transition-duration: 0s !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user