@spicainternational/forge-styles 0.1.0 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,57 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.0
3
+ ## [0.2.0] - 2026-12-03
4
+
5
+ ### Added
6
+
7
+ - Selected tokens, the brand tint of the current or chosen item: `--forge-selected-tint` (16%),
8
+ `--forge-selected-tint-hover` (24%), `--forge-selected-bg` and `--forge-selected-bg-hover` (the brand at those
9
+ percentages mixed into `--forge-surface-container-lowest`, opaque) and `--forge-selected-text`.
10
+ - `.forge-group-label`, the label of a group of items in a list or menu: 12px uppercase, medium weight, primary
11
+ color, 16px line, with the new `--forge-letter-spacing-caps` (`0.03em`) so capitals don't read squashed.
12
+ - `components/app-switcher.css`: the app switcher's discover preview Markdown (`.forge-app-switcher-flyout-text`)
13
+ at body size, paragraphs and lists alike, with its block spacing.
14
+
15
+ ### Changed
16
+
17
+ - A `<p>` is body text: forge.css no longer gives paragraphs the long-form size (16px), so they take the size around
18
+ them, 14px in the UI, like the lists next to them. Long-form reading opts in with `.forge-content`, which now uses
19
+ `--forge-content-base` and `--forge-content-line-height` for everything inside.
20
+ - `.forge-eyebrow` has a 16px line (`1rem`, was 1.5, 18px at 12px), on the 4px grid.
21
+ - `.forge-field-label` has a 20px line (`1.25rem`, was the body's 22.4px), on the 4px grid. A `<label>` without a
22
+ class is in the primary text color (was secondary), like a field label.
23
+ - Body text has a 1.6 line height (22.4px at 14px, was 1.5) and `-0.01em` letter-spacing, through the new
24
+ `--forge-line-height-body` and `--forge-letter-spacing-body`. Code (`pre`, `code`, `kbd`, `samp`) keeps the mono
25
+ font's own spacing. Components whose text inherits the body line height grow by about 1px per line. Table cells
26
+ (`th`, `td`) take `--forge-line-height-snug` (1.35) instead, so tables get more compact than before. Checkbox,
27
+ radio and switch labels (`.forge-check`) keep a 20px line, so the text stays centered on the input.
28
+ - The page's top row lines up with the side bar's: a `.forge-page-top` pads 8px above and none below (was 12px both),
29
+ so the first page header starts 16px from the window's top, as the content does from the side, and sits 16px above
30
+ the content (the body's padding; was 28px), as a page header inside the body does. `.forge-page-bottom` pads 8px
31
+ (was 12px), 16px from the window's bottom. The card appearance takes the page's 8px gap as its margin on every
32
+ side (was 16px top and start, 8px end and bottom). Product home in forge-angular moves its logo to match.
33
+ - Same role, same size:
34
+ - `.forge-linkref` has a field's corners, `--forge-radius-sm` (was md), as `.forge-input`.
35
+ - The callout's close button has `.forge-icon-button`'s corners, `--forge-radius-md` (was sm), and its focus ring
36
+ sits 2px off it (was 1px).
37
+ - A disabled `.forge-chip` is drawn at `--forge-opacity-disabled` without hover (it had no disabled style).
38
+ - Disabled menu items, tabs and select options show the `not-allowed` cursor (was `default`), as buttons do.
39
+ - `.forge-skeleton--button` is as tall as a button (`--forge-control-height-md`, 36px, was 32px) with its sm
40
+ corners (was md); `.forge-skeleton--avatar` is 2rem, forge-avatar's default (same size, no raw px).
41
+ - The danger button's fill is darkened to L 0.57, as the danger badge's (was 0.58).
42
+ - The callout close button's hover takes the hover layer's 8% of its text color (was 12%).
43
+ - Focus rings: the legacy table-actions dropdown item draws an inset outline (was a `box-shadow` ring, which
44
+ forced colors drop); `.forge-tag-remove`'s ring is inset at -2px in the strong ring color (was at 0); the
45
+ callout link's ring takes `--forge-radius-sm` corners (was 2px).
46
+ - The pressed `.forge-chip` and the active `.forge-filter-pill` take the selected tokens. Their text is a little darker
47
+ (the brand mixed 70% instead of 75% toward the primary text): it was 4.4:1 on the hovered tint over white, now at
48
+ least 4.5:1.
49
+ - Headings have a line height on the 4px grid for each size (28/36, 24/32, 20/28, 16/24, 14/20) instead of 1.25:
50
+ `--forge-heading-line-height` is the heading's size plus 6px, rounded up to 4px, so it follows any size override.
51
+ `.forge-page-title`, `.forge-section-title` and `.forge-subsection-title` take it too. Browsers without CSS `round()`
52
+ keep 1.25.
53
+
54
+ ## [0.1.0] - 2026-11-27
4
55
 
5
56
  First release. `forge.css` (tokens, light and dark themes, reset, base, layout, components, utilities) and its fonts
6
57
  (Inter, Roboto Mono), until now copied by hand from the showcase.
@@ -9,5 +60,24 @@ First release. `forge.css` (tokens, light and dark themes, reset, base, layout,
9
60
  - `forge-tokens.json`: the tokens as data, `{ source, root, dark }` (until now shipped by forge-devextreme).
10
61
  - The callout's styles (`.forge-callout`, `--caution`, `--critical` and its parts), the first component in the
11
62
  package; the markup is in the README.
63
+ - The secondary button is gray with no border: rest `--forge-surface-container`, hover a ghost button's hover on the
64
+ page (`--forge-surface-container-highest` in light, `-high` in dark, set by the dark theme).
65
+ `--forge-button-secondary-bg` and `--forge-button-secondary-bg-hover` retune it for a context; `.forge-inset` rests
66
+ it on `-high` and hovers it to `-highest`, `.forge-overlay-content` hovers it to `-highest`.
67
+ - Native select (`select.forge-input`): the library's chevron (Font Awesome regular chevron-down, 12px) instead of
68
+ the system arrow, in every browser (`--forge-select-chevron`, a light and a dark copy). In Chromium 135+
69
+ (`appearance: base-select`) the picker is a Forge overlay with menu rows, a primary checkmark on the selected option,
70
+ opening below and flipping above when it doesn't fit (max 16rem). Firefox and Safari keep the system picker. List
71
+ boxes (`multiple`, `size`) mark selected rows with a primary tint.
72
+ - The icon beside a button's label is `--forge-icon-sm` (14px) in both sizes, until now `1em` of the font size: the
73
+ same in a default button, 2px larger in a small one (`--sm`, was 12px).
74
+ - The icon-only button (`.forge-button--icon`) is a square the size of `.forge-icon-button`: 28px
75
+ (`--forge-icon-button-md`), 22px with `--sm` (`--forge-icon-button-sm`), no padding. It kept a label's 12px side
76
+ padding and took about 40px by 27px, too wide for a row's actions.
77
+ - A Font Awesome icon (`fa-icon`) now takes its component's icon token. Its svg stayed `1em` of the font size, Font
78
+ Awesome's own CSS winning over the component's: the icon button's icon was 14px, now `--forge-icon-md` (16px), the
79
+ pill's 12px, now `--forge-icon-sm` (14px), the list link's 14px, now `--forge-icon-lg` (20px).
12
80
  - The `forge-dx-hacks` layer moved to `@spicainternational/forge-devextreme` (`css/forge-dx.css`); the layer keeps its
13
81
  place in the order statement.
82
+ - The table actions panel (`.forge-table-actions-panel`, its deprecated `.dropdown-item` and `.dropdown-divider`
83
+ items) and the open row in the legacy SDS table, moved here from forge-angular's component styles (`::ng-deep`).
package/README.md CHANGED
@@ -64,7 +64,7 @@ hue (`brand-hue`); forge-devextreme does that for the DevExtreme theme.
64
64
  ## Components
65
65
 
66
66
  A component's look is a set of classes on documented markup. Variants are modifier classes, states are ARIA or `data-*`
67
- attributes, so any framework can drive them. The Angular components of `@spicainternational/ngx-sds-components` render
67
+ attributes, so any framework can drive them. The Angular components of `@spicainternational/forge-angular` render
68
68
  the same markup.
69
69
 
70
70
  ### Callout
package/forge-tokens.css CHANGED
@@ -23,10 +23,11 @@
23
23
  /* As Material 3: the page ground and a 5-step container scale; components pick a step by use, the same step
24
24
  in both themes, and the scale flips (lowest is the lightest tone in light, the darkest in dark).
25
25
  - surface: the page, the modal
26
- - container-lowest: cards, fields, lists, chips, secondary buttons
26
+ - container-lowest: cards, fields, lists, chips
27
27
  - container-low: panels, the pane
28
- - container: insets, disabled fields
29
- - container-high / -highest: the skeleton only, the primary as text drops below 4.5:1 there in light
28
+ - container: insets, disabled fields, secondary buttons
29
+ - container-high / -highest: the skeleton and the secondary button's fills (ink text) only, the primary as
30
+ text drops below 4.5:1 there in light
30
31
  - bright: anything floating (popups, menus, dropdowns, drawers, DevExtreme popups). As Material 3's
31
32
  surface-bright it doesn't flip: light in light, lighter than the page and the cards in dark. White in light
32
33
  (Material 3 uses the page tone) so a dropdown matches the card it opens from */
@@ -90,6 +91,12 @@
90
91
  --forge-font-weight-medium: 500;
91
92
  --forge-font-weight-bold: 600;
92
93
  --forge-letter-spacing-tight: -0.02em;
94
+ /* UI text (the body, 14px): a little tighter than Inter's own spacing, and 22.4px lines at 14px, as on
95
+ angular.dev. Code keeps the mono font's own spacing */
96
+ --forge-letter-spacing-body: -0.01em;
97
+ /* Uppercase labels: capitals set tight read squashed, so they get room */
98
+ --forge-letter-spacing-caps: 0.03em;
99
+ --forge-line-height-body: 1.6;
93
100
 
94
101
  --forge-size-2xs: 0.6875rem; /* 11px at a 16px root */
95
102
  --forge-size-xs: 0.75rem; /* 12px at a 16px root */
@@ -102,7 +109,10 @@
102
109
  --forge-h3: 1.25rem; /* 20px, .forge-heading-md */
103
110
  --forge-h4: 1rem; /* 16px, .forge-heading-sm */
104
111
  --forge-h5: 0.875rem; /* 14px (body size, bold), .forge-heading-xs; also h6 */
105
- --forge-heading-line-height: 1.25;
112
+ /* The heading's size plus 6px, rounded up to the 4px grid: 28/36, 24/32, 20/28, 16/24, 14/20. The em resolves on
113
+ each heading, so a size override (a class, --forge-heading-size) gets its own line height. Set it on a heading
114
+ to override it (a display title). Without CSS round(), 1.25 (end of this layer) */
115
+ --forge-heading-line-height: round(up, 1em + 0.375rem, 0.25rem);
106
116
  /* Table cells and dense lists */
107
117
  --forge-line-height-snug: 1.35;
108
118
 
@@ -119,8 +129,9 @@
119
129
  --forge-space-6: 2rem;
120
130
 
121
131
  /* -------------------- PRIMARY -------------------- */
122
- /* The system's own color, a blue. Fills with text (primary button, selected segment and day, primary badge),
123
- focus rings and focus borders. The same in every product. White on it 5.4:1, as text on the surface 5:1.
132
+ /* The system's own color, a blue. Fills with text (primary button, selected day, primary badge), focus rings,
133
+ focus borders, the outline-primary segment's border and text. The same in every product. White on it 5.4:1,
134
+ as text on the surface 5:1.
124
135
  Hover and active lower the chroma to stay in the sRGB gamut */
125
136
  --forge-primary: oklch(0.52 var(--forge-primary-chroma) var(--forge-primary-hue));
126
137
  --forge-primary-hover: oklch(0.47 0.106 var(--forge-primary-hue));
@@ -153,6 +164,18 @@
153
164
  --forge-hover-bg: color-mix(in srgb, var(--forge-text-primary) var(--forge-state-hover-opacity), transparent);
154
165
  --forge-active-bg: color-mix(in srgb, var(--forge-text-primary) var(--forge-state-pressed-opacity), transparent);
155
166
 
167
+ /* Selected: a brand tint for the current or chosen item (a pressed filter chip, an active filter pill, the
168
+ side bar's current page). Opaque, the brand mixed into surface-container-lowest, so the item has exactly
169
+ the same color on any surface. The text is the brand mixed toward text-primary, at least 4.5:1 on the tint
170
+ in both themes. Dark mode doesn't redefine them, they follow --forge-brand, --forge-text-primary and
171
+ --forge-surface-container-lowest */
172
+ --forge-selected-tint: 16%;
173
+ --forge-selected-tint-hover: 24%;
174
+ --forge-selected-bg: color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint), var(--forge-surface-container-lowest));
175
+ --forge-selected-bg-hover: color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint-hover), var(--forge-surface-container-lowest));
176
+ /* 70%: at 75% the text fell to 4.4:1 on the hovered tint over white */
177
+ --forge-selected-text: color-mix(in oklab, var(--forge-brand) 70%, var(--forge-text-primary));
178
+
156
179
  --forge-brand-hover: oklch(0.56 0.13 var(--forge-brand-hue));
157
180
  --forge-brand-active: oklch(0.52 0.14 var(--forge-brand-hue));
158
181
 
@@ -231,6 +254,12 @@
231
254
  --forge-cat-8-bg: oklch(0.96 0.02 9.6);
232
255
  --forge-cat-8-text: oklch(0.55 0.15 9.6);
233
256
  }
257
+
258
+ @supports not (line-height: round(up, 1em, 1px)) {
259
+ :root {
260
+ --forge-heading-line-height: 1.25;
261
+ }
262
+ }
234
263
  }
235
264
 
236
265
  /* ============================================================
@@ -319,6 +348,10 @@
319
348
 
320
349
  --forge-danger-hover: oklch(0.71 0.16 31.05);
321
350
  --forge-danger-active: oklch(0.76 0.17 31.05);
351
+
352
+ /* The secondary button's hover is a ghost button's hover on the page: -high in dark (-highest in light, the
353
+ fallback in the button's rule) */
354
+ --forge-button-secondary-bg-hover: var(--forge-surface-container-high);
322
355
  }
323
356
 
324
357
  :root[data-theme="light"],
package/forge-tokens.json CHANGED
@@ -37,6 +37,9 @@
37
37
  "font-weight-medium": "500",
38
38
  "font-weight-bold": "600",
39
39
  "letter-spacing-tight": "-0.02em",
40
+ "letter-spacing-body": "-0.01em",
41
+ "letter-spacing-caps": "0.03em",
42
+ "line-height-body": "1.6",
40
43
  "size-2xs": "0.6875rem",
41
44
  "size-xs": "0.75rem",
42
45
  "size-sm": "0.875rem",
@@ -46,7 +49,7 @@
46
49
  "h3": "1.25rem",
47
50
  "h4": "1rem",
48
51
  "h5": "0.875rem",
49
- "heading-line-height": "1.25",
52
+ "heading-line-height": "round(up, 1em + 0.375rem, 0.25rem)",
50
53
  "line-height-snug": "1.35",
51
54
  "content-base": "1rem",
52
55
  "content-line-height": "1.6",
@@ -71,6 +74,11 @@
71
74
  "state-pressed-opacity": "12%",
72
75
  "hover-bg": "color-mix(in srgb, var(--forge-text-primary) var(--forge-state-hover-opacity), transparent)",
73
76
  "active-bg": "color-mix(in srgb, var(--forge-text-primary) var(--forge-state-pressed-opacity), transparent)",
77
+ "selected-tint": "16%",
78
+ "selected-tint-hover": "24%",
79
+ "selected-bg": "color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint), var(--forge-surface-container-lowest))",
80
+ "selected-bg-hover": "color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint-hover), var(--forge-surface-container-lowest))",
81
+ "selected-text": "color-mix(in oklab, var(--forge-brand) 70%, var(--forge-text-primary))",
74
82
  "brand-hover": "oklch(0.56 0.13 var(--forge-brand-hue))",
75
83
  "brand-active": "oklch(0.52 0.14 var(--forge-brand-hue))",
76
84
  "danger-hover": "oklch(0.62 0.16 31.05)",
@@ -171,6 +179,7 @@
171
179
  "brand-active": "oklch(0.72 0.14 var(--forge-brand-hue))",
172
180
  "brand-text": "oklch(0.74 0.11 var(--forge-brand-hue))",
173
181
  "danger-hover": "oklch(0.71 0.16 31.05)",
174
- "danger-active": "oklch(0.76 0.17 31.05)"
182
+ "danger-active": "oklch(0.76 0.17 31.05)",
183
+ "button-secondary-bg-hover": "var(--forge-surface-container-high)"
175
184
  }
176
185
  }
package/forge.css CHANGED
@@ -304,6 +304,7 @@ when used for hover/active states.
304
304
  samp {
305
305
  font-family: var(--forge-font-mono);
306
306
  font-size: 1em;
307
+ letter-spacing: normal; /* not the body's tighter spacing, drawn for Inter */
307
308
  }
308
309
 
309
310
  pre {
@@ -564,10 +565,11 @@ when used for hover/active states.
564
565
  /* As Material 3: the page ground and a 5-step container scale; components pick a step by use, the same step
565
566
  in both themes, and the scale flips (lowest is the lightest tone in light, the darkest in dark).
566
567
  - surface: the page, the modal
567
- - container-lowest: cards, fields, lists, chips, secondary buttons
568
+ - container-lowest: cards, fields, lists, chips
568
569
  - container-low: panels, the pane
569
- - container: insets, disabled fields
570
- - container-high / -highest: the skeleton only, the primary as text drops below 4.5:1 there in light
570
+ - container: insets, disabled fields, secondary buttons
571
+ - container-high / -highest: the skeleton and the secondary button's fills (ink text) only, the primary as
572
+ text drops below 4.5:1 there in light
571
573
  - bright: anything floating (popups, menus, dropdowns, drawers, DevExtreme popups). As Material 3's
572
574
  surface-bright it doesn't flip: light in light, lighter than the page and the cards in dark. White in light
573
575
  (Material 3 uses the page tone) so a dropdown matches the card it opens from */
@@ -631,6 +633,12 @@ when used for hover/active states.
631
633
  --forge-font-weight-medium: 500;
632
634
  --forge-font-weight-bold: 600;
633
635
  --forge-letter-spacing-tight: -0.02em;
636
+ /* UI text (the body, 14px): a little tighter than Inter's own spacing, and 22.4px lines at 14px, as on
637
+ angular.dev. Code keeps the mono font's own spacing */
638
+ --forge-letter-spacing-body: -0.01em;
639
+ /* Uppercase labels: capitals set tight read squashed, so they get room */
640
+ --forge-letter-spacing-caps: 0.03em;
641
+ --forge-line-height-body: 1.6;
634
642
 
635
643
  --forge-size-2xs: 0.6875rem; /* 11px at a 16px root */
636
644
  --forge-size-xs: 0.75rem; /* 12px at a 16px root */
@@ -643,7 +651,10 @@ when used for hover/active states.
643
651
  --forge-h3: 1.25rem; /* 20px, .forge-heading-md */
644
652
  --forge-h4: 1rem; /* 16px, .forge-heading-sm */
645
653
  --forge-h5: 0.875rem; /* 14px (body size, bold), .forge-heading-xs; also h6 */
646
- --forge-heading-line-height: 1.25;
654
+ /* The heading's size plus 6px, rounded up to the 4px grid: 28/36, 24/32, 20/28, 16/24, 14/20. The em resolves on
655
+ each heading, so a size override (a class, --forge-heading-size) gets its own line height. Set it on a heading
656
+ to override it (a display title). Without CSS round(), 1.25 (end of this layer) */
657
+ --forge-heading-line-height: round(up, 1em + 0.375rem, 0.25rem);
647
658
  /* Table cells and dense lists */
648
659
  --forge-line-height-snug: 1.35;
649
660
 
@@ -660,8 +671,9 @@ when used for hover/active states.
660
671
  --forge-space-6: 2rem;
661
672
 
662
673
  /* -------------------- PRIMARY -------------------- */
663
- /* The system's own color, a blue. Fills with text (primary button, selected segment and day, primary badge),
664
- focus rings and focus borders. The same in every product. White on it 5.4:1, as text on the surface 5:1.
674
+ /* The system's own color, a blue. Fills with text (primary button, selected day, primary badge), focus rings,
675
+ focus borders, the outline-primary segment's border and text. The same in every product. White on it 5.4:1,
676
+ as text on the surface 5:1.
665
677
  Hover and active lower the chroma to stay in the sRGB gamut */
666
678
  --forge-primary: oklch(0.52 var(--forge-primary-chroma) var(--forge-primary-hue));
667
679
  --forge-primary-hover: oklch(0.47 0.106 var(--forge-primary-hue));
@@ -694,6 +706,18 @@ when used for hover/active states.
694
706
  --forge-hover-bg: color-mix(in srgb, var(--forge-text-primary) var(--forge-state-hover-opacity), transparent);
695
707
  --forge-active-bg: color-mix(in srgb, var(--forge-text-primary) var(--forge-state-pressed-opacity), transparent);
696
708
 
709
+ /* Selected: a brand tint for the current or chosen item (a pressed filter chip, an active filter pill, the
710
+ side bar's current page). Opaque, the brand mixed into surface-container-lowest, so the item has exactly
711
+ the same color on any surface. The text is the brand mixed toward text-primary, at least 4.5:1 on the tint
712
+ in both themes. Dark mode doesn't redefine them, they follow --forge-brand, --forge-text-primary and
713
+ --forge-surface-container-lowest */
714
+ --forge-selected-tint: 16%;
715
+ --forge-selected-tint-hover: 24%;
716
+ --forge-selected-bg: color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint), var(--forge-surface-container-lowest));
717
+ --forge-selected-bg-hover: color-mix(in oklab, var(--forge-brand) var(--forge-selected-tint-hover), var(--forge-surface-container-lowest));
718
+ /* 70%: at 75% the text fell to 4.4:1 on the hovered tint over white */
719
+ --forge-selected-text: color-mix(in oklab, var(--forge-brand) 70%, var(--forge-text-primary));
720
+
697
721
  --forge-brand-hover: oklch(0.56 0.13 var(--forge-brand-hue));
698
722
  --forge-brand-active: oklch(0.52 0.14 var(--forge-brand-hue));
699
723
 
@@ -772,6 +796,12 @@ when used for hover/active states.
772
796
  --forge-cat-8-bg: oklch(0.96 0.02 9.6);
773
797
  --forge-cat-8-text: oklch(0.55 0.15 9.6);
774
798
  }
799
+
800
+ @supports not (line-height: round(up, 1em, 1px)) {
801
+ :root {
802
+ --forge-heading-line-height: 1.25;
803
+ }
804
+ }
775
805
  }
776
806
 
777
807
  /* ============================================================
@@ -860,6 +890,10 @@ when used for hover/active states.
860
890
 
861
891
  --forge-danger-hover: oklch(0.71 0.16 31.05);
862
892
  --forge-danger-active: oklch(0.76 0.17 31.05);
893
+
894
+ /* The secondary button's hover is a ghost button's hover on the page: -high in dark (-highest in light, the
895
+ fallback in the button's rule) */
896
+ --forge-button-secondary-bg-hover: var(--forge-surface-container-high);
863
897
  }
864
898
 
865
899
  :root[data-theme="light"],
@@ -892,7 +926,8 @@ when used for hover/active states.
892
926
  font-size: var(--forge-size-sm) !important; /* bootstrap-override */
893
927
  color: var(--forge-text-primary) !important; /* bootstrap-override */
894
928
  background-color: var(--forge-surface) !important; /* bootstrap-override */
895
- line-height: 1.5 !important; /* bootstrap-override */
929
+ line-height: var(--forge-line-height-body) !important; /* bootstrap-override */
930
+ letter-spacing: var(--forge-letter-spacing-body);
896
931
  /* macOS only: grayscale antialiasing, thinner and crisper text (no effect on Windows / Linux) */
897
932
  -webkit-font-smoothing: antialiased;
898
933
  -moz-osx-font-smoothing: grayscale;
@@ -900,7 +935,8 @@ when used for hover/active states.
900
935
 
901
936
  /* The level is for the outline, the size for the look: a heading of any level takes another size with a
902
937
  .forge-heading-* class, or a component sets --forge-heading-size and --forge-heading-weight on the heading (the
903
- !important here would beat its font-size, even an !important one). Tight tracking only from 20px up. */
938
+ !important here would beat its font-size, even an !important one). Tight tracking only from 20px up. The line height
939
+ follows the size through --forge-heading-line-height, so a size override needs no line height of its own. */
904
940
  h1,
905
941
  h2,
906
942
  h3,
@@ -970,6 +1006,7 @@ when used for hover/active states.
970
1006
  .forge-subsection-title {
971
1007
  font-weight: var(--forge-font-weight-bold) !important; /* bootstrap-override */
972
1008
  letter-spacing: var(--forge-letter-spacing-tight) !important; /* bootstrap-override */
1009
+ line-height: var(--forge-heading-line-height) !important; /* bootstrap-override */
973
1010
  margin: 0 !important; /* bootstrap-override */
974
1011
  }
975
1012
 
@@ -989,17 +1026,29 @@ when used for hover/active states.
989
1026
  color: var(--forge-text-secondary);
990
1027
  font-size: var(--forge-size-xs);
991
1028
  font-weight: var(--forge-font-weight-medium);
992
- line-height: 1.5;
1029
+ line-height: 1rem; /* 16px, on the 4px grid */
993
1030
  }
994
1031
 
995
- p {
996
- font-size: var(--forge-content-base);
997
- line-height: var(--forge-content-line-height);
1032
+ /* The label of a group of items in a list or menu (a side bar section, "My apps" in the app switcher): uppercase
1033
+ 12px with open letter spacing, in the primary color so it stays readable, quieter than the 14px items by size
1034
+ and case. Not a heading: it doesn't enter the outline; name the group with it (aria-labelledby) */
1035
+ .forge-group-label {
1036
+ color: var(--forge-text-primary);
1037
+ font-size: var(--forge-size-xs);
1038
+ font-weight: var(--forge-font-weight-medium);
1039
+ line-height: 1rem; /* 16px, on the 4px grid */
1040
+ letter-spacing: var(--forge-letter-spacing-caps);
1041
+ text-transform: uppercase;
998
1042
  }
999
1043
 
1044
+ /* No p rule: a paragraph is text at the size around it, body text (14px) in the UI. Long-form reading opts in with
1045
+ .forge-content (16px, --forge-content-base), which then covers its paragraphs and lists alike */
1046
+
1047
+ /* A label without a class: body size in the primary color, like a field label (.forge-field-label adds the weight
1048
+ and the 20px line) */
1000
1049
  label {
1001
1050
  font-size: var(--forge-size-sm);
1002
- color: var(--forge-text-secondary);
1051
+ color: var(--forge-text-primary);
1003
1052
  }
1004
1053
 
1005
1054
  small {
@@ -1007,6 +1056,13 @@ when used for hover/active states.
1007
1056
  color: var(--forge-text-secondary);
1008
1057
  }
1009
1058
 
1059
+ /* Table cells are dense: the snug line height, not the body's, so a cell wrapping onto several lines stays compact.
1060
+ A table component's own line height wins (a later layer) */
1061
+ th,
1062
+ td {
1063
+ line-height: var(--forge-line-height-snug);
1064
+ }
1065
+
1010
1066
  button,
1011
1067
  a,
1012
1068
  input,
@@ -1080,7 +1136,8 @@ when used for hover/active states.
1080
1136
  background-color: var(--forge-surface-container-lowest);
1081
1137
  border-radius: var(--forge-radius-lg);
1082
1138
  box-shadow: var(--forge-shadow-rest);
1083
- margin: var(--forge-space-4) var(--forge-space-2) var(--forge-space-2) var(--forge-space-4);
1139
+ /* The flat page's gap, on every side: the card's header sits where a flat page's does */
1140
+ margin: var(--_forge-page-block-gap);
1084
1141
  padding-block: 0;
1085
1142
  }
1086
1143
 
@@ -1121,14 +1178,16 @@ when used for hover/active states.
1121
1178
 
1122
1179
  /* Areas above and below the body that stay put: a title bar, tabs and filters, a save bar. Fluid by default,
1123
1180
  --fixed lines them up with a fixed body (they keep the same gutter, so both are as wide). A page header inside
1124
- gets no bottom margin, the block's padding spaces it. */
1181
+ gets no bottom margin. A top area pads 8px above only: with the page's 8px gap the first starts 16px from the
1182
+ window's top, as the content does from the side, its header centered on the side bar's logo; the body's 16px
1183
+ top padding spaces the content, as a page header's margin does in the body. */
1125
1184
  .forge-page-top {
1126
1185
  flex: none;
1127
1186
  box-sizing: border-box;
1128
1187
  overflow: hidden;
1129
1188
  scrollbar-gutter: stable;
1130
1189
  scrollbar-width: auto; /* the body's gutter width, so a fixed one lines up exactly */
1131
- padding-block: var(--forge-space-3);
1190
+ padding-block: var(--forge-space-2) 0;
1132
1191
  padding-inline: var(--forge-space-4);
1133
1192
  --forge-page-header-spacing: 0;
1134
1193
 
@@ -1143,7 +1202,8 @@ when used for hover/active states.
1143
1202
  overflow: hidden;
1144
1203
  scrollbar-gutter: stable;
1145
1204
  scrollbar-width: auto; /* the body's gutter width, so a fixed one lines up exactly */
1146
- padding-block: var(--forge-space-3);
1205
+ /* With the page's 8px gap, 16px from the window's bottom, as the top area from its top */
1206
+ padding-block: var(--forge-space-2);
1147
1207
  padding-inline: var(--forge-space-4);
1148
1208
  --forge-page-header-spacing: 0;
1149
1209
 
@@ -1172,9 +1232,10 @@ when used for hover/active states.
1172
1232
  /* At least the control height, and it grows when the label wraps */
1173
1233
  min-height: var(--forge-control-height-md);
1174
1234
  font-size: var(--forge-size-sm) !important; /* bootstrap-override */
1235
+ font-weight: var(--forge-font-weight-medium) !important; /* bootstrap-override */
1175
1236
  padding: 0 var(--forge-space-3) !important; /* bootstrap-override */
1176
1237
 
1177
- border-radius: var(--forge-radius-md) !important; /* bootstrap-override */
1238
+ border-radius: var(--forge-radius-sm) !important; /* bootstrap-override */
1178
1239
  border: 1px solid transparent !important; /* bootstrap-override */
1179
1240
 
1180
1241
  cursor: pointer !important; /* bootstrap-override */
@@ -1189,10 +1250,39 @@ when used for hover/active states.
1189
1250
  scale var(--forge-motion-slow) var(--forge-ease-out);
1190
1251
  }
1191
1252
 
1192
- /* An icon-only button keeps its own size: not stretched to the control height */
1253
+ /* Icons sized by a token. Font Awesome's svg is 1em high from its own unlayered CSS, which beats any rule in this
1254
+ layer: so every rule sizing a component's icon sets the font size as well as the box, and 1em resolves to the
1255
+ token. This one centers the svg in its fa-icon box (a glyph narrower than it is high keeps its ratio) */
1256
+ :is(.forge-button, .forge-icon-button, .forge-pill, .forge-list-link-icon, .forge-back-link) > fa-icon {
1257
+ display: inline-flex;
1258
+ align-items: center;
1259
+ justify-content: center;
1260
+ }
1261
+
1262
+ /* The icon beside the label */
1263
+ .forge-button > :is(svg, fa-icon) {
1264
+ flex: none;
1265
+ width: var(--forge-icon-sm);
1266
+ height: var(--forge-icon-sm);
1267
+ font-size: var(--forge-icon-sm);
1268
+ }
1269
+
1270
+ /* An icon-only button: a square the size of .forge-icon-button, not stretched to the control height nor widened by
1271
+ a label's padding (in a table row it would take the width of a labelled button). New code uses .forge-icon-button */
1193
1272
  .forge-button--icon {
1273
+ flex: none;
1274
+ width: var(--forge-icon-button-md);
1275
+ height: var(--forge-icon-button-md);
1194
1276
  min-height: 0;
1195
- padding-block: calc(var(--forge-space-1) * 1.5) !important; /* bootstrap-override */
1277
+ padding: 0 !important; /* bootstrap-override */
1278
+ }
1279
+
1280
+ /* After .forge-button--sm in specificity, so its min-height and padding don't stretch the square */
1281
+ .forge-button--sm.forge-button--icon {
1282
+ width: var(--forge-icon-button-sm);
1283
+ height: var(--forge-icon-button-sm);
1284
+ min-height: 0;
1285
+ padding: 0 !important; /* bootstrap-override */
1196
1286
  }
1197
1287
 
1198
1288
  /* Not when disabled or busy: a button that can't act doesn't react to a press */
@@ -1224,22 +1314,28 @@ when used for hover/active states.
1224
1314
  background: var(--forge-primary-active) !important; /* bootstrap-override */
1225
1315
  }
1226
1316
 
1317
+ /* Secondary: gray, no border. The hover gray is a ghost button's hover on the page (dark mode sets the hover
1318
+ variable to -high). A context whose own tone is the rest gray sets the variables (the inset does); never set
1319
+ on the button, so an ancestor's value reaches it */
1227
1320
  .forge-button--secondary {
1228
- background: var(--forge-surface-container-lowest);
1229
- border-color: var(--forge-border) !important; /* bootstrap-override */
1321
+ background: var(--forge-button-secondary-bg, var(--forge-surface-container)) !important; /* bootstrap-override */
1230
1322
  }
1231
1323
 
1232
1324
  .forge-button--secondary:hover:not(:disabled) {
1233
- background: linear-gradient(var(--forge-hover-bg) 0 0), var(--forge-surface-container-lowest) !important; /* bootstrap-override */
1325
+ background: var(--forge-button-secondary-bg-hover, var(--forge-surface-container-highest)) !important; /* bootstrap-override */
1326
+ }
1327
+
1328
+ .forge-button--secondary:active:not(:disabled) {
1329
+ background: linear-gradient(var(--forge-hover-bg) 0 0), var(--forge-button-secondary-bg-hover, var(--forge-surface-container-highest)) !important; /* bootstrap-override */
1234
1330
  }
1235
1331
 
1236
1332
  .forge-button--ghost:hover:not(:disabled) {
1237
1333
  background: var(--forge-hover-bg) !important; /* bootstrap-override */
1238
1334
  }
1239
1335
 
1240
- /* Danger: destructive actions. The fill is the danger hue darkened until white passes (4.6:1) */
1336
+ /* Danger: destructive actions. The fill is the danger hue darkened until white passes, as the danger badge's */
1241
1337
  .forge-button--danger {
1242
- background: oklch(from var(--forge-danger) min(l, 0.58) c h);
1338
+ background: oklch(from var(--forge-danger) min(l, 0.57) c h);
1243
1339
  color: var(--forge-text-on-brand);
1244
1340
  }
1245
1341
 
@@ -1287,7 +1383,7 @@ when used for hover/active states.
1287
1383
 
1288
1384
  background: var(--forge-surface-container-lowest) !important; /* bootstrap-override */
1289
1385
  border: 1px solid var(--forge-border-strong) !important; /* bootstrap-override */
1290
- border-radius: var(--forge-radius-md) !important; /* bootstrap-override */
1386
+ border-radius: var(--forge-radius-sm) !important; /* bootstrap-override */
1291
1387
  }
1292
1388
 
1293
1389
  /* Disabled: the container step, as the library's disabled number box, duration box and date picker */
@@ -1302,10 +1398,224 @@ when used for hover/active states.
1302
1398
  padding-block: var(--forge-space-2) !important; /* bootstrap-override */
1303
1399
  }
1304
1400
 
1305
- /* A multi-select or list box shows several rows */
1401
+ /* -------------------- SELECT (native) -------------------- */
1402
+ /* The library's chevron (Font Awesome regular chevron-down, 12px as in the duration box) instead of the OS arrow,
1403
+ --forge-space-3 from the edge, the text kept clear of it. A background image can't follow currentColor, so the
1404
+ chevron comes in a light and a dark copy, filled with --forge-text-secondary of each theme (#5d5c5b, #a5a4a3).
1405
+ Chromium draws it as ::picker-icon instead, in the text color (customizable select, below). */
1406
+ :root {
1407
+ --forge-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%235d5c5b' d='M207.5 409c9.4 9.4 24.6 9.4 33.9 0l200-200c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-183 183-183-183c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l200 200z'/%3E%3C/svg%3E");
1408
+ }
1409
+
1410
+ :root[data-theme="dark"] {
1411
+ --forge-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23a5a4a3' d='M207.5 409c9.4 9.4 24.6 9.4 33.9 0l200-200c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-183 183-183-183c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l200 200z'/%3E%3C/svg%3E");
1412
+ }
1413
+
1414
+ /* One background with the fill: .forge-input's shorthand would otherwise drop the image */
1415
+ select.forge-input {
1416
+ appearance: none;
1417
+ padding-inline-end: calc(var(--forge-space-3) + 12px + var(--forge-space-2)) !important; /* bootstrap-override */
1418
+ background:
1419
+ var(--forge-select-chevron) no-repeat right var(--forge-space-3) center / 12px,
1420
+ var(--forge-surface-container-lowest) !important; /* bootstrap-override */
1421
+ text-overflow: ellipsis;
1422
+ }
1423
+
1424
+ select.forge-input:not(:disabled) {
1425
+ cursor: pointer;
1426
+ }
1427
+
1428
+ select.forge-input:disabled {
1429
+ background:
1430
+ var(--forge-select-chevron) no-repeat right var(--forge-space-3) center / 12px,
1431
+ var(--forge-surface-container) !important; /* bootstrap-override */
1432
+ }
1433
+
1434
+ /* Right to left: the text clearance is at the inline end, the background position is physical */
1435
+ select.forge-input:dir(rtl) {
1436
+ background:
1437
+ var(--forge-select-chevron) no-repeat left var(--forge-space-3) center / 12px,
1438
+ var(--forge-surface-container-lowest) !important; /* bootstrap-override */
1439
+ }
1440
+
1441
+ select.forge-input:dir(rtl):disabled {
1442
+ background:
1443
+ var(--forge-select-chevron) no-repeat left var(--forge-space-3) center / 12px,
1444
+ var(--forge-surface-container) !important; /* bootstrap-override */
1445
+ }
1446
+
1447
+ /* Chromium 135+ (customizable select): the picker is a Forge overlay with menu rows instead of the OS list.
1448
+ Firefox and Safari keep the system picker. List boxes are left out: customizable select is a dropdown only. */
1449
+ @supports (appearance: base-select) {
1450
+ select.forge-input:not([multiple], [size]:not([size="1"])),
1451
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker(select) {
1452
+ appearance: base-select;
1453
+ }
1454
+
1455
+ /* ::picker-icon draws the chevron in the text color, so the background copy goes; the fill stays */
1456
+ select.forge-input:not([multiple], [size]:not([size="1"])) {
1457
+ background-image: none !important; /* bootstrap-override */
1458
+ padding-inline-end: var(--forge-space-3) !important; /* bootstrap-override */
1459
+ gap: var(--forge-space-2);
1460
+ align-items: center; /* a flex box: the value and the icon would sit at the top */
1461
+ }
1462
+
1463
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker-icon {
1464
+ content: "";
1465
+ width: 12px;
1466
+ height: 12px;
1467
+ margin-inline-start: auto;
1468
+ color: var(--forge-text-secondary);
1469
+ background-color: currentColor;
1470
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M207.5 409c9.4 9.4 24.6 9.4 33.9 0l200-200c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-183 183-183-183c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l200 200z'/%3E%3C/svg%3E") center / contain no-repeat;
1471
+ }
1472
+
1473
+ select.forge-input:not([multiple], [size]:not([size="1"])):open::picker-icon {
1474
+ rotate: 180deg;
1475
+ }
1476
+
1477
+ select.forge-input:not([multiple], [size]:not([size="1"])):disabled::picker-icon {
1478
+ color: var(--forge-text-tertiary);
1479
+ }
1480
+
1481
+ /* The panel of .forge-overlay-content, a --forge-space-1 gap from the control. It opens below and flips above
1482
+ only when it doesn't fit, as the other overlays; Chromium's default (most-block-size) would open it on the
1483
+ roomier side even when it fits below. Its height is capped as the duration box list (longer lists scroll):
1484
+ Chromium's default stretches it into the room below, so it would shrink there instead of flipping */
1485
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker(select) {
1486
+ --forge-overlay-item-radius: calc(var(--forge-radius-lg) - 1px - var(--forge-space-1));
1487
+ position-try-order: normal;
1488
+ position-try-fallbacks: flip-block, --forge-select-fit;
1489
+ max-block-size: 16rem;
1490
+ margin-block: var(--forge-space-1);
1491
+ padding: var(--forge-space-1);
1492
+ background-color: var(--forge-surface-bright);
1493
+ color: var(--forge-text-primary);
1494
+ border: 1px solid var(--forge-border-overlay);
1495
+ border-radius: var(--forge-radius-lg);
1496
+ box-shadow: var(--forge-shadow-overlay);
1497
+ font-family: var(--forge-font);
1498
+ font-size: var(--forge-size-sm);
1499
+ }
1500
+
1501
+ /* Rows like .forge-menu-item, but compact: as tall as a small control, the text centered in it.
1502
+ Hover and focus get --forge-hover-bg, the selected option --forge-active-bg (kept on hover, after the
1503
+ hover rule) and no checkmark; forced colors bring the checkmark back (below) */
1504
+ select.forge-input:not([multiple], [size]:not([size="1"])) option {
1505
+ gap: var(--forge-space-2);
1506
+ align-items: center;
1507
+ min-block-size: var(--forge-control-height-sm);
1508
+ padding: 0 var(--forge-space-3);
1509
+ line-height: var(--forge-line-height-snug);
1510
+ border-radius: var(--forge-overlay-item-radius);
1511
+ cursor: pointer;
1512
+ }
1513
+
1514
+ /* 1px between rows, so the fills of neighbouring rows (selected and hovered) don't touch */
1515
+ select.forge-input:not([multiple], [size]:not([size="1"])) option + option {
1516
+ margin-block-start: 1px;
1517
+ }
1518
+
1519
+ select.forge-input:not([multiple], [size]:not([size="1"])) option:is(:hover, :focus-visible) {
1520
+ background-color: var(--forge-hover-bg);
1521
+ outline: none;
1522
+ }
1523
+
1524
+ select.forge-input:not([multiple], [size]:not([size="1"])) option:checked {
1525
+ background-color: var(--forge-active-bg);
1526
+ }
1527
+
1528
+ select.forge-input:not([multiple], [size]:not([size="1"])) option::checkmark {
1529
+ display: none;
1530
+ }
1531
+
1532
+ select.forge-input:not([multiple], [size]:not([size="1"])) option:disabled {
1533
+ color: var(--forge-text-tertiary);
1534
+ cursor: not-allowed;
1535
+ }
1536
+
1537
+ /* The group label is small secondary text; the options in it are body text again. The label (not reachable
1538
+ from author CSS) lines up with the option text: Chromium indents it 5px, the row text sits at
1539
+ --forge-space-3, so the group is padded by the difference and its options pulled back */
1540
+ select.forge-input:not([multiple], [size]:not([size="1"])) optgroup {
1541
+ font-size: var(--forge-size-xs);
1542
+ color: var(--forge-text-secondary);
1543
+ padding-inline-start: calc(var(--forge-space-3) - 5px);
1544
+ }
1545
+
1546
+ select.forge-input:not([multiple], [size]:not([size="1"])) optgroup option {
1547
+ font-size: var(--forge-size-sm);
1548
+ color: var(--forge-text-primary);
1549
+ margin-inline-start: calc(5px - var(--forge-space-3));
1550
+ }
1551
+
1552
+ /* The last try, when 16rem fits on neither side (a landscape phone, 400% zoom): below, shrunk to the room
1553
+ there, so every option stays reachable by scrolling the list (the picker is in the top layer, the page
1554
+ can't scroll to it) */
1555
+ @position-try --forge-select-fit {
1556
+ max-block-size: stretch;
1557
+ }
1558
+
1559
+ /* The icon's color is a background under a mask, which forced colors would turn into the canvas color. A
1560
+ focused row is marked by its fill, which forced colors replace, and its outline is off: it gets one. The
1561
+ selected row is marked by its fill too, so it gets the checkmark back, at the end */
1562
+ @media (forced-colors: active) {
1563
+ select.forge-input:not([multiple], [size]:not([size="1"])) option:focus-visible {
1564
+ outline: 2px solid Highlight;
1565
+ outline-offset: -2px;
1566
+ }
1567
+
1568
+ select.forge-input:not([multiple], [size]:not([size="1"])) option::checkmark {
1569
+ display: revert;
1570
+ order: 1;
1571
+ margin-inline-start: auto;
1572
+ }
1573
+
1574
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker-icon {
1575
+ forced-color-adjust: none;
1576
+ background-color: CanvasText;
1577
+ }
1578
+
1579
+ select.forge-input:not([multiple], [size]:not([size="1"])):disabled::picker-icon {
1580
+ background-color: GrayText;
1581
+ }
1582
+ }
1583
+
1584
+ /* The reduced-motion rule (unlayered.css) matches elements only, not these pseudo-elements */
1585
+ @media (prefers-reduced-motion: no-preference) {
1586
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker-icon {
1587
+ transition: rotate var(--forge-motion-fast) var(--forge-ease-out);
1588
+ }
1589
+
1590
+ select.forge-input:not([multiple], [size]:not([size="1"]))::picker(select) {
1591
+ animation: forge-overlay-fade-in var(--forge-motion-base) var(--forge-ease-out);
1592
+ }
1593
+ }
1594
+ }
1595
+
1596
+ /* A multi-select or list box shows several rows, no chevron */
1306
1597
  select.forge-input:is([multiple], [size]:not([size="1"])) {
1307
1598
  height: auto;
1308
1599
  padding-block: var(--forge-space-2) !important; /* bootstrap-override */
1600
+ padding-inline-end: var(--forge-space-3) !important; /* bootstrap-override */
1601
+ background-image: none !important; /* bootstrap-override */
1602
+ }
1603
+
1604
+ /* Rows: hover is the hover layer, the selection a primary tint instead of the system highlight (a background
1605
+ shorthand: Chromium ignores background-color on a selected option in a list box). The tint comes after hover,
1606
+ so a hovered selected row stays selected. */
1607
+ select.forge-input:is([multiple], [size]:not([size="1"])) option {
1608
+ padding: var(--forge-space-1) var(--forge-space-2);
1609
+ border-radius: var(--forge-radius-sm);
1610
+ }
1611
+
1612
+ select.forge-input:is([multiple], [size]:not([size="1"])) option:hover {
1613
+ background-color: var(--forge-hover-bg);
1614
+ }
1615
+
1616
+ select.forge-input:is([multiple], [size]:not([size="1"])) option:checked {
1617
+ background: color-mix(in srgb, var(--forge-primary) 14%, var(--forge-surface-container-lowest));
1618
+ color: var(--forge-text-primary);
1309
1619
  }
1310
1620
 
1311
1621
  .forge-input::placeholder {
@@ -1335,9 +1645,11 @@ when used for hover/active states.
1335
1645
 
1336
1646
  /* -------------------- CONTENT -------------------- */
1337
1647
 
1648
+ /* Long-form reading (an article, a guide, release notes): everything inside at the content size, paragraphs and
1649
+ lists alike */
1338
1650
  .forge-content {
1339
- font-size: var(--forge-size-base);
1340
- line-height: 1.6;
1651
+ font-size: var(--forge-content-base);
1652
+ line-height: var(--forge-content-line-height);
1341
1653
  }
1342
1654
 
1343
1655
  /* -------------------- SKELETON -------------------- */
@@ -1369,16 +1681,18 @@ when used for hover/active states.
1369
1681
  width: 60%;
1370
1682
  }
1371
1683
 
1684
+ /* A 2rem avatar, the size forge-avatar takes by default */
1372
1685
  .forge-skeleton--avatar {
1373
- width: 32px;
1374
- height: 32px;
1686
+ width: 2rem;
1687
+ height: 2rem;
1375
1688
  border-radius: var(--forge-radius-full);
1376
1689
  }
1377
1690
 
1691
+ /* As tall as a button, with its corners */
1378
1692
  .forge-skeleton--button {
1379
- width: 96px;
1380
- height: 32px;
1381
- border-radius: var(--forge-radius-md);
1693
+ width: 6rem;
1694
+ height: var(--forge-control-height-md);
1695
+ border-radius: var(--forge-radius-sm);
1382
1696
  }
1383
1697
 
1384
1698
  /* -------------------- PANEL, CARD, INSET -------------------- */
@@ -1433,6 +1747,10 @@ when used for hover/active states.
1433
1747
  padding: var(--forge-space-3) var(--forge-space-4);
1434
1748
  border-radius: var(--forge-radius-md);
1435
1749
  background-color: var(--forge-surface-container);
1750
+ /* The secondary button's rest gray is this tone: a step darker keeps it visible, and the hover a step further
1751
+ in both themes */
1752
+ --forge-button-secondary-bg: var(--forge-surface-container-high);
1753
+ --forge-button-secondary-bg-hover: var(--forge-surface-container-highest);
1436
1754
  }
1437
1755
 
1438
1756
  /* ============================================================
@@ -1466,6 +1784,7 @@ when used for hover/active states.
1466
1784
  .forge-icon-button > :is(svg, fa-icon) {
1467
1785
  width: var(--forge-icon-md);
1468
1786
  height: var(--forge-icon-md);
1787
+ font-size: var(--forge-icon-md);
1469
1788
  }
1470
1789
 
1471
1790
  .forge-icon-button:hover:not(:disabled),
@@ -1497,6 +1816,7 @@ when used for hover/active states.
1497
1816
  .forge-icon-button--sm > :is(svg, fa-icon) {
1498
1817
  width: var(--forge-icon-sm);
1499
1818
  height: var(--forge-icon-sm);
1819
+ font-size: var(--forge-icon-sm);
1500
1820
  }
1501
1821
 
1502
1822
  /* Next to 36px buttons and fields */
@@ -1533,8 +1853,8 @@ when used for hover/active states.
1533
1853
 
1534
1854
  .forge-chip[aria-pressed="true"] {
1535
1855
  border-color: color-mix(in oklab, var(--forge-brand) 60%, var(--forge-surface-container-lowest));
1536
- background-color: color-mix(in oklab, var(--forge-brand) 16%, var(--forge-surface-container-lowest));
1537
- color: color-mix(in oklab, var(--forge-brand) 75%, var(--forge-text-primary));
1856
+ background-color: var(--forge-selected-bg);
1857
+ color: var(--forge-selected-text);
1538
1858
  }
1539
1859
 
1540
1860
  .forge-chip:focus-visible {
@@ -1542,12 +1862,20 @@ when used for hover/active states.
1542
1862
  outline-offset: 2px;
1543
1863
  }
1544
1864
 
1865
+ /* As .forge-button: the whole chip at the disabled opacity, no hover */
1866
+ .forge-chip:disabled {
1867
+ background-image: none;
1868
+ opacity: var(--forge-opacity-disabled);
1869
+ cursor: not-allowed;
1870
+ }
1871
+
1545
1872
  /* -------------------- FILTER PILL (tokens) -------------------- */
1546
1873
  /* A filter that opens a choice (select, combobox, menu trigger) and shows its value. Only tokens: put
1547
1874
  .forge-filter-pill on the filter's outermost element, so its field, chevron and clear button all read the same
1548
1875
  values, and let each filter's own styles apply them (a DevExtreme select box and an Angular Aria combobox are
1549
1876
  built differently). The modifiers swap values: --active once the filter differs from its default, --disabled.
1550
- Backgrounds are opaque, so a pill looks the same on any surface. Active follows the pressed .forge-chip */
1877
+ Backgrounds are opaque, so a pill looks the same on any surface. Active takes the selected tint and text
1878
+ (--forge-selected-*), the same colors as the side bar's current page */
1551
1879
  .forge-filter-pill {
1552
1880
  --forge-filter-border-radius: var(--forge-radius-full);
1553
1881
  --forge-filter-name-font-weight: var(--forge-font-weight-bold);
@@ -1565,12 +1893,12 @@ when used for hover/active states.
1565
1893
  }
1566
1894
 
1567
1895
  .forge-filter-pill--active {
1568
- --forge-filter-bg: color-mix(in oklab, var(--forge-brand) 16%, var(--forge-surface-container-lowest));
1896
+ --forge-filter-bg: var(--forge-selected-bg);
1569
1897
  /* More brand in the same mix */
1570
- --forge-filter-bg-hover: color-mix(in oklab, var(--forge-brand) 24%, var(--forge-surface-container-lowest));
1898
+ --forge-filter-bg-hover: var(--forge-selected-bg-hover);
1571
1899
  --forge-filter-clear-bg-hover: color-mix(in oklab, var(--forge-brand) 32%, var(--forge-surface-container-lowest));
1572
1900
  --forge-filter-border: color-mix(in oklab, var(--forge-brand) 60%, var(--forge-surface-container-lowest));
1573
- --forge-filter-color: color-mix(in oklab, var(--forge-brand) 75%, var(--forge-text-primary));
1901
+ --forge-filter-color: var(--forge-selected-text);
1574
1902
  --forge-filter-icon-color: var(--forge-filter-color);
1575
1903
  }
1576
1904
 
@@ -1648,9 +1976,10 @@ when used for hover/active states.
1648
1976
  background: color-mix(in srgb, currentColor 16%, transparent);
1649
1977
  }
1650
1978
 
1979
+ /* Inset: a 2px gap would reach past the tag's edge */
1651
1980
  .forge-tag-remove:focus-visible {
1652
- outline: 2px solid var(--forge-focus-ring);
1653
- outline-offset: 0;
1981
+ outline: 2px solid var(--forge-focus-ring-strong);
1982
+ outline-offset: -2px;
1654
1983
  }
1655
1984
 
1656
1985
  .forge-tag-list {
@@ -1696,6 +2025,7 @@ when used for hover/active states.
1696
2025
  .forge-pill > :is(svg, fa-icon) {
1697
2026
  width: var(--forge-icon-sm);
1698
2027
  height: var(--forge-icon-sm);
2028
+ font-size: var(--forge-icon-sm);
1699
2029
  }
1700
2030
 
1701
2031
  .forge-pill--neutral {
@@ -1733,6 +2063,7 @@ when used for hover/active states.
1733
2063
  color: var(--forge-text-primary) !important; /* bootstrap-override: sds-bootstrap colors every label */
1734
2064
  font-size: var(--forge-size-sm);
1735
2065
  font-weight: var(--forge-font-weight-medium);
2066
+ line-height: 1.25rem; /* 20px, on the 4px grid */
1736
2067
  }
1737
2068
 
1738
2069
  /* <span class="forge-field-required" aria-hidden="true">*</span>; the input carries aria-required / required */
@@ -1791,6 +2122,9 @@ when used for hover/active states.
1791
2122
  color: var(--forge-text-primary) !important; /* bootstrap-override: sds-bootstrap colors every label */
1792
2123
  font-size: var(--forge-size-sm) !important; /* bootstrap-override: sds-bootstrap sizes every label; an option is body text */
1793
2124
  font-weight: normal !important; /* bootstrap-override: sds-bootstrap bolds every label */
2125
+ /* A control's label, on the 4px grid in whole pixels (20px at 14px), not the body's 22.4px: the input snaps to
2126
+ whole pixels, so a fractional line would put the text off the input's center, and off a button's in a row */
2127
+ line-height: 1.25rem;
1794
2128
  cursor: pointer;
1795
2129
  }
1796
2130
 
@@ -1810,8 +2144,11 @@ when used for hover/active states.
1810
2144
 
1811
2145
  /* A setting that applies at once: <label class="forge-check forge-check--switch">
1812
2146
  <input type="checkbox" role="switch"><span>Notifications</span></label>. The track is drawn on the native
1813
- checkbox, so keyboard, form value and `checked` stay native. Off: a tertiary track (3:1 to the card), on: the
1814
- primary with the thumb at the end. Everything is sized from the track height, --_switch-h */
2147
+ checkbox, so keyboard, form value and `checked` stay native. Off: a light track with a light outline and a
2148
+ small tertiary thumb (the thumb, which shows the state, carries the 3:1 to the card and the page); on: the
2149
+ primary, the thumb grown to full size at the end. The outline is a border, not a shadow, so forced colors keep
2150
+ it.
2151
+ Everything is sized from the track height, --_switch-h */
1815
2152
  .forge-check--switch {
1816
2153
  --_switch-h: var(--forge-icon-md);
1817
2154
  }
@@ -1824,30 +2161,52 @@ when used for hover/active states.
1824
2161
  .forge-check--switch > input {
1825
2162
  appearance: none;
1826
2163
  position: relative;
2164
+ box-sizing: border-box;
1827
2165
  width: calc(var(--_switch-h) * 1.75);
1828
2166
  height: var(--_switch-h);
2167
+ border: 1px solid var(--forge-border-strong);
1829
2168
  border-radius: var(--forge-radius-full);
1830
- background: var(--forge-text-tertiary);
1831
- transition: background-color var(--forge-motion-fast) var(--forge-ease-out);
2169
+ background: var(--forge-hover-bg);
2170
+ transition:
2171
+ background-color var(--forge-motion-fast) var(--forge-ease-out),
2172
+ border-color var(--forge-motion-fast) var(--forge-ease-out);
1832
2173
  }
1833
2174
 
2175
+ /* The thumb sits in the box inside the 1px border, (--_switch-h - 2px) high. Off it is half the track height,
2176
+ centered where the full-size thumb starts; on it is 2px smaller than that box, 1px in from its edges, and
2177
+ slides to the end */
1834
2178
  .forge-check--switch > input::before {
1835
2179
  content: '';
1836
2180
  position: absolute;
1837
- inset-block-start: 2px;
1838
- inset-inline-start: 2px;
1839
- width: calc(var(--_switch-h) - 4px);
1840
- height: calc(var(--_switch-h) - 4px);
2181
+ inset-block-start: calc(var(--_switch-h) / 4 - 1px);
2182
+ inset-inline-start: calc(var(--_switch-h) / 4 - 1px);
2183
+ width: calc(var(--_switch-h) / 2);
2184
+ height: calc(var(--_switch-h) / 2);
1841
2185
  border-radius: var(--forge-radius-full);
1842
- background: var(--forge-surface-container-lowest);
1843
- transition: translate var(--forge-motion-fast) var(--forge-ease-out);
2186
+ background: var(--forge-text-tertiary);
2187
+ transition:
2188
+ translate var(--forge-motion-fast) var(--forge-ease-out),
2189
+ width var(--forge-motion-fast) var(--forge-ease-out),
2190
+ height var(--forge-motion-fast) var(--forge-ease-out),
2191
+ inset-block-start var(--forge-motion-fast) var(--forge-ease-out),
2192
+ inset-inline-start var(--forge-motion-fast) var(--forge-ease-out),
2193
+ background-color var(--forge-motion-fast) var(--forge-ease-out);
2194
+ }
2195
+
2196
+ .forge-check--switch > input:hover:not(:checked, :disabled)::before {
2197
+ background: var(--forge-text-secondary);
1844
2198
  }
1845
2199
 
1846
2200
  .forge-check--switch > input:checked {
1847
2201
  background: var(--forge-primary);
2202
+ border-color: var(--forge-primary);
1848
2203
  }
1849
2204
 
1850
2205
  .forge-check--switch > input:checked::before {
2206
+ inset-block-start: 1px;
2207
+ inset-inline-start: 1px;
2208
+ width: calc(var(--_switch-h) - 4px);
2209
+ height: calc(var(--_switch-h) - 4px);
1851
2210
  background: var(--forge-text-on-primary);
1852
2211
  translate: calc(var(--_switch-h) * 0.75) 0;
1853
2212
  }
@@ -1856,11 +2215,21 @@ when used for hover/active states.
1856
2215
  translate: calc(var(--_switch-h) * -0.75) 0;
1857
2216
  }
1858
2217
 
1859
- .forge-check--switch > input:disabled {
2218
+ .forge-check--switch > input:disabled:not(:checked) {
2219
+ border-color: var(--forge-border);
2220
+ background: transparent;
2221
+ }
2222
+
2223
+ .forge-check--switch > input:disabled:not(:checked)::before {
2224
+ background: var(--forge-border-strong);
2225
+ }
2226
+
2227
+ .forge-check--switch > input:checked:disabled {
1860
2228
  background: var(--forge-border-strong);
2229
+ border-color: var(--forge-border-strong);
1861
2230
  }
1862
2231
 
1863
- .forge-check--switch > input:disabled::before {
2232
+ .forge-check--switch > input:checked:disabled::before {
1864
2233
  background: var(--forge-surface-container);
1865
2234
  }
1866
2235
 
@@ -2097,7 +2466,8 @@ when used for hover/active states.
2097
2466
  min-height: var(--forge-control-height-md);
2098
2467
  padding: var(--forge-space-1) var(--forge-space-2) var(--forge-space-1) var(--forge-space-3);
2099
2468
  border: 1px solid var(--forge-border-strong);
2100
- border-radius: var(--forge-radius-md);
2469
+ /* A field's corners, as .forge-input */
2470
+ border-radius: var(--forge-radius-sm);
2101
2471
  background: var(--forge-surface-container-lowest);
2102
2472
  }
2103
2473
 
@@ -2197,6 +2567,7 @@ when used for hover/active states.
2197
2567
  .forge-list-link-icon > :is(svg, fa-icon) {
2198
2568
  width: var(--forge-icon-lg);
2199
2569
  height: var(--forge-icon-lg);
2570
+ font-size: var(--forge-icon-lg);
2200
2571
  }
2201
2572
 
2202
2573
  .forge-list-link-body {
@@ -2308,6 +2679,7 @@ when used for hover/active states.
2308
2679
  .forge-back-link > :is(svg, fa-icon) {
2309
2680
  width: var(--forge-icon-sm);
2310
2681
  height: var(--forge-icon-sm);
2682
+ font-size: var(--forge-icon-sm);
2311
2683
  }
2312
2684
 
2313
2685
  .forge-back-link:focus-visible {
@@ -2475,7 +2847,7 @@ when used for hover/active states.
2475
2847
  .forge-tab[aria-disabled="true"] {
2476
2848
  background: none;
2477
2849
  color: var(--forge-text-tertiary);
2478
- cursor: default;
2850
+ cursor: not-allowed;
2479
2851
  }
2480
2852
 
2481
2853
  .forge-tab-panel {
@@ -2501,6 +2873,8 @@ when used for hover/active states.
2501
2873
  panel's outer edge), so their corners are concentric with the panel's. --loose keeps it: it holds content,
2502
2874
  not rows */
2503
2875
  --forge-overlay-item-radius: calc(var(--forge-radius-lg) - 1px - var(--forge-space-1));
2876
+ /* A floating surface, -high in dark: a secondary button's dark hover (-high) would vanish into it */
2877
+ --forge-button-secondary-bg-hover: var(--forge-surface-container-highest);
2504
2878
  animation: forge-overlay-fade-in var(--forge-overlay-show-duration, var(--forge-motion-base)) var(--forge-ease-out);
2505
2879
  }
2506
2880
 
@@ -2559,7 +2933,7 @@ when used for hover/active states.
2559
2933
  .forge-menu-item[aria-disabled="true"] {
2560
2934
  background: none;
2561
2935
  color: var(--forge-text-tertiary);
2562
- cursor: default;
2936
+ cursor: not-allowed;
2563
2937
  }
2564
2938
 
2565
2939
  .forge-menu-separator {
@@ -2568,6 +2942,71 @@ when used for hover/active states.
2568
2942
  border-top: 1px solid var(--forge-border);
2569
2943
  }
2570
2944
 
2945
+ /* -------------------- TABLE ACTIONS (<forge-table-actions>) -------------------- */
2946
+ /* Row actions are quieter than a toolbar's: the icons of the "…" button and the projected icon-button quick
2947
+ actions are --forge-icon-sm (14px), in the 28px square of .forge-icon-button. Here, not in the component's
2948
+ styles: the quick actions are projected */
2949
+ .forge-table-actions .forge-icon-button > :is(svg, fa-icon) {
2950
+ width: var(--forge-icon-sm);
2951
+ height: var(--forge-icon-sm);
2952
+ font-size: var(--forge-icon-sm);
2953
+ }
2954
+
2955
+ /* The panel renders in the overlay, outside the component. Its deprecated projected items
2956
+ (<li><button class="dropdown-item">) look like the menu items above. Bootstrap's .dropdown-item and reboot are
2957
+ unlayered and beat this layer, hence the !important. The row highlight in a DevExtreme grid is in forge-dx.css. */
2958
+ .forge-table-actions-panel {
2959
+ .forge-table-actions-list {
2960
+ margin: 0 !important; /* bootstrap-override */
2961
+ padding: 0 !important; /* bootstrap-override */
2962
+ list-style: none;
2963
+ }
2964
+
2965
+ .dropdown-item {
2966
+ display: flex !important; /* bootstrap-override */
2967
+ align-items: center;
2968
+ gap: var(--forge-space-2);
2969
+ width: 100% !important; /* bootstrap-override */
2970
+ padding: var(--forge-space-2) var(--forge-space-3) !important; /* bootstrap-override */
2971
+ border: 0 !important; /* bootstrap-override */
2972
+ /* concentric with the overlay panel, as menu items */
2973
+ border-radius: var(--forge-overlay-item-radius, var(--forge-radius-md)) !important; /* bootstrap-override */
2974
+ background: none !important; /* bootstrap-override */
2975
+ color: var(--forge-text-primary) !important; /* bootstrap-override */
2976
+ font-size: var(--forge-size-sm) !important; /* bootstrap-override */
2977
+ text-align: start !important; /* bootstrap-override */
2978
+ cursor: pointer;
2979
+
2980
+ &:hover,
2981
+ &:focus-visible {
2982
+ background-color: var(--forge-hover-bg) !important; /* bootstrap-override */
2983
+ outline: none;
2984
+ }
2985
+
2986
+ /* Inset, as menu items: an outline, which forced colors keep */
2987
+ &:focus-visible {
2988
+ outline: 2px solid var(--forge-focus-ring-strong);
2989
+ outline-offset: -2px;
2990
+ }
2991
+
2992
+ &:active {
2993
+ background-color: var(--forge-active-bg) !important; /* bootstrap-override */
2994
+ }
2995
+ }
2996
+
2997
+ .dropdown-divider {
2998
+ height: 0;
2999
+ margin: var(--forge-space-1) 0 !important; /* bootstrap-override */
3000
+ border-top: 1px solid var(--forge-border) !important; /* bootstrap-override */
3001
+ }
3002
+ }
3003
+
3004
+ /* The legacy SDS table's row whose menu is open stays highlighted, tinted from the row's own text color.
3005
+ Bootstrap's table cells set their own background */
3006
+ .sds-row:has(.forge-table-actions[data-open]) td {
3007
+ background-color: color-mix(in srgb, currentColor 8%, transparent) !important; /* bootstrap-override */
3008
+ }
3009
+
2571
3010
  /* -------------------- HIGHLIGHT TEXT (<forge-highlight-text>) -------------------- */
2572
3011
  /* A matched part of the text: a light brand tint over the surface, readable in both themes */
2573
3012
  .forge-highlight-text-mark {
@@ -2684,8 +3123,9 @@ when used for hover/active states.
2684
3123
  text-underline-offset: 2px;
2685
3124
  cursor: pointer;
2686
3125
 
3126
+ /* The ring's corners, as .forge-back-link's */
2687
3127
  &:focus-visible {
2688
- border-radius: 2px;
3128
+ border-radius: var(--forge-radius-sm);
2689
3129
  outline: 2px solid var(--forge-focus-ring-strong);
2690
3130
  outline-offset: 2px;
2691
3131
  }
@@ -2702,21 +3142,46 @@ when used for hover/active states.
2702
3142
  margin-block: calc(var(--forge-space-1) * -1);
2703
3143
  padding: 0;
2704
3144
  border: 0;
2705
- border-radius: var(--forge-radius-sm);
3145
+ /* The corners of .forge-icon-button */
3146
+ border-radius: var(--forge-radius-md);
2706
3147
  background: transparent;
2707
3148
  color: inherit;
2708
3149
  cursor: pointer;
2709
3150
 
2710
3151
  &:hover {
2711
- background-color: color-mix(in oklab, currentColor 12%, transparent);
3152
+ /* The hover layer's opacity, from the callout's text color (the fill under it is tinted) */
3153
+ background-color: color-mix(in srgb, currentColor var(--forge-state-hover-opacity), transparent);
2712
3154
  }
2713
3155
 
2714
3156
  &:focus-visible {
2715
3157
  outline: 2px solid var(--forge-focus-ring-strong);
2716
- outline-offset: 1px;
3158
+ outline-offset: 2px;
2717
3159
  }
2718
3160
  }
2719
3161
  }
3162
+ /* ============================================================
3163
+ APP SWITCHER
3164
+ The discover preview's Markdown (.forge-app-switcher-flyout-text). The app switcher puts it in as HTML, which a
3165
+ component's encapsulated styles don't reach, so its rules live here. All of it at body size, paragraphs too (not
3166
+ the long-form size of a plain p); no space above the first block or below the last. The rest of the switcher is
3167
+ still styled by the Angular component.
3168
+ ============================================================ */
3169
+
3170
+ @layer forge-components {
3171
+ .forge-app-switcher-flyout-text :is(p, ul, ol) {
3172
+ margin: 0 0 var(--forge-space-2);
3173
+ font-size: var(--forge-size-sm);
3174
+ line-height: var(--forge-line-height-body);
3175
+ }
3176
+
3177
+ .forge-app-switcher-flyout-text :is(ul, ol) {
3178
+ padding-inline-start: var(--forge-space-5);
3179
+ }
3180
+
3181
+ .forge-app-switcher-flyout-text > :last-child {
3182
+ margin-bottom: 0;
3183
+ }
3184
+ }
2720
3185
  /* ============================================================
2721
3186
  UTILITIES
2722
3187
  ============================================================ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spicainternational/forge-styles",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Forge design system styles: forge.css (tokens, themes, reset, layout, components, utilities), the tokens on their own and the fonts.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {