@dita-viewer/core 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/styles/TOKENS.md CHANGED
@@ -1,38 +1,38 @@
1
- # Host tokens
2
-
3
- `dita-content.css` does not know which application shows the rendered DITA. It
4
- reads the custom properties below; the host defines them on the element that
5
- carries the content (`:host` for a Shadow DOM, `:root` for a document).
6
-
7
- | Token | Meaning |
8
- | --- | --- |
9
- | `--dita-fg` | Body text colour |
10
- | `--dita-fg-muted` | Secondary text (shortdesc, captions, hints) |
11
- | `--dita-bg` | Page background |
12
- | `--dita-bg-elevated` | Background of floating chrome (menus, toasts) |
13
- | `--dita-border` | Rules, table borders, dividers |
14
- | `--dita-focus` | Focus ring and progress accent |
15
- | `--dita-hover-bg` | Hover / highlighted row background |
16
- | `--dita-selected-fg` | Text on a selected row |
17
- | `--dita-link` | Link colour |
18
- | `--dita-code-bg` | Code block background |
19
- | `--dita-code-inline-bg` | Inline code and language-label background |
20
- | `--dita-font` | Body font family |
21
-
22
- Every use inside the stylesheet carries a fallback, so a host that defines only
23
- some tokens still renders legibly.
24
-
25
- ## The palette
26
-
27
- Callouts, profiling highlights, index chips and conref tints use `--color-*`
28
- variables (`--color-note-bg`, `--color-warning-border`, `--color-profiling-bg`,
29
- …). The stylesheet ships light and dark defaults for them. A host may redefine
30
- any of them; deriving them from its own palette (for example with `color-mix`
31
- against `--dita-bg`) is what makes them follow the active theme, in both light
32
- and dark, without a per-theme list.
33
-
34
- ## Dark mode
35
-
36
- Hosts that cannot express a colour as a function of their own variables may use
37
- the scheme switch: `.vscode-dark` on the document root, or
38
- `data-scheme="dark"` on a Shadow DOM host.
1
+ # Host tokens
2
+
3
+ `dita-content.css` does not know which application shows the rendered DITA. It
4
+ reads the custom properties below; the host defines them on the element that
5
+ carries the content (`:host` for a Shadow DOM, `:root` for a document).
6
+
7
+ | Token | Meaning |
8
+ | --- | --- |
9
+ | `--dita-fg` | Body text colour |
10
+ | `--dita-fg-muted` | Secondary text (shortdesc, captions, hints) |
11
+ | `--dita-bg` | Page background |
12
+ | `--dita-bg-elevated` | Background of floating chrome (menus, toasts) |
13
+ | `--dita-border` | Rules, table borders, dividers |
14
+ | `--dita-focus` | Focus ring and progress accent |
15
+ | `--dita-hover-bg` | Hover / highlighted row background |
16
+ | `--dita-selected-fg` | Text on a selected row |
17
+ | `--dita-link` | Link colour |
18
+ | `--dita-code-bg` | Code block background |
19
+ | `--dita-code-inline-bg` | Inline code and language-label background |
20
+ | `--dita-font` | Body font family |
21
+
22
+ Every use inside the stylesheet carries a fallback, so a host that defines only
23
+ some tokens still renders legibly.
24
+
25
+ ## The palette
26
+
27
+ Callouts, profiling highlights, index chips and conref tints use `--color-*`
28
+ variables (`--color-note-bg`, `--color-warning-border`, `--color-profiling-bg`,
29
+ …). The stylesheet ships light and dark defaults for them. A host may redefine
30
+ any of them; deriving them from its own palette (for example with `color-mix`
31
+ against `--dita-bg`) is what makes them follow the active theme, in both light
32
+ and dark, without a per-theme list.
33
+
34
+ ## Dark mode
35
+
36
+ Hosts that cannot express a colour as a function of their own variables may use
37
+ the scheme switch: `.vscode-dark` on the document root, or
38
+ `data-scheme="dark"` on a Shadow DOM host.