update
This commit is contained in:
@@ -84,6 +84,10 @@ function injectStyles(doc) {
|
|||||||
html[data-theme="dark"] body {
|
html[data-theme="dark"] body {
|
||||||
background: #1c1f26;
|
background: #1c1f26;
|
||||||
color: var(--ink, #e6e8ee);
|
color: var(--ink, #e6e8ee);
|
||||||
|
}
|
||||||
|
/* Callouts haben hartkodierte helle Hintergründe (#e8f4ea u. ä.) */
|
||||||
|
html[data-theme="dark"] .callout {
|
||||||
|
background: var(--bg-soft, #23262e);
|
||||||
}`
|
}`
|
||||||
style.textContent = `@media screen {
|
style.textContent = `@media screen {
|
||||||
${portrait}
|
${portrait}
|
||||||
|
|||||||
@@ -118,4 +118,6 @@ DARKMODE (PFLICHT)
|
|||||||
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
||||||
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
||||||
Hintergrundfarbe behalten.
|
Hintergrundfarbe behalten.
|
||||||
|
- Callout-/Infobox-Hintergründe nicht hartkodieren oder im Dunkelmodus
|
||||||
|
explizit abdunkeln (z. B. auf var(--bg-soft)); farbige Border bleibt.
|
||||||
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
||||||
|
|||||||
@@ -157,4 +157,6 @@ DARKMODE (PFLICHT)
|
|||||||
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
||||||
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
||||||
Hintergrundfarbe behalten.
|
Hintergrundfarbe behalten.
|
||||||
|
- Callout-/Infobox-Hintergründe nicht hartkodieren oder im Dunkelmodus
|
||||||
|
explizit abdunkeln (z. B. auf var(--bg-soft)); farbige Border bleibt.
|
||||||
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
||||||
|
|||||||
@@ -771,5 +771,6 @@ The app toggles dark mode by setting `data-theme="dark"` on `<html>` inside its
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Do NOT use `prefers-color-scheme` — the app controls the attribute.
|
- Do NOT use `prefers-color-scheme` — the app controls the attribute.
|
||||||
|
- Do not hardcode callout/infobox backgrounds — or darken them explicitly in the dark block (e.g. to `var(--bg-soft)`); the colored border stays.
|
||||||
- Keep dark rules inside `@media screen` only, so WeasyPrint/PDF renders the light theme.
|
- Keep dark rules inside `@media screen` only, so WeasyPrint/PDF renders the light theme.
|
||||||
- Elements with light text on accent backgrounds (table headers, cover) may keep their light-theme background.
|
- Elements with light text on accent backgrounds (table headers, cover) may keep their light-theme background.
|
||||||
|
|||||||
@@ -162,4 +162,6 @@ DARKMODE (PFLICHT)
|
|||||||
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
||||||
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
||||||
Hintergrundfarbe behalten.
|
Hintergrundfarbe behalten.
|
||||||
|
- Callout-/Infobox-Hintergründe nicht hartkodieren oder im Dunkelmodus
|
||||||
|
explizit abdunkeln (z. B. auf var(--bg-soft)); farbige Border bleibt.
|
||||||
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
||||||
|
|||||||
@@ -110,4 +110,6 @@ DARKMODE (PFLICHT)
|
|||||||
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
Links auf dunklem Grund lesbar bleiben (Kontrast prüfen). Elemente mit hellem
|
||||||
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
Text auf Akzent-Hintergrund (z. B. Tabellenköpfe) dürfen ihre helle
|
||||||
Hintergrundfarbe behalten.
|
Hintergrundfarbe behalten.
|
||||||
|
- Callout-/Infobox-Hintergründe nicht hartkodieren oder im Dunkelmodus
|
||||||
|
explizit abdunkeln (z. B. auf var(--bg-soft)); farbige Border bleibt.
|
||||||
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
- Nur innerhalb von @media screen — Druck/PDF bleibt unverändert hell.
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
--bg-soft: #23262e;
|
--bg-soft: #23262e;
|
||||||
}
|
}
|
||||||
html[data-theme="dark"] body { background: #15171c; }
|
html[data-theme="dark"] body { background: #15171c; }
|
||||||
|
html[data-theme="dark"] .callout { background: var(--bg-soft); }
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
--bg-soft: #23262e;
|
--bg-soft: #23262e;
|
||||||
}
|
}
|
||||||
html[data-theme="dark"] body { background: #15171c; }
|
html[data-theme="dark"] body { background: #15171c; }
|
||||||
|
html[data-theme="dark"] .callout { background: var(--bg-soft); }
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
--bg-soft: #23262e;
|
--bg-soft: #23262e;
|
||||||
}
|
}
|
||||||
html[data-theme="dark"] body { background: #15171c; }
|
html[data-theme="dark"] body { background: #15171c; }
|
||||||
|
html[data-theme="dark"] .callout { background: var(--bg-soft); }
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
--bg-soft: #23262e;
|
--bg-soft: #23262e;
|
||||||
}
|
}
|
||||||
html[data-theme="dark"] body { background: #15171c; }
|
html[data-theme="dark"] body { background: #15171c; }
|
||||||
|
html[data-theme="dark"] .callout { background: var(--bg-soft); }
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
--bg-soft: #23262e;
|
--bg-soft: #23262e;
|
||||||
}
|
}
|
||||||
html[data-theme="dark"] body { background: #15171c; }
|
html[data-theme="dark"] body { background: #15171c; }
|
||||||
|
html[data-theme="dark"] .callout { background: var(--bg-soft); }
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
|||||||
Reference in New Issue
Block a user