@tenphi/renderer 0.28.0 → 0.30.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.
Files changed (59) hide show
  1. package/README.md +6 -4
  2. package/dist/components/Banner.styles.js +1 -1
  3. package/dist/components/Button.styles.js +1 -1
  4. package/dist/components/Card.astro +3 -4
  5. package/dist/components/Card.styles.js +16 -25
  6. package/dist/components/Document.styles.js +19 -40
  7. package/dist/components/Footer.styles.js +5 -5
  8. package/dist/components/Header.styles.js +2 -2
  9. package/dist/components/HeaderFrame.styles.js +1 -1
  10. package/dist/components/HeaderLinks.styles.js +25 -15
  11. package/dist/components/Hero.styles.js +8 -8
  12. package/dist/components/LanguageSelect.styles.js +5 -6
  13. package/dist/components/MainContent.styles.js +6 -8
  14. package/dist/components/MainPane.styles.js +2 -2
  15. package/dist/components/MarkdownAlert.styles.js +13 -13
  16. package/dist/components/MarkdownCodeBlock.styles.js +7 -10
  17. package/dist/components/MarkdownContent.styles.js +11 -17
  18. package/dist/components/MarkdownHeading.styles.js +4 -6
  19. package/dist/components/MarkdownInlineCode.styles.js +1 -1
  20. package/dist/components/MarkdownTable.styles.js +7 -10
  21. package/dist/components/Mermaid.styles.js +2 -2
  22. package/dist/components/MermaidSource.styles.js +1 -1
  23. package/dist/components/MobileMenuFooter.styles.js +5 -5
  24. package/dist/components/MobileMenuToggle.styles.js +2 -2
  25. package/dist/components/MobileNavigationTabs.styles.js +9 -10
  26. package/dist/components/MobileTableOfContents.styles.js +7 -7
  27. package/dist/components/PackageVersion.styles.js +1 -1
  28. package/dist/components/PageActions.styles.js +3 -3
  29. package/dist/components/PageFrame.styles.js +1 -1
  30. package/dist/components/Pagination.styles.js +13 -18
  31. package/dist/components/Preview.styles.js +1 -1
  32. package/dist/components/Search.styles.js +7 -8
  33. package/dist/components/SearchButton.styles.js +13 -5
  34. package/dist/components/SearchResults.styles.js +20 -20
  35. package/dist/components/Sidebar.styles.js +17 -19
  36. package/dist/components/SkipLink.styles.js +4 -3
  37. package/dist/components/SocialIcons.styles.js +1 -1
  38. package/dist/components/Steps.styles.js +3 -3
  39. package/dist/components/TableOfContents.styles.js +3 -3
  40. package/dist/components/TableOfContentsLayout.styles.js +2 -2
  41. package/dist/components/ThemeSelect.styles.js +16 -16
  42. package/dist/components/TopNavigation.styles.js +1 -3
  43. package/dist/components/VersionSwitcher.styles.js +4 -4
  44. package/dist/components/select-popover-styles.js +14 -14
  45. package/dist/define-component.d.ts.map +1 -1
  46. package/dist/define-component.js +20 -1
  47. package/dist/define-component.js.map +1 -0
  48. package/dist/eslint-plugin.d.ts +0 -5
  49. package/dist/eslint-plugin.d.ts.map +1 -1
  50. package/dist/eslint-plugin.js +0 -5
  51. package/dist/eslint-plugin.js.map +1 -1
  52. package/dist/index.js.map +1 -1
  53. package/dist/styling.js +2 -2
  54. package/dist/styling.js.map +1 -1
  55. package/package.json +4 -4
  56. package/dist/components/inherit-component-parts.d.ts +0 -1
  57. package/dist/components/inherit-component-parts.js +0 -7
  58. package/dist/define-component-BP4YwMak.js +0 -28
  59. package/dist/define-component-BP4YwMak.js.map +0 -1
package/README.md CHANGED
@@ -9,13 +9,15 @@ mobile sidebar. Application-owned Astro content
9
9
  collections remain independent.
10
10
 
11
11
  `@tenphi/renderer/styling` exports `tasty`, `useGlobalStyles`, `mergeStyles`,
12
- the `Styles` type, and the `defineComponent` and `resolveComponentStyles`
13
- helpers for merging `theme.customStyles` into custom components. The facade exposes
12
+ the `Styles` type, the shared `Button` foundation, and the `defineComponent`,
13
+ `extendComponent`, and `resolveComponentStyles` helpers for merging
14
+ `theme.customStyles` into custom components. The facade exposes
14
15
  the same API through `@tenphi/cookbook/styling`.
15
16
 
16
17
  `@tenphi/renderer/eslint-plugin` exports the default Tasty ESLint plugin,
17
- `recommended` and `strict` rule maps, its configuration types, and a
18
- `validationConfig` preset covering Cookbook's theme names and styling helpers.
18
+ `recommended` and `strict` rule maps, its configuration types, a
19
+ `validationConfig` preset covering Cookbook's theme names and styling helpers,
20
+ and `createValidationConfig(theme)` for deriving names from a theme.
19
21
  Use `extends: "@tenphi/renderer"` in `tasty.config.ts` to inherit this preset
20
22
  and list only your additional tokens, states, or presets.
21
23
  It matches `@tenphi/cookbook/eslint-plugin`; see
@@ -7,7 +7,7 @@ export const BannerRoot = defineComponent("Banner", {
7
7
  as: "div",
8
8
  "data-element": "Banner",
9
9
  styles: {
10
- padding: "($gap * 1.5) $docs-nav-pad-x",
10
+ padding: "1.5x $docs-nav-pad-x",
11
11
  color: "#accent-surface-text",
12
12
  fill: "#accent-surface",
13
13
  preset: "body / strong",
@@ -6,7 +6,7 @@ export const Button = defineComponent("Button", {
6
6
  styles: {
7
7
  display: "flex",
8
8
  alignItems: "center",
9
- gap: "$gap",
9
+ gap: "1x",
10
10
  blockSize: "min 0",
11
11
  color: "#text-soft",
12
12
  cursor: "pointer",
@@ -1,13 +1,12 @@
1
1
  ---
2
- import { CardLink, CardRoot } from "./Card.styles.js";
2
+ import { CardRoot } from "./Card.styles.js";
3
3
 
4
4
  import type { CardProps as Props } from "./props.js";
5
5
 
6
6
  const { title, href } = Astro.props;
7
- const Root = href ? CardLink : CardRoot;
8
7
  ---
9
8
 
10
- <Root className="td-card" href={href}>
9
+ <CardRoot as={href ? "a" : undefined} className="td-card" href={href}>
11
10
  {title && <h3>{title}</h3>}
12
11
  <div><slot /></div>
13
- </Root>
12
+ </CardRoot>
@@ -1,5 +1,4 @@
1
1
  import { configureCookbookStates } from "./tasty-states.js";
2
- import { tasty } from "@tenphi/tasty";
3
2
  import { defineComponent } from "../define-component.js";
4
3
 
5
4
  configureCookbookStates();
@@ -16,11 +15,24 @@ export const CardRoot = defineComponent("Card", {
16
15
  textDecoration: "none",
17
16
  border: true,
18
17
  radius: "1cr",
19
- fill: "#surface-2",
18
+ fill: {
19
+ "": "#surface-2",
20
+ ":any-link & :hover": "#surface-2-hover",
21
+ ":any-link & :active": "#surface-2-pressed",
22
+ },
20
23
  "$resting-shadow-offset": "1px",
21
24
  "$resting-shadow-blur": "2px",
22
- shadow: "0 $resting-shadow-offset $resting-shadow-blur #shadow",
23
- transition: "fill $transition, shadow $transition, translate $transition",
25
+ shadow: {
26
+ "": "0 $resting-shadow-offset $resting-shadow-blur #shadow",
27
+ ":any-link & :hover": "0 .75x 2x #shadow",
28
+ },
29
+ "$hover-offset": "-1px",
30
+ translate: {
31
+ "": "0",
32
+ ":any-link & :hover": "0 $hover-offset",
33
+ ":any-link & :active": "0",
34
+ },
35
+ transition: "fill, shadow, translate",
24
36
 
25
37
  Heading2: {
26
38
  $: "h2",
@@ -45,24 +57,3 @@ export const CardRoot = defineComponent("Card", {
45
57
  },
46
58
  },
47
59
  });
48
-
49
- export const CardLink = tasty(CardRoot, {
50
- as: "a",
51
- styles: {
52
- fill: {
53
- "": "#surface-2",
54
- ":hover": "#surface-2-hover",
55
- ":active": "#surface-2-pressed",
56
- },
57
- shadow: {
58
- "": "0 $resting-shadow-offset $resting-shadow-blur #shadow",
59
- ":hover": "0 .75x 2x #shadow",
60
- },
61
- "$hover-offset": "-1px",
62
- translate: {
63
- "": "0",
64
- ":hover": "0 $hover-offset",
65
- ":active": "0",
66
- },
67
- },
68
- });
@@ -3,7 +3,6 @@ import jetBrainsMonoLatin from "@fontsource-variable/jetbrains-mono/files/jetbra
3
3
  import onestLatin from "@fontsource-variable/onest/files/onest-latin-wght-normal.woff2?url";
4
4
  import { resolveComponentStyles } from "./component-styles.js";
5
5
  import { configureCookbookStates } from "./tasty-states.js";
6
- import { TASTY_SPACING_PROPERTIES } from "../theme/tasty-config.js";
7
6
  import { getDefaultFontUsage, getFontFaces } from "../theme/fonts.js";
8
7
 
9
8
  configureCookbookStates();
@@ -31,11 +30,7 @@ export default function DocumentStyles() {
31
30
  "": null,
32
31
  ":has(#cookbook__sidebar:popover-open) & !@md": "hidden",
33
32
  },
34
- colorScheme: {
35
- "": "dark",
36
- '[data-theme="light"]': "light",
37
- "![data-theme] & @system-light": "light",
38
- },
33
+ colorScheme: { "": "dark", "@light": "light" },
39
34
  "$docs-nav-height": {
40
35
  "": "4.5rem",
41
36
  ":has(TopNavigation)": "7.25rem",
@@ -49,7 +44,8 @@ export default function DocumentStyles() {
49
44
  "$docs-nav-gap": { "": "0.75rem", "!@md": "0.5rem" },
50
45
  "$docs-sidebar-pad-x": "1.5rem",
51
46
  "$docs-content-pad-x": {
52
- "": "clamp(1.5rem, calc((100% - $content-width) / 2), 4rem)",
47
+ // Desktop heading links extend 2rem into this gutter; leave room for focus rings.
48
+ "": "clamp(2.5rem, ((100% - $content-width) / 2), 4rem)",
53
49
  "!@md": "1rem",
54
50
  },
55
51
  "$docs-menu-button-size": { "": "2.5rem", "!@md": "2.25rem" },
@@ -64,10 +60,9 @@ export default function DocumentStyles() {
64
60
  useGlobalStyles(
65
61
  ":where(html)",
66
62
  resolveComponentStyles("Document", {
67
- "@property": TASTY_SPACING_PROPERTIES,
68
63
  boxSizing: "border-box",
69
- scrollBehavior: { "@reduced-motion": "auto" },
70
- transitionDuration: { "@reduced-motion": "0.01ms" },
64
+ scrollBehavior: { "": null, "@reduced-motion": "auto" },
65
+ transitionDuration: { "": null, "@reduced-motion": "0.01ms" },
71
66
  "$margin-block-start": "0",
72
67
  "$margin-block-end": "0",
73
68
  blockSize: "min 100%",
@@ -76,12 +71,8 @@ export default function DocumentStyles() {
76
71
  All: {
77
72
  $: "&::before, &::after, *, *::before, *::after",
78
73
  boxSizing: "border-box",
79
- scrollBehavior: {
80
- "@reduced-motion": "auto",
81
- },
82
- transitionDuration: {
83
- "@reduced-motion": "0.01ms",
84
- },
74
+ scrollBehavior: { "": null, "@reduced-motion": "auto" },
75
+ transitionDuration: { "": null, "@reduced-motion": "0.01ms" },
85
76
  },
86
77
  BlockSpacing: {
87
78
  $: "*",
@@ -122,7 +113,7 @@ export default function DocumentStyles() {
122
113
  $: ":where(button), :where(input), :where(select), :where(textarea)",
123
114
  preset: "body",
124
115
  blockSize: "min $control-height",
125
- radius: "$radius",
116
+ radius: "1r",
126
117
  shadow: "none",
127
118
  },
128
119
  Pointer: {
@@ -152,23 +143,17 @@ export default function DocumentStyles() {
152
143
  },
153
144
  PrintHidden: {
154
145
  $: "*",
155
- display: { "": null, "@own(print-hidden) & @media:print": "none" },
146
+ hide: { "": null, "@own(print-hidden) & @media:print": true },
156
147
  },
157
148
  DesktopBlock: {
158
149
  $: "*",
159
- display: {
160
- "": null,
161
- "@own(desktop-block)": "block",
162
- "@own(desktop-block) & !@md": "none",
163
- },
150
+ display: { "": null, "@own(desktop-block)": "block" },
151
+ hide: { "": null, "@own(desktop-block) & !@md": true },
164
152
  },
165
153
  DesktopFlex: {
166
154
  $: "*",
167
- display: {
168
- "": null,
169
- "@own(desktop-flex)": "flex",
170
- "@own(desktop-flex) & !@md": "none",
171
- },
155
+ display: { "": null, "@own(desktop-flex)": "flex" },
156
+ hide: { "": null, "@own(desktop-flex) & !@md": true },
172
157
  },
173
158
  ScreenReaderOnly: {
174
159
  $: "*",
@@ -200,19 +185,13 @@ export default function DocumentStyles() {
200
185
  Link: { $: "a", color: "#accent-text" },
201
186
  NarrowBlock: {
202
187
  $: "*",
203
- display: {
204
- "": null,
205
- "@own(narrow)": "none",
206
- "@own(narrow) & !@lg": "block",
207
- },
188
+ display: { "": null, "@own(narrow)": "block" },
189
+ hide: { "": null, "@own(narrow) & @lg": true },
208
190
  },
209
191
  MobileBlock: {
210
192
  $: "*",
211
- display: {
212
- "": null,
213
- "@own(mobile)": "none",
214
- "@own(mobile) & !@md": "block",
215
- },
193
+ display: { "": null, "@own(mobile)": "block" },
194
+ hide: { "": null, "@own(mobile) & @md": true },
216
195
  },
217
196
  Code: {
218
197
  $: ":where(code), :where(kbd), :where(samp), :where(pre)",
@@ -228,7 +207,7 @@ export default function DocumentStyles() {
228
207
  },
229
208
  CurrentLink: {
230
209
  $: "a",
231
- radius: { "": null, '@own([aria-current="page"])': "$radius" },
210
+ radius: { "": null, '@own([aria-current="page"])': "1r" },
232
211
  },
233
212
  SearchOpen: {
234
213
  $: "body",
@@ -251,7 +230,7 @@ export default function DocumentStyles() {
251
230
  ":is(h6)": "h6",
252
231
  },
253
232
  textWrap: "balance",
254
- "$margin-block-start": { "": null, '[id="_top"]': "($gap * 2)" },
233
+ "$margin-block-start": { "": null, '[id="_top"]': "2x" },
255
234
  blockMargin: "$margin-block-start $margin-block-end",
256
235
  }),
257
236
  );
@@ -9,20 +9,20 @@ export const FooterRoot = defineComponent("Footer", {
9
9
  styles: {
10
10
  display: "flex",
11
11
  flow: "column",
12
- gap: "($gap * 3)",
12
+ gap: "3x",
13
13
  Meta: {
14
14
  display: "flex",
15
15
  flow: "row wrap",
16
16
  justifyContent: "space-between",
17
- gap: "($gap * 1.5) ($gap * 6)",
18
- blockMargin: "($gap * 6) start",
17
+ gap: "1.5x 6x",
18
+ blockMargin: "6x start",
19
19
  color: "#text-muted",
20
20
  preset: "small",
21
21
  },
22
22
  MetaLink: {
23
23
  display: "flex",
24
24
  alignItems: "center",
25
- gap: "$gap",
25
+ gap: "1x",
26
26
  inlineMargin: { "": "0", "@own(:only-child)": "auto start" },
27
27
  color: { "": "#text-muted", "@own(:hover)": "#text" },
28
28
  textDecoration: "none",
@@ -31,7 +31,7 @@ export const FooterRoot = defineComponent("Footer", {
31
31
  inlineMargin: { "": "0", "@own(:only-child)": "auto start" },
32
32
  },
33
33
  Credit: {
34
- margin: "($gap * 3) auto",
34
+ margin: "3x auto",
35
35
  color: "#text",
36
36
  preset: "small",
37
37
  textAlign: "center",
@@ -24,7 +24,7 @@ export const HeaderRoot = defineComponent("Header", {
24
24
  display: "flex",
25
25
  alignItems: "center",
26
26
  flow: "row",
27
- gap: "$gap",
27
+ gap: "1x",
28
28
  overflow: "hidden",
29
29
  flexShrink: "1",
30
30
  inlineSize: "min 0",
@@ -70,7 +70,7 @@ export const HeaderRoot = defineComponent("Header", {
70
70
  flow: "row",
71
71
  alignItems: "center",
72
72
  justifyContent: "flex-end",
73
- gap: "($gap * 0.5)",
73
+ gap: "0.5x",
74
74
  },
75
75
  Social: {
76
76
  display: "flex",
@@ -13,7 +13,7 @@ export const HeaderFrameRoot = defineComponent("HeaderFrame", {
13
13
  inlineSize: "100%",
14
14
  blockSize: "$docs-nav-height",
15
15
  padding: "0 $docs-nav-pad-x",
16
- blockBorder: "$border-width solid #border end",
16
+ blockBorder: "1bw solid #border end",
17
17
  fill: "#header",
18
18
  "$backdrop-blur": "16px",
19
19
  backdropFilter: "blur($backdrop-blur)",
@@ -8,7 +8,8 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
8
8
  "data-element": "HeaderLinks",
9
9
  styles: {
10
10
  display: "flex",
11
- flexShrink: "0",
11
+ flexShrink: { "": "1", "!@md": "0" },
12
+ inlineSize: "min 0",
12
13
  order: { "": "0", "!@md": "2" },
13
14
  "$popover-transition": "120ms",
14
15
  Desktop: {
@@ -16,7 +17,8 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
16
17
  display: "flex",
17
18
  hide: { "": false, "!@md": true },
18
19
  alignItems: "center",
19
- gap: "($gap * 0.5)",
20
+ gap: "0.5x",
21
+ inlineSize: "min 0",
20
22
  },
21
23
  Link: {
22
24
  $: "a",
@@ -24,8 +26,8 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
24
26
  alignItems: "center",
25
27
  justifyContent: "center",
26
28
  blockSize: "min $control-height",
27
- padding: "$gap ($gap * 1.25)",
28
- radius: "$radius",
29
+ padding: "1x 1.25x",
30
+ radius: "1r",
29
31
  color: "#text-soft",
30
32
  fill: "#clear",
31
33
  preset: "small / strong",
@@ -34,8 +36,15 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
34
36
  },
35
37
  DesktopLink: {
36
38
  $: "Desktop a",
39
+ // A flex container can't truncate its text, so center a block instead.
40
+ display: "block",
41
+ alignContent: "center",
42
+ inlineSize: "min 0",
43
+ overflow: "hidden",
44
+ textAlign: "center",
45
+ textOverflow: "ellipsis",
37
46
  radius: "$header-control-radius",
38
- inlinePadding: "($gap * 2)",
47
+ inlinePadding: "2x",
39
48
  },
40
49
  HoverLink: {
41
50
  $: "a",
@@ -78,16 +87,17 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
78
87
  Panel: {
79
88
  $: "Panel",
80
89
  position: "fixed",
81
- inset: "0.5rem $docs-nav-pad-x auto auto",
82
- inlineSize: "min(20rem, calc(100vw - 2 * $docs-nav-pad-x))",
90
+ blockInset: "0.5rem start",
91
+ inlineInset: "$docs-nav-pad-x end",
92
+ inlineSize: "min(20rem, (100vw - 2 * $docs-nav-pad-x))",
83
93
  blockSize: "max (100dvh - 1rem)",
84
94
  overflowY: "auto",
85
95
  margin: "0",
86
- padding: "$gap",
96
+ padding: "1x",
87
97
  color: "#text",
88
98
  fill: "#surface",
89
99
  border: true,
90
- radius: "$card-radius",
100
+ radius: "1cr",
91
101
  shadow: "0 0.75rem 2rem #shadow",
92
102
  opacity: "0",
93
103
  scale: "1 0.96",
@@ -100,8 +110,8 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
100
110
  },
101
111
  OpenPanel: {
102
112
  $: "[data-element=Panel]",
103
- opacity: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
104
- scale: { "": null, "@own(:is(:popover-open) & [data-open])": "1" },
113
+ opacity: { "": null, "@own(:popover-open & [data-open])": "1" },
114
+ scale: { "": null, "@own(:popover-open & [data-open])": "1" },
105
115
  },
106
116
  PanelNavigation: {
107
117
  $: "Panel nav",
@@ -112,7 +122,7 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
112
122
  $: "Panel a",
113
123
  justifyContent: "flex-start",
114
124
  blockSize: "min $docs-menu-button-size",
115
- inlinePadding: "($gap * 1.5)",
125
+ inlinePadding: "1.5x",
116
126
  preset: "navigation",
117
127
  textAlign: "start",
118
128
  whiteSpace: "normal",
@@ -122,14 +132,14 @@ export const HeaderLinksRoot = defineComponent("HeaderLinks", {
122
132
  $: "Panel a",
123
133
  inlinePadding: {
124
134
  "": null,
125
- "@own(:first-child)":
126
- "($gap * 1.5) start, ($docs-menu-button-size + $gap) end",
135
+ "@own(:first-child)": "1.5x start, ($docs-menu-button-size + 1x) end",
127
136
  },
128
137
  },
129
138
  Close: {
130
139
  $: "Close",
131
140
  position: "absolute",
132
- inset: "$gap $gap auto auto",
141
+ blockInset: "1x start",
142
+ inlineInset: "1x end",
133
143
  display: "grid",
134
144
  placeItems: "center",
135
145
  inlineSize: "$docs-menu-button-size",
@@ -16,7 +16,7 @@ export const HeroRoot = defineComponent("Hero", {
16
16
  gap: "clamp(2rem, 5vw, 5rem)",
17
17
  blockPadding: {
18
18
  "": "clamp(3rem, 8vw, 7rem) start, clamp(2rem, 6vw, 5rem) end",
19
- "!@md": "($gap * 4) start, clamp(2rem, 6vw, 5rem) end",
19
+ "!@md": "4x start, clamp(2rem, 6vw, 5rem) end",
20
20
  },
21
21
  Visual: {
22
22
  $: "> img, > Visual",
@@ -34,7 +34,7 @@ export const HeroRoot = defineComponent("Hero", {
34
34
  hide: {
35
35
  "": null,
36
36
  '@own([data-hero-image="dark"])': false,
37
- '(@own([data-hero-image="dark"])) & (@light)': true,
37
+ '@own([data-hero-image="dark"]) & @light': true,
38
38
  },
39
39
  },
40
40
  LightVisual: {
@@ -42,7 +42,7 @@ export const HeroRoot = defineComponent("Hero", {
42
42
  hide: {
43
43
  "": null,
44
44
  '@own([data-hero-image="light"])': true,
45
- '(@own([data-hero-image="light"])) & (@light)': false,
45
+ '@own([data-hero-image="light"]) & @light': false,
46
46
  },
47
47
  },
48
48
  Stack: {
@@ -58,7 +58,7 @@ export const HeroRoot = defineComponent("Hero", {
58
58
  display: "flex",
59
59
  flow: "column",
60
60
  alignItems: "inherit",
61
- gap: "($gap * 2)",
61
+ gap: "2x",
62
62
  },
63
63
  Title: {
64
64
  $: "h1",
@@ -80,22 +80,22 @@ export const HeroRoot = defineComponent("Hero", {
80
80
  display: "flex",
81
81
  flow: "row wrap",
82
82
  justifyContent: { "": "flex-start", "!@md": "center" },
83
- gap: "($gap * 1.5)",
83
+ gap: "1.5x",
84
84
  },
85
85
  Action: {
86
86
  $: "Action",
87
87
  display: "inline-flex",
88
88
  alignItems: "center",
89
89
  blockSize: "min $control-height",
90
- padding: "($gap * 1.25) ($gap * 2.5)",
91
- gap: "$gap",
90
+ padding: "1.25x 2.5x",
91
+ gap: "1x",
92
92
  color: "#text",
93
93
  border: { "": true, "@own(minimal)": "#clear" },
94
94
  radius: "round",
95
95
  fill: "#surface-2",
96
96
  preset: "navigation / strong",
97
97
  textDecoration: "none",
98
- transition: "fill $transition",
98
+ transition: "fill",
99
99
  },
100
100
  HoverAction: {
101
101
  $: "[data-element=Action]",
@@ -13,7 +13,6 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
13
13
  display: "flex",
14
14
  flexShrink: "0",
15
15
  // Shared selector defaults are resolved once during server-side module evaluation.
16
- // eslint-disable-next-line tasty/no-runtime-styles-mutation
17
16
  "$popover-transition": languageSelectStyles["$popover-transition"],
18
17
  Trigger: {
19
18
  // Reuse the shared, server-only popover anatomy.
@@ -21,10 +20,10 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
21
20
  ...languageSelectStyles.Trigger,
22
21
  inlineSize: "8rem",
23
22
  blockSize: "$control-height",
24
- padding: "0 $gap",
23
+ padding: "0 1x",
25
24
  fill: "#clear",
26
25
  border: "0",
27
- transition: "color $transition, fill $transition",
26
+ transition: "color, fill",
28
27
  },
29
28
  HoverTrigger: {
30
29
  // Reuse the shared, server-only popover anatomy.
@@ -106,14 +105,14 @@ export const LanguageSelectRoot = defineComponent("LanguageSelect", {
106
105
  "": null,
107
106
  "[data-sidebar]": "auto start, anchor(top) end",
108
107
  },
109
- blockMargin: { "": null, "[data-sidebar]": "$gap end" },
108
+ blockMargin: { "": null, "[data-sidebar]": "1x end" },
110
109
  inlineInset: {
111
110
  "": null,
112
- "[data-sidebar]": "$gap start, auto end",
111
+ "[data-sidebar]": "1x start, auto end",
113
112
  },
114
113
  inlineSize: {
115
114
  "": null,
116
- "[data-sidebar]": "min(20rem, calc(100vw - 4rem))",
115
+ "[data-sidebar]": "min(20rem, (100vw - 4rem))",
117
116
  },
118
117
  blockSize: {
119
118
  "": null,
@@ -1,4 +1,3 @@
1
- import { TASTY_SPACING_PROPERTIES } from "../theme/tasty-config.js";
2
1
  import { configureCookbookStates } from "./tasty-states.js";
3
2
  import { defineComponent } from "../define-component.js";
4
3
 
@@ -8,8 +7,7 @@ export const MainContentRoot = defineComponent("MainContent", {
8
7
  as: "main",
9
8
  "data-element": "MainContent",
10
9
  styles: {
11
- "@property": TASTY_SPACING_PROPERTIES,
12
- padding: "0 0 5rem",
10
+ padding: "5rem bottom",
13
11
  // A focus target for the skip link and page swaps, not a control. Clicking
14
12
  // its text focuses it, so keyboard scrolling would otherwise show a ring.
15
13
  outline: "none",
@@ -17,7 +15,7 @@ export const MainContentRoot = defineComponent("MainContent", {
17
15
  ContentSpacing: {
18
16
  $: ":where(Panel > Container) > * + *",
19
17
  blockMargin: "$margin-block-start $margin-block-end",
20
- "$margin-block-start": "($gap * 3)",
18
+ "$margin-block-start": "3x",
21
19
  },
22
20
  Container: {
23
21
  $: "Panel > Container",
@@ -27,12 +25,12 @@ export const MainContentRoot = defineComponent("MainContent", {
27
25
  Panel: {
28
26
  $: "Panel",
29
27
  "$padding-block-start": {
30
- "": "($gap * 3)",
31
- "@own(:nth-of-type(2))": "($gap * 2)",
28
+ "": "3x",
29
+ "@own(:nth-of-type(2))": "2x",
32
30
  },
33
31
  "$padding-block-end": {
34
- "": "($gap * 3)",
35
- "@own(:first-of-type)": "($gap * 2)",
32
+ "": "3x",
33
+ "@own(:first-of-type)": "2x",
36
34
  },
37
35
  blockPadding: "$padding-block-start $padding-block-end",
38
36
  inlinePadding: "$docs-content-pad-x",
@@ -12,8 +12,8 @@ export const MainPaneRoot = defineComponent("MainPane", {
12
12
  inlineSize: {
13
13
  "": "0 100% initial",
14
14
  "[data-has-sidebar] & [data-has-toc]":
15
- "min(calc(100% - $sidebar-width), calc($content-width + (100% - $content-width - $sidebar-width) / 2))",
16
- "([data-has-sidebar] & [data-has-toc]) & (!@lg)": "100%",
15
+ "min((100% - $sidebar-width), ($content-width + (100% - $content-width - $sidebar-width) / 2))",
16
+ "[data-has-sidebar] & [data-has-toc] & !@lg": "100%",
17
17
  },
18
18
  },
19
19
  });
@@ -8,36 +8,36 @@ export function MarkdownAlertStyles() {
8
8
  useGlobalStyles(
9
9
  ".cookbook-alert",
10
10
  resolveComponentStyles("MarkdownAlert", {
11
- padding: "($gap * 2) ($gap * 2.5)",
11
+ padding: "2x 2.5x",
12
12
  color: {
13
13
  "": "#text-soft",
14
- "[data-note]": "#blue-text",
15
- "[data-tip]": "#green-text",
14
+ "[data-note]": "#info-text",
15
+ "[data-tip]": "#success-text",
16
16
  "[data-caution]": "#warning-text",
17
- "[data-danger]": "#red-text",
17
+ "[data-danger]": "#danger-text",
18
18
  },
19
19
  border: {
20
20
  "": true,
21
- "[data-note]": "#blue",
22
- "[data-tip]": "#green",
21
+ "[data-note]": "#info",
22
+ "[data-tip]": "#success",
23
23
  "[data-caution]": "#warning",
24
- "[data-danger]": "#red",
24
+ "[data-danger]": "#danger",
25
25
  },
26
- radius: "$card-radius",
26
+ radius: "1cr",
27
27
  fill: {
28
28
  "": "#surface-2",
29
- "[data-note]": "#blue-surface",
30
- "[data-tip]": "#green-surface",
29
+ "[data-note]": "#info-surface",
30
+ "[data-tip]": "#success-surface",
31
31
  "[data-caution]": "#warning-surface",
32
- "[data-danger]": "#red-surface",
32
+ "[data-danger]": "#danger-surface",
33
33
  },
34
34
  Title: {
35
35
  $: "Title",
36
36
  display: "flex",
37
37
  alignItems: "center",
38
- gap: "$gap",
38
+ gap: "1x",
39
39
  "$margin-block-start": "0",
40
- "$margin-block-end": "$gap",
40
+ "$margin-block-end": "1x",
41
41
  blockMargin: "$margin-block-start $margin-block-end",
42
42
  inlineMargin: "0",
43
43
  color: "inherit",