@tenphi/renderer 0.28.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +6 -4
  2. package/dist/client/elements.d.ts +11 -0
  3. package/dist/client/elements.d.ts.map +1 -0
  4. package/dist/client/elements.js +16 -0
  5. package/dist/client/elements.js.map +1 -0
  6. package/dist/client/navigation.js +1 -1
  7. package/dist/client/navigation.js.map +1 -1
  8. package/dist/components/Banner.styles.js +1 -1
  9. package/dist/components/Button.styles.js +1 -1
  10. package/dist/components/Card.astro +3 -4
  11. package/dist/components/Card.styles.js +16 -25
  12. package/dist/components/Document.styles.js +19 -40
  13. package/dist/components/Footer.styles.js +5 -5
  14. package/dist/components/Header.styles.js +2 -2
  15. package/dist/components/HeaderFrame.styles.js +1 -1
  16. package/dist/components/HeaderLinks.styles.js +25 -15
  17. package/dist/components/Hero.styles.js +8 -8
  18. package/dist/components/LanguageSelect.styles.js +5 -6
  19. package/dist/components/MainContent.styles.js +6 -8
  20. package/dist/components/MainPane.styles.js +2 -2
  21. package/dist/components/MarkdownAlert.styles.js +13 -13
  22. package/dist/components/MarkdownCodeBlock.styles.js +7 -10
  23. package/dist/components/MarkdownContent.styles.js +11 -17
  24. package/dist/components/MarkdownHeading.styles.js +4 -6
  25. package/dist/components/MarkdownInlineCode.styles.js +1 -1
  26. package/dist/components/MarkdownTable.styles.js +7 -10
  27. package/dist/components/Mermaid.styles.js +2 -2
  28. package/dist/components/MermaidSource.styles.js +1 -1
  29. package/dist/components/MobileMenuFooter.styles.js +5 -5
  30. package/dist/components/MobileMenuToggle.styles.js +2 -2
  31. package/dist/components/MobileNavigationTabs.styles.js +9 -10
  32. package/dist/components/MobileTableOfContents.styles.js +7 -7
  33. package/dist/components/PackageVersion.styles.js +1 -1
  34. package/dist/components/PageActions.styles.js +3 -3
  35. package/dist/components/PageFrame.styles.js +1 -1
  36. package/dist/components/Pagination.styles.js +13 -18
  37. package/dist/components/Preview.styles.js +1 -1
  38. package/dist/components/Search.styles.js +7 -8
  39. package/dist/components/SearchButton.styles.js +13 -5
  40. package/dist/components/SearchResults.styles.js +20 -20
  41. package/dist/components/Sidebar.styles.js +17 -19
  42. package/dist/components/SkipLink.styles.js +4 -3
  43. package/dist/components/SocialIcons.styles.js +1 -1
  44. package/dist/components/Steps.styles.js +3 -3
  45. package/dist/components/TableOfContents.styles.js +3 -3
  46. package/dist/components/TableOfContentsLayout.styles.js +2 -2
  47. package/dist/components/ThemeSelect.styles.js +16 -16
  48. package/dist/components/TopNavigation.styles.js +1 -3
  49. package/dist/components/VersionSwitcher.styles.js +4 -4
  50. package/dist/components/select-popover-styles.js +14 -14
  51. package/dist/define-component.d.ts.map +1 -1
  52. package/dist/define-component.js +20 -1
  53. package/dist/define-component.js.map +1 -0
  54. package/dist/eslint-plugin.d.ts +0 -5
  55. package/dist/eslint-plugin.d.ts.map +1 -1
  56. package/dist/eslint-plugin.js +0 -5
  57. package/dist/eslint-plugin.js.map +1 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/styling.js +2 -2
  60. package/dist/styling.js.map +1 -1
  61. package/package.json +6 -4
  62. package/dist/components/inherit-component-parts.d.ts +0 -1
  63. package/dist/components/inherit-component-parts.js +0 -7
  64. package/dist/define-component-BP4YwMak.js +0 -28
  65. package/dist/define-component-BP4YwMak.js.map +0 -1
@@ -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",
@@ -21,23 +21,22 @@ export function MarkdownCodeBlockStyles() {
21
21
  "$margin-block-end": "0",
22
22
  blockMargin: "$margin-block-start $margin-block-end",
23
23
  inlineMargin: "0",
24
- padding: "0 3.75rem 0 1rem",
24
+ inlinePadding: "1rem 3.75rem",
25
25
  // Balance a single code line around the copy control, including the border.
26
- blockPadding:
27
- "max(0px, ($copy-button-size - 1lh) / 2 + $gap - $border-width)",
26
+ blockPadding: "max(0px, ($copy-button-size - 1lh) / 2 + 1x - 1bw)",
28
27
  overflowX: "auto",
29
28
  color: "#syntax-text",
30
29
  border: true,
31
30
  fill: "#syntax-bg",
32
- radius: "$card-radius",
31
+ radius: "1cr",
33
32
  tabSize: "2",
34
33
  },
35
34
  CopyButton: {
36
35
  $: "> CopyButton",
37
36
  position: "absolute",
38
37
  zIndex: "1",
39
- blockInset: "$gap start",
40
- inlineInset: "$gap end",
38
+ blockInset: "1x start",
39
+ inlineInset: "1x end",
41
40
  "$margin-block-start": "0",
42
41
  "$margin-block-end": "0",
43
42
  blockMargin: "$margin-block-start $margin-block-end",
@@ -50,10 +49,10 @@ export function MarkdownCodeBlockStyles() {
50
49
  color: "#text-soft",
51
50
  border: true,
52
51
  fill: "#surface-2",
53
- radius: "$radius",
52
+ radius: "1r",
54
53
  preset: "small / strong",
55
54
  cursor: "pointer",
56
- transition: "color $transition, fill $transition",
55
+ transition: "color, fill",
57
56
  },
58
57
  HoverCopyButton: {
59
58
  $: '> [data-element="CopyButton"]',
@@ -118,8 +117,6 @@ export function MarkdownCodeBlockStyles() {
118
117
  preset: { "": null, diff: "code" },
119
118
  },
120
119
  EmptyDiffLine: {
121
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
122
- // eslint-disable-next-line tasty/no-state-in-selector
123
120
  $: "pre > code > Line:empty::before",
124
121
  content: { "": null, diff: '"\\200b"' },
125
122
  },
@@ -38,7 +38,7 @@ export default function MarkdownStyles() {
38
38
  "": null,
39
39
  "@prose-block": "$margin-block-start $margin-block-end",
40
40
  },
41
- "$margin-block-start": { "": null, "@prose-block": "($gap * 3)" },
41
+ "$margin-block-start": { "": null, "@prose-block": "3x" },
42
42
  },
43
43
  HeadingSpacing: {
44
44
  $: "* + h1, * + h2, * + h3, * + h4, * + h5, * + h6, * + [data-element=MarkdownHeading]",
@@ -55,7 +55,7 @@ export default function MarkdownStyles() {
55
55
  },
56
56
  CompactItem: {
57
57
  $: ":where(li + li), :where(dt + dt), :where(dt + dd), :where(dd + dd)",
58
- "$margin-block-start": { "": null, "@prose": "($gap * 0.5)" },
58
+ "$margin-block-start": { "": null, "@prose": "0.5x" },
59
59
  "$margin-block-end": { "": null, "@prose": "0" },
60
60
  blockMargin: {
61
61
  "": null,
@@ -72,7 +72,7 @@ export default function MarkdownStyles() {
72
72
  },
73
73
  DefinitionDescription: {
74
74
  $: "dd",
75
- inlinePadding: { "": null, "@prose": "($gap * 2) start" },
75
+ inlinePadding: { "": null, "@prose": "2x start" },
76
76
  },
77
77
  Link: {
78
78
  // Keep ordinary prose links at their former weight so heading controls own color.
@@ -96,12 +96,12 @@ export default function MarkdownStyles() {
96
96
  Rule: {
97
97
  $: "hr",
98
98
  border: { "": null, "@prose": "0" },
99
- blockBorder: { "": null, "@prose": "$border-width solid #border end" },
99
+ blockBorder: { "": null, "@prose": "1bw solid #border end" },
100
100
  },
101
101
  Details: {
102
102
  $: "details",
103
103
  "$details-border-width": "2px",
104
- inlinePadding: { "": null, "@prose": "($gap * 2) start" },
104
+ inlinePadding: { "": null, "@prose": "2x start" },
105
105
  inlineBorder: {
106
106
  "": null,
107
107
  "@prose": "$details-border-width solid #border start",
@@ -122,7 +122,7 @@ export default function MarkdownStyles() {
122
122
  },
123
123
  Summary: {
124
124
  $: "summary",
125
- display: { "": "", "@prose": "block" },
125
+ display: { "": null, "@prose": "block" },
126
126
  inlineMargin: { "": null, "@prose": "-0.5rem start" },
127
127
  inlinePadding: { "": null, "@prose": "0.5rem start" },
128
128
  color: { "": null, "@prose": "#text" },
@@ -136,7 +136,7 @@ export default function MarkdownStyles() {
136
136
  },
137
137
  "$margin-block-end": {
138
138
  "": null,
139
- "@own(:is([open] >)) & @prose": "($gap * 2)",
139
+ "@own(:is([open] >)) & @prose": "2x",
140
140
  },
141
141
  blockMargin: {
142
142
  "": null,
@@ -145,36 +145,30 @@ export default function MarkdownStyles() {
145
145
  },
146
146
  },
147
147
  SummaryMarker: {
148
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
149
- // eslint-disable-next-line tasty/no-state-in-selector
150
148
  $: "summary:not([data-not-content] *)::marker, summary:not([data-not-content] *)::-webkit-details-marker",
151
149
  hide: true,
152
150
  },
153
151
  SummaryIcon: {
154
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
155
- // eslint-disable-next-line tasty/no-state-in-selector
156
152
  $: "summary:not([data-not-content] *)::before",
157
153
  content: '""',
158
154
  display: "inline-block",
159
155
  inlineSize: "1.25rem",
160
156
  blockSize: "1.25rem",
161
- inlineMargin: "($gap * 0.5) end",
157
+ inlineMargin: "0.5x end",
162
158
  verticalAlign: "middle",
163
159
  fill: "#current",
164
160
  // The imported SVG is encoded at build time and never evaluated in the browser.
165
161
  // eslint-disable-next-line tasty/no-runtime-styles-mutation
166
162
  mask: `url("${svgIconUrl(chevronRightIcon)}") center / contain no-repeat`,
167
- transition: "rotate $transition",
163
+ transition: "rotate",
168
164
  },
169
165
  OpenSummaryIcon: {
170
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
171
- // eslint-disable-next-line tasty/no-state-in-selector
172
- $: "details[open] > summary:not([data-not-content] *)::before",
166
+ $: "summary:is(details[open] > *):not([data-not-content] *)::before",
173
167
  rotate: "90deg",
174
168
  },
175
169
  Code: {
176
170
  $: ":where(code)",
177
- radius: { "": null, "@prose": "($radius * 0.65)" },
171
+ radius: { "": null, "@prose": "0.65r" },
178
172
  },
179
173
  }),
180
174
  );
@@ -24,11 +24,11 @@ export function MarkdownHeadingStyles() {
24
24
  Heading: {
25
25
  $: "> *",
26
26
  color: { "": null, "@own(:first-child)": "inherit" },
27
- display: { "": "", "@own(:first-child)": "inline" },
27
+ display: { "": null, "@own(:first-child)": "inline" },
28
28
  inlinePadding: {
29
29
  "": null,
30
30
  "@own(:first-child)": "0 end",
31
- "(@own(:first-child)) & (!@md)": "1.75rem end",
31
+ "@own(:first-child) & !@md": "1.75rem end",
32
32
  },
33
33
  },
34
34
  Link: {
@@ -51,10 +51,10 @@ export function MarkdownHeadingStyles() {
51
51
  "@media(hover: hover)": "0",
52
52
  "!@md": "1",
53
53
  },
54
- radius: "$radius",
54
+ radius: "1r",
55
55
  userSelect: "none",
56
56
  textDecoration: "none",
57
- transition: "color $transition, fill $transition, opacity $transition",
57
+ transition: "color, fill, opacity",
58
58
  },
59
59
  RevealedLink: {
60
60
  $: "> [data-element=Anchor]",
@@ -98,8 +98,6 @@ export function MarkdownHeadingStyles() {
98
98
  },
99
99
  },
100
100
  CopiedIcon: {
101
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
102
- // eslint-disable-next-line tasty/no-state-in-selector
103
101
  $: '> Anchor[data-copy-state="copied"]::after',
104
102
  content: '""',
105
103
  position: "absolute",
@@ -12,7 +12,7 @@ export function MarkdownInlineCodeStyles() {
12
12
  color: "#text-soft",
13
13
  fill: "#surface-3",
14
14
  preset: "inline-code",
15
- radius: "($radius * 0.65)",
15
+ radius: "0.65r",
16
16
  }),
17
17
  );
18
18
  return null;
@@ -15,12 +15,12 @@ export function MarkdownTableStyles() {
15
15
  borderSpacing: "0",
16
16
  color: "#text-soft",
17
17
  preset: "small",
18
- border: "$border-width solid #border",
19
- radius: "$card-radius",
18
+ border: true,
19
+ radius: "1cr",
20
20
  },
21
21
  Cell: {
22
22
  $: "th, td",
23
- padding: "($gap * 1.5) ($gap * 2)",
23
+ padding: "1.5x 2x",
24
24
  verticalAlign: "top",
25
25
  textAlign: {
26
26
  "": null,
@@ -36,20 +36,17 @@ export function MarkdownTableStyles() {
36
36
  $: "tbody td",
37
37
  // Clear only the last row's end border; the theme may configure its start border.
38
38
  // eslint-disable-next-line tasty/prefer-shorthand-property
39
- borderBlockEnd: { "@own(:is(tr:last-child >))": "0" },
39
+ borderBlockEnd: { "": null, "@own(:is(tr:last-child >))": "0" },
40
40
  },
41
41
  HeaderCell: {
42
42
  $: "th",
43
43
  color: "#text",
44
44
  fill: "#surface-2",
45
45
  textAlign: { "": "start", "@own(align)": null },
46
+ // Round only the top corners so the header row matches in either direction.
46
47
  radius: {
47
- "@own(:is(thead:first-child tr:first-child >) & :first-child & !:last-child)":
48
- "($card-radius - $border-width) top-left",
49
- "@own(:is(thead:first-child tr:first-child >) & !:first-child & :last-child)":
50
- "($card-radius - $border-width) top-right",
51
- "@own(:is(thead:first-child tr:first-child >) & :first-child & :last-child)":
52
- "($card-radius - $border-width) top",
48
+ "": null,
49
+ "@own(:is(thead:first-child tr:first-child >))": "(1cr - 1bw) top",
53
50
  },
54
51
  },
55
52
  Scroll: {
@@ -11,11 +11,11 @@ export function MermaidStyles() {
11
11
  display: "grid",
12
12
  placeItems: "center",
13
13
  inlineSize: "min 0",
14
- padding: "($gap * 2)",
14
+ padding: "2x",
15
15
  overflowX: "auto",
16
16
  border: true,
17
17
  fill: "#surface-2",
18
- radius: "$card-radius",
18
+ radius: "1cr",
19
19
  Diagram: {
20
20
  $: "> svg",
21
21
  $bg: "#surface-2",
@@ -13,7 +13,7 @@ export function MermaidSourceStyles() {
13
13
  color: "#syntax-text",
14
14
  border: true,
15
15
  fill: "#syntax-bg",
16
- radius: "$card-radius",
16
+ radius: "1cr",
17
17
  tabSize: "2",
18
18
  }),
19
19
  );
@@ -11,17 +11,17 @@ export const MobileMenuFooterRoot = defineComponent("MobileMenuFooter", {
11
11
  alignItems: "center",
12
12
  justifyContent: "space-between",
13
13
  flow: "row wrap",
14
- gap: "($gap * 2)",
15
- blockPadding: "$gap",
16
- blockBorder: "$border-width solid #border start",
14
+ gap: "2x",
15
+ blockPadding: "1x",
16
+ blockBorder: "1bw solid #border start",
17
17
  Social: {
18
18
  $: "Social",
19
19
  display: "flex",
20
20
  hide: { "": false, ":empty": true },
21
21
  alignItems: "center",
22
- gap: "($gap * 2)",
22
+ gap: "2x",
23
23
  inlineMargin: "auto end",
24
- blockPadding: "($gap * 2)",
24
+ blockPadding: "2x",
25
25
  },
26
26
  },
27
27
  });
@@ -11,14 +11,14 @@ export const MobileMenuToggleRoot = extendComponent(
11
11
  "data-element": "MobileMenuToggle",
12
12
  styles: {
13
13
  color: { ":hover": "#text", ":active": "#accent-text" },
14
- display: { "": "none", "!@md": "flex" },
14
+ hide: { "": true, "!@md": false },
15
15
  inlineSize: "(100% + ($docs-nav-pad-x * 2))",
16
16
  inlineMargin: "(-1 * $docs-nav-pad-x)",
17
17
  blockSize: "0 3rem initial",
18
18
  flexShrink: "0",
19
19
  padding: "0 $docs-nav-pad-x",
20
20
  border: "0",
21
- blockBorder: "$border-width solid #border start",
21
+ blockBorder: "1bw solid #border start",
22
22
  radius: "0",
23
23
  fill: "#clear",
24
24
  preset: "navigation",
@@ -11,7 +11,7 @@ export const MobileNavigationTabsRoot = defineComponent(
11
11
  styles: {
12
12
  display: "grid",
13
13
  hide: { "": false, "@md": true },
14
- gap: "$gap",
14
+ gap: "1x",
15
15
  blockMargin: "0",
16
16
  Label: {
17
17
  $: "Label",
@@ -24,11 +24,11 @@ export const MobileNavigationTabsRoot = defineComponent(
24
24
  display: "flex",
25
25
  alignItems: "center",
26
26
  justifyContent: "space-between",
27
- gap: "$gap",
27
+ gap: "1x",
28
28
  blockSize: "min 2.75rem",
29
- padding: "$gap ($gap * 1.25)",
29
+ padding: "1x 1.25x",
30
30
  border: true,
31
- radius: "$radius",
31
+ radius: "1r",
32
32
  color: "#text-soft",
33
33
  fill: "#surface",
34
34
  preset: "navigation",
@@ -50,12 +50,11 @@ export const MobileNavigationTabsRoot = defineComponent(
50
50
  $: "ul",
51
51
  display: "grid",
52
52
  gap: "1bw",
53
- padding: "$gap",
54
- blockMargin: "$gap start",
55
- margin: "$gap 0 0",
53
+ padding: "1x",
54
+ margin: "1x top",
56
55
  listStyle: "none",
57
56
  border: true,
58
- radius: "$radius",
57
+ radius: "1r",
59
58
  fill: "#surface",
60
59
  },
61
60
  Item: { $: "li", margin: "0" },
@@ -64,11 +63,11 @@ export const MobileNavigationTabsRoot = defineComponent(
64
63
  display: "flex",
65
64
  alignItems: "center",
66
65
  blockSize: "min 2.25rem",
67
- padding: "($gap * 0.75) ($gap * 1.25)",
66
+ padding: "0.75x 1.25x",
68
67
  color: "#text-soft",
69
68
  preset: "navigation",
70
69
  textDecoration: "none",
71
- radius: "$radius",
70
+ radius: "1r",
72
71
  },
73
72
  HoverLink: {
74
73
  $: "a",
@@ -11,16 +11,16 @@ export const MobileTableOfContentsRoot = defineComponent(
11
11
  styles: {
12
12
  display: "block",
13
13
  hide: { "": true, "!@lg": false },
14
- padding: "$gap $docs-sidebar-pad-x",
15
- blockBorder: "$border-width solid #border end",
14
+ padding: "1x $docs-sidebar-pad-x",
15
+ blockBorder: "1bw solid #border end",
16
16
  fill: "#surface",
17
17
  Summary: {
18
18
  $: "summary",
19
- padding: "$gap",
19
+ padding: "1x",
20
20
  color: "#text",
21
21
  preset: "small / strong",
22
22
  cursor: "pointer",
23
- radius: "$radius",
23
+ radius: "1r",
24
24
  },
25
25
  List: {
26
26
  $: "ul",
@@ -31,15 +31,15 @@ export const MobileTableOfContentsRoot = defineComponent(
31
31
  display: "grid",
32
32
  gap: "$item-gap",
33
33
  },
34
- NestedList: { $: "ul ul", inlinePadding: "($gap * 2) start" },
34
+ NestedList: { $: "ul ul", inlinePadding: "2x start" },
35
35
  Item: { $: "li", listStyle: "none", margin: "0", padding: "0" },
36
36
  Link: {
37
37
  $: "a",
38
38
  display: "block",
39
- padding: "$gap",
39
+ padding: "1x",
40
40
  color: "#text-soft",
41
41
  preset: "small",
42
- radius: "$radius",
42
+ radius: "1r",
43
43
  textDecoration: "none",
44
44
  },
45
45
  HoverLink: {
@@ -12,7 +12,7 @@ export const PackageVersionRoot = defineComponent("PackageVersion", {
12
12
  alignItems: "center",
13
13
  flexShrink: "0",
14
14
  blockSize: "min 1.5rem",
15
- inlinePadding: "($gap * 0.75)",
15
+ inlinePadding: "0.75x",
16
16
  color: "#text-soft",
17
17
  fill: "#surface-2",
18
18
  border: true,
@@ -10,15 +10,15 @@ export const PageActionsRoot = defineComponent("PageActions", {
10
10
  display: "flex",
11
11
  flow: "row wrap",
12
12
  alignItems: "center",
13
- gap: "$gap",
13
+ gap: "1x",
14
14
  preset: "small",
15
15
  Control: {
16
16
  $: "button, a",
17
17
  display: "inline-flex",
18
18
  alignItems: "center",
19
- padding: "$gap ($gap * 1.5)",
19
+ padding: "1x 1.5x",
20
20
  border: true,
21
- radius: "$radius",
21
+ radius: "1r",
22
22
  color: "#text",
23
23
  fill: "#surface",
24
24
  preset: "small",
@@ -22,7 +22,7 @@ export const PageFrameRoot = defineComponent("PageFrame", {
22
22
  inlinePadding: {
23
23
  "": null,
24
24
  "[data-has-sidebar]": "$sidebar-width start",
25
- "([data-has-sidebar]) & (!@md)": "0 start",
25
+ "[data-has-sidebar] & !@md": "0 start",
26
26
  },
27
27
  },
28
28
  Columns: {
@@ -10,23 +10,24 @@ export const PaginationRoot = defineComponent("Pagination", {
10
10
  as: "div",
11
11
  "data-element": "Pagination",
12
12
  styles: {
13
- display: { "": "grid", "@media:print": "none" },
14
- gap: "($gap * 2)",
13
+ display: "grid",
14
+ hide: { "": false, "@media:print": true },
15
+ gap: "2x",
15
16
  gridColumns: { "": "repeat(2, minmax(0, 1fr))", "!@sm": "1fr" },
16
17
  Link: {
17
18
  $: "a",
18
- radius: "$radius",
19
+ radius: "1r",
19
20
  display: "flex",
20
21
  alignItems: "center",
21
22
  justifyContent: "flex-start",
22
- gap: "$gap",
23
+ gap: "1x",
23
24
  inlineSize: "100%",
24
- padding: "($gap * 2)",
25
+ padding: "2x",
25
26
  border: true,
26
27
  color: "#text-soft",
27
28
  fill: "#surface-2",
28
29
  shadow: "none",
29
- transition: "color $transition, background-color $transition",
30
+ transition: "color, fill",
30
31
  textDecoration: "none",
31
32
  overflowWrap: "anywhere",
32
33
  },
@@ -35,12 +36,12 @@ export const PaginationRoot = defineComponent("Pagination", {
35
36
  gridColumn: {
36
37
  "": null,
37
38
  '@own([rel="prev"])': "1",
38
- '(@own([rel="prev"])) & (!@sm)': "auto",
39
+ '@own([rel="prev"]) & !@sm': "auto",
39
40
  },
40
41
  gridRow: {
41
42
  "": null,
42
43
  '@own([rel="prev"])': "1",
43
- '(@own([rel="prev"])) & (!@sm)': "auto",
44
+ '@own([rel="prev"]) & !@sm': "auto",
44
45
  },
45
46
  },
46
47
  NextLink: {
@@ -50,17 +51,15 @@ export const PaginationRoot = defineComponent("Pagination", {
50
51
  gridColumn: {
51
52
  "": null,
52
53
  '@own([rel="next"])': "2",
53
- '(@own([rel="next"])) & (!@sm)': "auto",
54
+ '@own([rel="next"]) & !@sm': "auto",
54
55
  },
55
56
  gridRow: {
56
57
  "": null,
57
58
  '@own([rel="next"])': "1",
58
- '(@own([rel="next"])) & (!@sm)': "auto",
59
+ '@own([rel="next"]) & !@sm': "auto",
59
60
  },
60
61
  },
61
62
  NextIcon: {
62
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
63
- // eslint-disable-next-line tasty/no-state-in-selector
64
63
  $: 'a[rel="next"]::before',
65
64
  order: "1",
66
65
  // The imported SVG is encoded at build time and never evaluated in the browser.
@@ -107,17 +106,13 @@ export const PaginationRoot = defineComponent("Pagination", {
107
106
  mask: `url("${svgIconUrl(arrowLeftIcon)}") center / contain no-repeat`,
108
107
  },
109
108
  PreviousIconRtl: {
110
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
111
- // eslint-disable-next-line tasty/no-state-in-selector
112
- $: '&:is([dir="rtl"] *) a[rel="prev"]::before',
109
+ $: 'a[rel="prev"]:dir(rtl)::before',
113
110
  // The imported SVG is encoded at build time and never evaluated in the browser.
114
111
  // eslint-disable-next-line tasty/no-runtime-styles-mutation
115
112
  mask: `url("${svgIconUrl(arrowRightIcon)}") center / contain no-repeat`,
116
113
  },
117
114
  NextIconRtl: {
118
- // Tasty 3.9.3 appends @own states after pseudo-elements, producing invalid CSS.
119
- // eslint-disable-next-line tasty/no-state-in-selector
120
- $: '&:is([dir="rtl"] *) a[rel="next"]::before',
115
+ $: 'a[rel="next"]:dir(rtl)::before',
121
116
  // The imported SVG is encoded at build time and never evaluated in the browser.
122
117
  // eslint-disable-next-line tasty/no-runtime-styles-mutation
123
118
  mask: `url("${svgIconUrl(arrowLeftIcon)}") center / contain no-repeat`,
@@ -53,7 +53,7 @@ export const PreviewRoot = defineComponent("Preview", {
53
53
  preset: "small",
54
54
  fill: "#surface-2",
55
55
  cursor: "pointer",
56
- transition: "fill $transition",
56
+ transition: "fill",
57
57
  },
58
58
  HoverSummary: {
59
59
  $: "> details > summary",