diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 60917c36..6d1b2b2c 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -391,11 +391,32 @@ behavior is in [Registries](areas/registries.md).
Blazor Server (**Interactive Server** render mode, applied at the `App`
root — no WebAssembly, no Auto mode) with **MudBlazor** as the component
-library, plus a hand-rolled CSS design-system layer
-(`wwwroot\app.css`, light/dark via a `.dug-dark` class) on top of it.
+library, plus a hand-rolled CSS token layer (`wwwroot\app.css`) on top of it.
Pages, routes and what each page shows or triggers are specified in
[Web UI](areas/web-ui.md).
+- **Design tokens** (`wwwroot\app.css`) are the `--dug-*` custom properties
+ for colors, radii, fonts and the transition. The light values sit in
+ `:root`; the dark values sit in one block with the selector
+ `:is(.dug-dark, :root:has(.dug-dark))`, which applies while the layout
+ carries `dug-dark` and reaches the whole document, so menus, popovers and
+ dialogs that MudBlazor renders beside the layout take the dark values too
+ ([decision 0077](decisions/0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md)).
+ Every rule outside the two token blocks uses tokens only, with no blur,
+ gradient or drop shadow.
+- **Fonts** are self-hosted from `wwwroot\fonts` and declared with
+ `@font-face` and `font-display: swap`: Inter for text and Space Grotesk
+ (variable latin subset, with its SIL Open Font License text) for page
+ titles, entity names and figures. `App.razor` preloads both files; the
+ page loads no font or style from another host.
+- **MudBlazor theme** is the private `_theme` of `MainLayout`; it mirrors
+ the tokens: a 6 px default radius, the Inter stack as default font with
+ Space Grotesk for headings `h1`–`h4`, 14 px text with a line height of
+ 1.45, both palettes with the token colors, the page ground color as
+ contrast text of the dark status colors, and all 26 elevation shadows set
+ to `none`
+ ([decision 0078](decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md)).
+
- **Pages** (`Components\Pages`) have one `@page` route each.
- **`IApplicationViewService` (`UI\ApplicationViewService`)** is the single
facade every page depends on. It maps `DockerUpdateGuard.Data` entities
diff --git a/docs/areas/web-ui.md b/docs/areas/web-ui.md
index 53bc3375..6605f700 100644
--- a/docs/areas/web-ui.md
+++ b/docs/areas/web-ui.md
@@ -173,6 +173,16 @@ never their values.
- If the browser storage cannot be read or written, the toggle still works for the session and the choice is not
remembered.
- Users who ask their system for reduced motion get (practically) no transitions or animations.
+- Both themes are flat and come from one set of design values with a light and a dark variant: opaque surfaces
+ with a 1 px hairline border, no blur, gradient or drop shadow (including the shadows MudBlazor draws under tables,
+ the drawer and filled buttons), and no lift, scaling or shadow when a card, link or button is hovered or pressed.
+ Menus, popovers (tooltips excepted) and dialogs are separated from the content by a hairline border; dialogs and snackbars also keep the drop shadow MudBlazor's own stylesheet gives them.
+- In the dark theme the dark values apply to the whole document, so menus, popovers and dialogs are dark too.
+- Text and status labels keep a contrast of at least 4.5:1 against their background in both themes; filled status
+ chips and buttons of the dark theme draw their label in the dark page color.
+- Text is set in Inter; page titles, entity names, the figures of the dashboard's metric cards and the product name
+ are set in Space Grotesk. Both fonts and the styles are served by the application itself; the browser loads
+ nothing from another host for them, and until a font has loaded the text shows in a fallback font.
### Secrets
@@ -258,6 +268,10 @@ never their values.
missing record or a failed load inline.
- [0060](../decisions/0060-a-detail-page-acts-only-on-the-state-of-its-current-route.md) — A detail page
acts only on the state of its current route.
+- [0077](../decisions/0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md) — The dark
+ theme's tokens apply to the whole document while the layout is dark.
+- [0078](../decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) — MudBlazor elevation
+ shadows are switched off in the theme.
## Not here
diff --git a/docs/decisions/0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md b/docs/decisions/0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md
new file mode 100644
index 00000000..5a14c513
--- /dev/null
+++ b/docs/decisions/0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md
@@ -0,0 +1,38 @@
+# 0077: The dark theme's tokens apply to the whole document while the layout is dark
+
+- **Status:** Accepted
+- **Date:** 2026-11-28
+- **Area:** Web UI
+- **Source:** Issue #451
+- **Supersedes:** —
+
+## Context
+
+The dark theme sets the class `dug-dark` on the layout element, and `app.css` overrides the `--dug-*` tokens under
+that class. MudBlazor renders menus, popovers and dialogs in providers that sit beside the layout, not inside it
+(`Components/Layout/MainLayout.razor`), and the page body is outside it too, so their tokens resolve to the light
+values while the rest of the page is dark. Once the flat refresh colors these surfaces from the tokens, a muted text in
+the top bar's compact menu would read 2.9:1 on the dark surface. The class must stay on the layout: the layout tests
+and the toggle rely on it ([Web UI](../areas/web-ui.md#light-and-dark-mode)).
+
+## Options considered
+
+1. **The dark token block also matches the document root while it contains the dark layout (chosen)** — one selector
+ in `app.css`, no markup or script; the body and every provider inherit the dark values. It needs `:has()`
+ (all current browsers); wrapped in the forgiving `:is()`, an older browser keeps at least the dark layout.
+2. **Carry the class to an element that wraps the providers and the layout** — works for the providers, but changes
+ the layout's markup and where the class sits, and leaves the body light.
+3. **Set the class on `` through JavaScript interop** — reaches everything, but adds a script no unit test
+ covers, a second source of the theme state and a flash before the call runs.
+
+## Decision
+
+The dark token block's selector is `:is(.dug-dark, :root:has(.dug-dark))`, so the dark values apply to the whole
+document while the layout carries `dug-dark`; the class stays on the layout. Theme switching itself is unchanged
+([Web UI](../areas/web-ui.md#light-and-dark-mode)).
+
+## Consequences
+
+Later sub-issues of #450 may color any surface, also one MudBlazor renders outside the layout, from the tokens. A
+browser without `:has()` shows the dark layout with light menus and dialogs. Moving the theme state off the layout
+element would make this selector obsolete.
diff --git a/docs/decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md b/docs/decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md
new file mode 100644
index 00000000..a164539e
--- /dev/null
+++ b/docs/decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md
@@ -0,0 +1,36 @@
+# 0078: MudBlazor elevation shadows are switched off in the theme
+
+- **Status:** Accepted
+- **Date:** 2026-11-28
+- **Area:** Web UI
+- **Source:** Issue #451
+- **Supersedes:** —
+
+## Context
+
+The flat refresh (#450) draws no shadows: panels are separated by hairlines. Besides the shadows of `app.css`,
+MudBlazor draws its own: every surface with an elevation above zero (each table, the dashboard's hero panel, the
+drawer) takes it from the theme's elevation levels, and filled buttons carry shadows written into MudBlazor's
+stylesheet. Menus and popovers use the same elevation levels to stand out from the content below; dialogs and snackbars carry shadows written into MudBlazor's stylesheet. The pages
+themselves are rebuilt only in later sub-issues, so this one may not change their markup.
+
+## Options considered
+
+1. **Every elevation level of the theme is `none`, filled buttons lose their shadow in `app.css`, and menus,
+ popovers and dialogs get a hairline border (chosen)** — one place for all present and future surfaces, checkable
+ in the theme; floating layers are separated the flat way.
+2. **Override the shadow of each affected surface in `app.css`** — keeps the shadows of floating layers, but is a list
+ every new component of the later sub-issues must extend.
+3. **Set `Elevation="0"` on each surface in the markup** — about twenty edits in pages this sub-issue must not
+ change, and filled buttons keep their shadow.
+
+## Decision
+
+The MudBlazor theme sets all of its elevation levels to `none`; `app.css` removes the shadow of filled buttons in
+every state and borders menus, popovers and dialogs with the border token
+([Web UI](../areas/web-ui.md#light-and-dark-mode)).
+
+## Consequences
+
+No component can show a shadow through its elevation any more; one that needs to stand out gets a border. A MudBlazor
+update that adds literal shadows to another component needs a rule in `app.css`.
diff --git a/docs/decisions/README.md b/docs/decisions/README.md
index 1563d0d8..c3479c23 100644
--- a/docs/decisions/README.md
+++ b/docs/decisions/README.md
@@ -137,4 +137,6 @@ once in the [area document](../areas/README.md) of the record's area, and the re
| [0074](0074-a-docker-engine-stats-or-image-inspect-answer-that-is-not-a-json-object-is-an-invalid-response.md) | A Docker Engine stats or image inspect answer that is not a JSON object is an invalid response | Accepted | 2026-11-28 |
| [0075](0075-a-docker-engine-container-list-or-image-history-that-is-not-a-json-array-is-an-invalid-response.md) | A Docker Engine container list or image history that is not a JSON array is an invalid response | Accepted | 2026-11-28 |
| [0076](0076-the-dotnet-release-index-is-parsed-as-a-remote-json-object-and-an-entry-that-is-not-one-is-left-out.md) | The .NET release index is parsed as a remote JSON object, and an entry that is not one is left out | Accepted | 2026-11-28 |
+| [0077](0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md) | The dark theme's tokens apply to the whole document while the layout is dark | Accepted | 2026-11-28 |
+| [0078](0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) | MudBlazor elevation shadows are switched off in the theme | Accepted | 2026-11-28 |
\ No newline at end of file
diff --git a/src/DockerUpdateGuard/Components/App.razor b/src/DockerUpdateGuard/Components/App.razor
index 8513ee7d..5f0c8d13 100644
--- a/src/DockerUpdateGuard/Components/App.razor
+++ b/src/DockerUpdateGuard/Components/App.razor
@@ -6,6 +6,7 @@
+
diff --git a/src/DockerUpdateGuard/Components/Layout/MainLayout.razor.cs b/src/DockerUpdateGuard/Components/Layout/MainLayout.razor.cs
index 49c9c65e..07c3da7d 100644
--- a/src/DockerUpdateGuard/Components/Layout/MainLayout.razor.cs
+++ b/src/DockerUpdateGuard/Components/Layout/MainLayout.razor.cs
@@ -27,10 +27,25 @@ public sealed partial class MainLayout : LayoutComponentBase, IDisposable
///
private const string DarkModeStorageKey = "dug-dark-mode";
+ ///
+ /// Contrast text of the dark status colors, the page ground color of the dark theme
+ ///
+ private const string DarkContrastText = "#0F1216";
+
#endregion // Constants
#region Fields
+ ///
+ /// Font stack of text, the same as --dug-font-text in app.css
+ ///
+ private static readonly string[] _textFonts = ["Inter", "Segoe UI", "Arial", "Helvetica", "sans-serif"];
+
+ ///
+ /// Font stack of titles and figures, the same as --dug-font-display in app.css
+ ///
+ private static readonly string[] _displayFonts = ["Space Grotesk", "Inter", "Segoe UI", "Arial", "sans-serif"];
+
///
/// Application theme
///
@@ -38,37 +53,107 @@ public sealed partial class MainLayout : LayoutComponentBase, IDisposable
{
LayoutProperties = new LayoutProperties
{
- DefaultBorderRadius = "18px",
+ DefaultBorderRadius = "6px",
},
+ Shadows = new Shadow
+ {
+ Elevation = [.. Enumerable.Repeat("none", 26)],
+ },
+ Typography = new Typography
+ {
+ Default = new DefaultTypography
+ {
+ FontFamily = _textFonts,
+ FontSize = ".875rem",
+ LineHeight = "1.45",
+ FontWeight = "400",
+ },
+ Body1 = new Body1Typography
+ {
+ FontFamily = _textFonts,
+ FontSize = ".875rem",
+ LineHeight = "1.45",
+ FontWeight = "400",
+ },
+ H1 = new H1Typography
+ {
+ FontFamily = _displayFonts,
+ },
+ H2 = new H2Typography
+ {
+ FontFamily = _displayFonts,
+ },
+ H3 = new H3Typography
+ {
+ FontFamily = _displayFonts,
+ FontSize = "1.75rem",
+ FontWeight = "600",
+ LetterSpacing = "-0.02em",
+ LineHeight = "1.2",
+ },
+ H4 = new H4Typography
+ {
+ FontFamily = _displayFonts,
+ FontSize = "1.25rem",
+ FontWeight = "600",
+ LetterSpacing = "0",
+ LineHeight = "1.3",
+ },
+ H5 = new H5Typography
+ {
+ FontSize = ".9375rem",
+ FontWeight = "600",
+ LetterSpacing = "0",
+ LineHeight = "1.4",
+ },
+ },
PaletteLight = new PaletteLight
{
- Primary = "#2563eb",
- Secondary = "#0891b2",
- Info = "#0284c7",
- Success = "#15803d",
- Warning = "#b45309",
- Error = "#b91c1c",
- Background = "#f3f6fb",
- Surface = "#ffffff",
- AppbarBackground = "rgba(255,255,255,0.82)",
- DrawerBackground = "#0f172a",
- DrawerText = "#e2e8f0",
+ Primary = "#2563EB",
+ Secondary = "#5B6471",
+ Info = "#1D4ED8",
+ Success = "#067647",
+ Warning = "#B54708",
+ Error = "#B42318",
+ Background = "#F6F7F9",
+ Surface = "#FFFFFF",
+ AppbarBackground = "#FFFFFF",
+ DrawerBackground = "#FFFFFF",
+ DrawerText = "#16191D",
+ TextPrimary = "#16191D",
+ TextSecondary = "#5B6471",
+ Divider = "#E3E6EB",
+ LinesDefault = "#E3E6EB",
+ TableLines = "#EEF0F3",
+ LinesInputs = "#C9CED6",
+ TableHover = "#FAFBFC",
},
PaletteDark = new PaletteDark
{
- Primary = "#3b82f6",
- Secondary = "#22d3ee",
- Info = "#38bdf8",
- Success = "#4ade80",
- Warning = "#fbbf24",
- Error = "#f87171",
- Background = "#0b1220",
- Surface = "#111a2e",
- AppbarBackground = "rgba(15, 23, 42, 0.82)",
- DrawerBackground = "#0b1220",
- DrawerText = "#e2e8f0",
- TextPrimary = "#e2e8f0",
- TextSecondary = "#94a3b8",
+ Primary = "#7AA7FF",
+ Secondary = "#9BA5B3",
+ Info = "#9CC0FF",
+ Success = "#5FD39A",
+ Warning = "#F2A54A",
+ Error = "#FF8A80",
+ PrimaryContrastText = DarkContrastText,
+ SecondaryContrastText = DarkContrastText,
+ InfoContrastText = DarkContrastText,
+ SuccessContrastText = DarkContrastText,
+ WarningContrastText = DarkContrastText,
+ ErrorContrastText = DarkContrastText,
+ Background = "#0F1216",
+ Surface = "#171B21",
+ AppbarBackground = "#171B21",
+ DrawerBackground = "#171B21",
+ DrawerText = "#E7EAEE",
+ TextPrimary = "#E7EAEE",
+ TextSecondary = "#9BA5B3",
+ Divider = "#272D36",
+ LinesDefault = "#272D36",
+ TableLines = "#20262E",
+ LinesInputs = "#3A424E",
+ TableHover = "#1B2027",
},
};
diff --git a/src/DockerUpdateGuard/wwwroot/app.css b/src/DockerUpdateGuard/wwwroot/app.css
index 930aaacd..712169ae 100644
--- a/src/DockerUpdateGuard/wwwroot/app.css
+++ b/src/DockerUpdateGuard/wwwroot/app.css
@@ -6,88 +6,110 @@
font-display: swap;
}
-:root {
- --dug-primary: #2563eb;
- --dug-primary-strong: #1d4ed8;
- --dug-secondary: #0891b2;
- --dug-bg-page: #f3f6fb;
- --dug-surface: rgba(255, 255, 255, 0.82);
- --dug-surface-solid: #ffffff;
- --dug-border: rgba(148, 163, 184, 0.2);
- --dug-text: #0f172a;
- --dug-text-muted: #475569;
- --dug-text-faint: #64748b;
- --dug-success: #15803d;
- --dug-warning: #b45309;
- --dug-danger: #b91c1c;
- --dug-info: #0284c7;
- --dug-sev-critical: #dc2626;
- --dug-sev-high: #ea580c;
- --dug-sev-medium: #0284c7;
- --dug-sev-low: #15803d;
- --dug-radius-lg: 1.5rem;
- --dug-radius-md: 1rem;
- --dug-shadow-card: 0 20px 45px rgba(15, 23, 42, 0.08);
- --dug-shadow-hover: 0 24px 48px rgba(15, 23, 42, 0.14);
- --dug-blur: blur(12px);
- --dug-transition: 0.18s ease;
- --dug-bg-gradient:
- radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 24rem),
- radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 22rem),
- linear-gradient(180deg, #eef4ff 0%, #f8fafc 35%, #f3f6fb 100%);
-}
-
-.dug-dark {
- --dug-bg-page: #0b1220;
- --dug-surface: rgba(17, 26, 46, 0.82);
- --dug-surface-solid: #111a2e;
- --dug-border: rgba(148, 163, 184, 0.16);
- --dug-text: #e2e8f0;
- --dug-text-muted: #94a3b8;
- --dug-text-faint: #64748b;
- --dug-shadow-card: 0 20px 45px rgba(0, 0, 0, 0.35);
- --dug-shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.45);
- --dug-bg-gradient:
- radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 24rem),
- radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 22rem),
- linear-gradient(180deg, #0b1220 0%, #0d1526 35%, #0b1220 100%);
-}
-
-.dug-dark .mud-paper.app-topbar {
- background: rgba(17, 26, 46, 0.72);
-}
-
-.dug-dark .app-topbar__meta-card {
- background: rgba(17, 26, 46, 0.78);
-}
-
-.dug-dark .hero-panel {
- background:
- linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.16)),
- rgba(17, 26, 46, 0.92);
-}
-
-.dug-dark .section-paper--accent {
- background:
- linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.1)),
- rgba(17, 26, 46, 0.92);
-}
-
-.dug-dark .metric-card--warning {
- background:
- linear-gradient(135deg, rgba(180, 83, 9, 0.22), rgba(17, 26, 46, 0.9)),
- rgba(17, 26, 46, 0.92);
+@font-face {
+ font-family: "Space Grotesk";
+ src: url("fonts/SpaceGrotesk-Variable-latin.woff2") format("woff2");
+ font-weight: 300 700;
+ font-style: normal;
+ font-display: swap;
}
-.dug-dark .metric-card--danger {
- background:
- linear-gradient(135deg, rgba(185, 28, 28, 0.2), rgba(17, 26, 46, 0.9)),
- rgba(17, 26, 46, 0.92);
+:root {
+ --dug-bg-page: #F6F7F9;
+ --dug-surface: #FFFFFF;
+ --dug-surface-solid: #FFFFFF;
+ --dug-surface-subtle: #FAFBFC;
+ --dug-border: #E3E6EB;
+ --dug-border-inner: #EEF0F3;
+ --dug-border-control: #C9CED6;
+ --dug-text: #16191D;
+ --dug-text-muted: #5B6471;
+ --dug-text-faint: #5B6471;
+ --dug-icon: #3D4551;
+ --dug-primary: #2563EB;
+ --dug-on-primary: #FFFFFF;
+ --dug-link: #1D4ED8;
+ --dug-attention: #B54708;
+ --dug-danger: #B42318;
+ --dug-success: #067647;
+ --dug-info: #1D4ED8;
+ --dug-sev-critical: #7A1C12;
+ --dug-sev-high: #D9480F;
+ --dug-sev-medium: #E8A33D;
+ --dug-sev-low: #C9CED6;
+ --dug-scan-succeeded: #9FB3C8;
+ --dug-scan-partial: #E8A33D;
+ --dug-scan-failed: #7A1C12;
+ --dug-chip-critical-bg: #7A1C12;
+ --dug-chip-critical-fg: #FFFFFF;
+ --dug-chip-high-bg: #FFF1E6;
+ --dug-chip-high-fg: #9A3D00;
+ --dug-chip-medium-bg: #FDF3D7;
+ --dug-chip-medium-fg: #7A5200;
+ --dug-chip-low-bg: #EEF0F3;
+ --dug-chip-low-fg: #3D4551;
+ --dug-chip-success-bg: #E6F4EC;
+ --dug-chip-success-fg: #05603A;
+ --dug-chip-info-bg: #E8EFFD;
+ --dug-chip-info-fg: #1D4ED8;
+ --dug-chart-cpu: #2563EB;
+ --dug-chart-cpu-fill: #E8EFFD;
+ --dug-chart-memory: #6D4AC4;
+ --dug-chart-memory-fill: #EFEAFA;
+ --dug-chart-net-rx: #0F766E;
+ --dug-chart-net-tx: #B54708;
+ --dug-radius-lg: 8px;
+ --dug-radius-md: 6px;
+ --dug-radius-sm: 4px;
+ --dug-font-text: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
+ --dug-font-display: "Space Grotesk", Inter, "Segoe UI", Arial, sans-serif;
+ --dug-transition: 0.18s ease;
}
-.dug-dark .section-table .mud-table-container {
- background: rgba(17, 26, 46, 0.88);
- border-color: rgba(148, 163, 184, 0.18);
+:is(.dug-dark, :root:has(.dug-dark)) {
+ --dug-bg-page: #0F1216;
+ --dug-surface: #171B21;
+ --dug-surface-solid: #171B21;
+ --dug-surface-subtle: #1B2027;
+ --dug-border: #272D36;
+ --dug-border-inner: #20262E;
+ --dug-border-control: #3A424E;
+ --dug-text: #E7EAEE;
+ --dug-text-muted: #9BA5B3;
+ --dug-text-faint: #9BA5B3;
+ --dug-icon: #C5CCD6;
+ --dug-primary: #7AA7FF;
+ --dug-on-primary: #0F1216;
+ --dug-link: #7AA7FF;
+ --dug-attention: #F2A54A;
+ --dug-danger: #FF8A80;
+ --dug-success: #5FD39A;
+ --dug-info: #9CC0FF;
+ --dug-sev-critical: #FF7B72;
+ --dug-sev-high: #E0762B;
+ --dug-sev-medium: #A67C1F;
+ --dug-sev-low: #4A5361;
+ --dug-scan-succeeded: #46566B;
+ --dug-scan-partial: #E0A23D;
+ --dug-scan-failed: #FF7B72;
+ --dug-chip-critical-bg: #FF7B72;
+ --dug-chip-critical-fg: #1A0B0A;
+ --dug-chip-high-bg: #3A2413;
+ --dug-chip-high-fg: #FFB877;
+ --dug-chip-medium-bg: #3A3013;
+ --dug-chip-medium-fg: #F0CF7A;
+ --dug-chip-low-bg: #272D36;
+ --dug-chip-low-fg: #C5CCD6;
+ --dug-chip-success-bg: #12301F;
+ --dug-chip-success-fg: #7BD8A4;
+ --dug-chip-info-bg: #172A4D;
+ --dug-chip-info-fg: #9CC0FF;
+ --dug-chart-cpu: #7AA7FF;
+ --dug-chart-cpu-fill: #172A4D;
+ --dug-chart-memory: #A98BEB;
+ --dug-chart-memory-fill: #2A2145;
+ --dug-chart-net-rx: #4FD1C5;
+ --dug-chart-net-tx: #F2A54A;
}
html,
@@ -99,7 +121,9 @@ body {
margin: 0;
background: var(--dug-bg-page);
color: var(--dug-text);
- font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
+ font-family: var(--dug-font-text);
+ font-size: 0.875rem;
+ line-height: 1.45;
}
a {
@@ -108,7 +132,7 @@ a {
.app-layout {
min-height: 100vh;
- background: var(--dug-bg-gradient);
+ background: var(--dug-bg-page);
}
.app-drawer {
@@ -117,10 +141,10 @@ a {
.app-drawer .mud-drawer-content {
padding: 1.75rem 1.25rem 1.5rem;
- color: #e2e8f0;
- background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
+ color: var(--dug-text);
+ background: var(--dug-surface);
border-right: 1px solid var(--dug-border);
- box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
+ box-shadow: none;
}
.app-drawer-content {
@@ -132,21 +156,21 @@ a {
height: 3rem;
flex: 0 0 auto;
border-radius: 0.9rem;
- box-shadow: 0 10px 25px rgba(14, 165, 233, 0.25);
}
.app-brand__title {
min-width: fit-content;
- color: #f8fafc;
+ color: var(--dug-text);
+ font-family: var(--dug-font-display);
font-size: clamp(1.15rem, 1.2rem + 0.3vw, 1.35rem);
- font-weight: 800;
+ font-weight: 600;
letter-spacing: -0.02em;
white-space: nowrap;
overflow-wrap: normal;
}
.app-nav-shell {
- color: #e2e8f0;
+ color: var(--dug-text);
display: flex;
flex: 1 1 auto;
flex-direction: column;
@@ -164,7 +188,7 @@ a {
}
.nav-section-label {
- color: rgba(191, 219, 254, 0.72);
+ color: var(--dug-text-muted);
padding-inline: 0.75rem;
}
@@ -175,23 +199,25 @@ a {
.app-nav-menu .mud-nav-link {
margin-bottom: 0.35rem;
padding: 1rem 1.05rem;
- color: #e2e8f0;
+ color: var(--dug-text);
border: 1px solid transparent;
border-radius: var(--dug-radius-md);
- transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.app-nav-menu .mud-nav-link:hover {
- color: #ffffff;
- background: linear-gradient(rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.12)), #0f172a;
- border-color: rgba(191, 219, 254, 0.12);
- transform: translateX(2px);
+ color: var(--dug-text);
+ background: var(--dug-surface-subtle);
}
-.app-nav-menu .mud-nav-link.active {
- background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(6, 182, 212, 0.18));
- border-color: rgba(125, 211, 252, 0.22);
- box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.08);
+.mud-navmenu.app-nav-menu .mud-nav-link.active:not(.mud-nav-link-disabled),
+.mud-navmenu.app-nav-menu .mud-nav-link.active:not(.mud-nav-link-disabled):hover:not(.mud-nav-link-disabled),
+.mud-navmenu.app-nav-menu .mud-nav-link.active:not(.mud-nav-link-disabled):focus-visible:not(.mud-nav-link-disabled),
+.mud-navmenu.app-nav-menu .mud-nav-link.active:not(.mud-nav-link-disabled):active:not(.mud-nav-link-disabled) {
+ color: var(--dug-text);
+ font-weight: 600 !important;
+ background: var(--dug-surface-subtle);
+ border-color: transparent;
+ box-shadow: none;
}
.app-nav-menu .mud-nav-link-icon {
@@ -209,7 +235,7 @@ a {
}
.app-version__label {
- color: #bfdbfe;
+ color: var(--dug-text-muted);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
@@ -217,7 +243,7 @@ a {
.app-version__value {
margin-top: 0.2rem;
- color: rgba(226, 232, 240, 0.88);
+ color: var(--dug-text);
font-size: 0.78rem;
}
@@ -226,7 +252,10 @@ a {
}
.mud-paper.app-topbar {
- background: rgba(255, 255, 255, 0.72);
+ background: var(--dug-surface);
+ border: 1px solid var(--dug-border);
+ border-radius: var(--dug-radius-lg);
+ box-shadow: none;
}
.app-topbar {
@@ -235,10 +264,6 @@ a {
z-index: 1100;
margin: 1.5rem 1.5rem 0.75rem;
padding: 0.9rem 1.35rem;
- backdrop-filter: blur(12px);
- border: 1px solid var(--dug-border);
- border-radius: var(--dug-radius-lg);
- box-shadow: var(--dug-shadow-card);
}
.app-topbar__content {
@@ -262,6 +287,7 @@ a {
.app-topbar__title {
color: var(--dug-text);
+ font-family: var(--dug-font-display);
}
.app-topbar__menu-button {
@@ -286,7 +312,7 @@ a {
.app-topbar__meta-card {
min-width: 9rem;
flex: 0 1 auto;
- background: rgba(255, 255, 255, 0.78);
+ background: var(--dug-surface-subtle);
}
.app-topbar__status {
@@ -343,15 +369,6 @@ a {
gap: 1.25rem;
}
-.page-header h1,
-.hero-panel h1,
-.empty-state-panel h1 {
- margin: 0;
- font-size: clamp(1.8rem, 2.4vw, 2.6rem);
- font-weight: 750;
- letter-spacing: -0.03em;
-}
-
.page-description,
.hero-description,
.section-description,
@@ -371,32 +388,13 @@ a {
.empty-state-panel,
.summary-card {
background: var(--dug-surface);
- backdrop-filter: blur(10px);
border: 1px solid var(--dug-border);
border-radius: var(--dug-radius-lg);
- box-shadow: var(--dug-shadow-card);
-}
-
-.hero-panel,
-.section-paper--accent {
- position: relative;
- overflow: hidden;
-}
-
-.hero-panel::before,
-.section-paper--accent::before {
- content: "";
- position: absolute;
- inset: 0 0 auto 0;
- height: 3px;
- background: linear-gradient(90deg, var(--dug-primary), var(--dug-secondary));
+ box-shadow: none;
}
.hero-panel {
padding: 2rem;
- background:
- linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(14, 165, 233, 0.08)),
- rgba(255, 255, 255, 0.9);
}
.hero-meta-card,
@@ -423,8 +421,8 @@ a {
}
.metric-card--warning .metric-card__icon {
- background: color-mix(in srgb, var(--dug-warning) 14%, transparent);
- color: var(--dug-warning);
+ background: color-mix(in srgb, var(--dug-attention) 14%, transparent);
+ color: var(--dug-attention);
}
.metric-card--danger .metric-card__icon {
@@ -432,6 +430,14 @@ a {
color: var(--dug-danger);
}
+.metric-card--warning .metric-value {
+ color: var(--dug-attention);
+}
+
+.metric-card--danger .metric-value {
+ color: var(--dug-danger);
+}
+
.metric-card-link {
display: block;
height: 100%;
@@ -447,48 +453,34 @@ a {
.summary-card,
.app-nav-menu .mud-nav-link,
.mud-button-root {
- transition: transform var(--dug-transition), box-shadow var(--dug-transition), border-color var(--dug-transition), background-color var(--dug-transition);
-}
-
-.metric-card-link:hover .metric-card,
-.metric-card-link:focus-visible .metric-card {
- transform: translateY(-2px);
- border-color: rgba(37, 99, 235, 0.35);
- box-shadow: var(--dug-shadow-hover);
+ transition: border-color var(--dug-transition), background-color var(--dug-transition);
}
-.metric-card:hover,
-.summary-card:hover,
-.app-nav-menu .mud-nav-link:hover,
-.mud-button-root:hover {
- box-shadow: var(--dug-shadow-hover);
+.metric-card-link:hover .metric-card {
+ border-color: var(--dug-border-control);
}
-.metric-card:active,
-.summary-card:active,
-.app-nav-menu .mud-nav-link:active,
-.mud-button-root:active {
- transform: scale(0.99);
+.metric-card-link:focus-visible .metric-card {
+ outline: 2px solid var(--dug-primary);
+ outline-offset: 2px;
}
-.metric-card:focus-visible,
-.summary-card:focus-visible,
.app-nav-menu .mud-nav-link:focus-visible,
.mud-button-root:focus-visible {
outline: 2px solid var(--dug-primary);
outline-offset: 2px;
}
-.metric-card--warning {
- background:
- linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.88)),
- rgba(255, 255, 255, 0.92);
+.mud-button-filled,
+.mud-button-filled:hover,
+.mud-button-filled:active,
+.mud-button-filled:focus-visible {
+ box-shadow: none;
}
-.metric-card--danger {
- background:
- linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(255, 255, 255, 0.88)),
- rgba(255, 255, 255, 0.92);
+.mud-popover:not(.mud-tooltip),
+.mud-dialog {
+ border: 1px solid var(--dug-border);
}
.metric-label {
@@ -500,9 +492,10 @@ a {
.metric-value {
display: block;
margin-top: 0.5rem;
+ font-family: var(--dug-font-display);
font-size: clamp(1.5rem, 5vw, 1.95rem);
font-variant-numeric: tabular-nums;
- font-weight: 750;
+ font-weight: 600;
letter-spacing: -0.03em;
}
@@ -510,22 +503,10 @@ a {
padding: 1.5rem 1.6rem;
}
-.section-paper--accent {
- background:
- linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.05)),
- rgba(255, 255, 255, 0.92);
-}
-
.section-header {
margin-bottom: 1.25rem;
}
-.section-header h2 {
- margin: 0;
- font-size: 1.2rem;
- font-weight: 700;
-}
-
.summary-grid {
gap: 1rem;
}
@@ -554,11 +535,7 @@ a {
}
.summary-remediation--warning {
- color: var(--dug-warning);
-}
-
-.dug-dark .summary-remediation--warning {
- color: #f59e0b;
+ color: var(--dug-attention);
}
.summary-card__detail-toggle.mud-button-root {
@@ -606,12 +583,13 @@ a {
}
.table-link {
- color: var(--dug-primary-strong);
+ color: var(--dug-link);
font-weight: 600;
}
.table-link:hover {
- color: #1e40af;
+ color: var(--dug-link);
+ text-decoration: underline;
}
.table-secondary {
@@ -635,12 +613,13 @@ a {
.section-table .mud-table-container {
border-radius: var(--dug-radius-md);
- border: 1px solid rgba(226, 232, 240, 0.92);
- background: rgba(255, 255, 255, 0.88);
+ border: 1px solid var(--dug-border);
+ background: var(--dug-surface);
}
.section-table .mud-table-head .mud-table-cell {
color: var(--dug-text-muted);
+ border-bottom: 1px solid var(--dug-border);
font-size: 0.8rem;
font-weight: 700;
letter-spacing: 0.05em;
@@ -707,7 +686,7 @@ a {
}
.runtime-containers-table .runtime-containers-table__name-icon-link:hover {
- color: var(--dug-primary-strong);
+ color: var(--dug-link);
}
.runtime-containers-table .runtime-containers-table__name-icon {
@@ -735,19 +714,19 @@ a {
}
.runtime-containers-table .runtime-containers-table__sparkline-line--cpu {
- stroke: var(--dug-primary);
+ stroke: var(--dug-chart-cpu);
}
.runtime-containers-table .runtime-containers-table__sparkline-line--memory {
- stroke: #7c3aed;
+ stroke: var(--dug-chart-memory);
}
.runtime-containers-table .runtime-containers-table__sparkline-line--network-rx {
- stroke: var(--dug-secondary);
+ stroke: var(--dug-chart-net-rx);
}
.runtime-containers-table .runtime-containers-table__sparkline-line--network-tx {
- stroke: #ea580c;
+ stroke: var(--dug-chart-net-tx);
}
.details-grid {
@@ -797,10 +776,9 @@ a {
display: block;
margin-bottom: 0.75rem;
padding: 0.9rem 1rem;
- background: var(--dug-surface-solid);
+ background: var(--dug-surface);
border: 1px solid var(--dug-border);
border-radius: var(--dug-radius-md);
- box-shadow: var(--dug-shadow-card);
}
.section-table .mud-table-body .mud-table-cell {
@@ -842,22 +820,6 @@ a {
.dug-chart {
height: 240px;
}
-
- .section-table .mud-table-body .mud-table-row.dug-rail-critical {
- box-shadow: var(--dug-shadow-card), inset 3px 0 0 var(--dug-sev-critical);
- }
-
- .section-table .mud-table-body .mud-table-row.dug-rail-high {
- box-shadow: var(--dug-shadow-card), inset 3px 0 0 var(--dug-sev-high);
- }
-
- .section-table .mud-table-body .mud-table-row.dug-rail-medium {
- box-shadow: var(--dug-shadow-card), inset 3px 0 0 var(--dug-sev-medium);
- }
-
- .section-table .mud-table-body .mud-table-row.dug-rail-low {
- box-shadow: var(--dug-shadow-card), inset 3px 0 0 var(--dug-sev-low);
- }
}
@media (max-width: 599.98px) {
@@ -924,4 +886,4 @@ a {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
}
-}
+}
\ No newline at end of file
diff --git a/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-OFL.txt b/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-OFL.txt
new file mode 100644
index 00000000..d5666d70
--- /dev/null
+++ b/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2020 The Space Grotesk Project Authors (https://github.com/floriankarsten/space-grotesk)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-Variable-latin.woff2 b/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-Variable-latin.woff2
new file mode 100644
index 00000000..0f3474ee
Binary files /dev/null and b/src/DockerUpdateGuard/wwwroot/fonts/SpaceGrotesk-Variable-latin.woff2 differ
diff --git a/src/Tests/DockerUpdateGuard.Tests/AppStylesheetTests.cs b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetTests.cs
new file mode 100644
index 00000000..ef5909ca
--- /dev/null
+++ b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetTests.cs
@@ -0,0 +1,866 @@
+using System.Reflection;
+using System.Text.RegularExpressions;
+
+using DockerUpdateGuard.Tests.Helper;
+
+namespace DockerUpdateGuard.Tests;
+
+///
+/// Tests for the shipped stylesheet wwwroot/app.css: tokens, banned constructs, fonts and the rules of the flat refresh
+///
+[TestClass]
+public class AppStylesheetTests
+{
+ #region Constants
+
+ ///
+ /// Selector of the dark token block: it reaches the document root while the layout is dark
+ ///
+ private const string DarkBlockSelector = ":is(.dug-dark, :root:has(.dug-dark))";
+
+ ///
+ /// Minimum contrast of a text against its background (WCAG AA for normal text)
+ ///
+ private const double MinimumContrast = 4.5;
+
+ ///
+ /// Shipped stylesheet below the host project directory
+ ///
+ private const string StylesheetPath = "wwwroot/app.css";
+
+ ///
+ /// Value of a panel's hairline border
+ ///
+ private const string HairlineBorder = "1px solid var(--dug-border)";
+
+ ///
+ /// Media context of the card layout of table rows
+ ///
+ private const string RowCardContext = "@media (max-width: 959.98px)";
+
+ #endregion // Constants
+
+ #region Fields
+
+ ///
+ /// Tokens of issue #451 section 1: name, light value, dark value (null when the table gives none)
+ ///
+ private static readonly (string Name, string Light, string? Dark)[] _tokens = [
+ ("--dug-bg-page", "#F6F7F9", "#0F1216"),
+ ("--dug-surface", "#FFFFFF", "#171B21"),
+ ("--dug-surface-solid", "#FFFFFF", "#171B21"),
+ ("--dug-surface-subtle", "#FAFBFC", "#1B2027"),
+ ("--dug-border", "#E3E6EB", "#272D36"),
+ ("--dug-border-inner", "#EEF0F3", "#20262E"),
+ ("--dug-border-control", "#C9CED6", "#3A424E"),
+ ("--dug-text", "#16191D", "#E7EAEE"),
+ ("--dug-text-muted", "#5B6471", "#9BA5B3"),
+ ("--dug-text-faint", "#5B6471", "#9BA5B3"),
+ ("--dug-icon", "#3D4551", "#C5CCD6"),
+ ("--dug-primary", "#2563EB", "#7AA7FF"),
+ ("--dug-on-primary", "#FFFFFF", "#0F1216"),
+ ("--dug-link", "#1D4ED8", "#7AA7FF"),
+ ("--dug-attention", "#B54708", "#F2A54A"),
+ ("--dug-danger", "#B42318", "#FF8A80"),
+ ("--dug-success", "#067647", "#5FD39A"),
+ ("--dug-info", "#1D4ED8", "#9CC0FF"),
+ ("--dug-sev-critical", "#7A1C12", "#FF7B72"),
+ ("--dug-sev-high", "#D9480F", "#E0762B"),
+ ("--dug-sev-medium", "#E8A33D", "#A67C1F"),
+ ("--dug-sev-low", "#C9CED6", "#4A5361"),
+ ("--dug-scan-succeeded", "#9FB3C8", "#46566B"),
+ ("--dug-scan-partial", "#E8A33D", "#E0A23D"),
+ ("--dug-scan-failed", "#7A1C12", "#FF7B72"),
+ ("--dug-chart-cpu", "#2563EB", "#7AA7FF"),
+ ("--dug-chart-cpu-fill", "#E8EFFD", "#172A4D"),
+ ("--dug-chart-memory", "#6D4AC4", "#A98BEB"),
+ ("--dug-chart-memory-fill", "#EFEAFA", "#2A2145"),
+ ("--dug-chart-net-rx", "#0F766E", "#4FD1C5"),
+ ("--dug-chart-net-tx", "#B54708", "#F2A54A"),
+ ("--dug-radius-lg", "8px", null),
+ ("--dug-radius-md", "6px", null),
+ ("--dug-radius-sm", "4px", null),
+ ("--dug-font-text", "Inter, \"Segoe UI\", Arial, Helvetica, sans-serif", null),
+ ("--dug-font-display", "\"Space Grotesk\", Inter, \"Segoe UI\", Arial, sans-serif", null),
+ ("--dug-transition", "0.18s ease", null),
+ ];
+
+ ///
+ /// Chip tokens of issue #451 section 1: chip name, light background, light text, dark background, dark text
+ ///
+ private static readonly (string Chip, string LightBackground, string LightText, string DarkBackground, string DarkText)[] _chips = [
+ ("critical", "#7A1C12", "#FFFFFF", "#FF7B72", "#1A0B0A"),
+ ("high", "#FFF1E6", "#9A3D00", "#3A2413", "#FFB877"),
+ ("medium", "#FDF3D7", "#7A5200", "#3A3013", "#F0CF7A"),
+ ("low", "#EEF0F3", "#3D4551", "#272D36", "#C5CCD6"),
+ ("success", "#E6F4EC", "#05603A", "#12301F", "#7BD8A4"),
+ ("info", "#E8EFFD", "#1D4ED8", "#172A4D", "#9CC0FF"),
+ ];
+
+ ///
+ /// Text tokens whose contrast is checked on each ground
+ ///
+ private static readonly string[] _textTokens = [
+ "--dug-text",
+ "--dug-text-muted",
+ "--dug-text-faint",
+ "--dug-icon",
+ "--dug-primary",
+ "--dug-link",
+ "--dug-attention",
+ "--dug-danger",
+ "--dug-success",
+ "--dug-info",
+ ];
+
+ ///
+ /// Ground tokens text is drawn on
+ ///
+ private static readonly string[] _groundTokens = [
+ "--dug-bg-page",
+ "--dug-surface",
+ "--dug-surface-subtle",
+ ];
+
+ ///
+ /// Tokens removed by the refresh
+ ///
+ private static readonly string[] _removedTokens = [
+ "--dug-secondary",
+ "--dug-primary-strong",
+ "--dug-warning",
+ "--dug-shadow-card",
+ "--dug-shadow-hover",
+ "--dug-blur",
+ "--dug-bg-gradient",
+ ];
+
+ ///
+ /// Properties that take a color
+ ///
+ private static readonly Regex _colorPropertyPattern = new("^(color|background|background-color|border|border-(top|right|bottom|left)(-color)?|border-color|outline|outline-color|fill|stroke|text-decoration|text-decoration-color|caret-color|accent-color|column-rule)$",
+ RegexOptions.CultureInvariant,
+ TimeSpan.FromSeconds(5));
+
+ ///
+ /// Color notations and hexadecimal colors a rule outside the token blocks may not carry
+ ///
+ private static readonly Regex _colorLiteralPattern = new(@"#[0-9a-fA-F]{3,8}\b|\b(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(",
+ RegexOptions.CultureInvariant,
+ TimeSpan.FromSeconds(5));
+
+ ///
+ /// Named colors a color property of a rule outside the token blocks may not carry
+ ///
+ private static readonly Regex _namedColorPattern = new("(?
+ /// Box shadow declaration of a stylesheet
+ ///
+ private static readonly Regex _boxShadowPattern = new(@"box-shadow\s*:\s*([^;}]+)",
+ RegexOptions.CultureInvariant,
+ TimeSpan.FromSeconds(5));
+
+ ///
+ /// An http(s) address or a protocol-relative url() target
+ ///
+ private static readonly Regex _externalAddressPattern = new(@"https?://|url\(\s*[""']?//",
+ RegexOptions.CultureInvariant | RegexOptions.IgnoreCase,
+ TimeSpan.FromSeconds(5));
+
+ #endregion // Fields
+
+ #region Static methods
+
+ ///
+ /// Contrast pairs of both themes: theme, text token, ground token
+ ///
+ /// Rows of theme, text token and ground token
+ public static IEnumerable