@stainless-api/docs-ui 0.1.0-beta.8 → 0.1.0-beta.81

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 (155) hide show
  1. package/dist/chunk-BYypO7fO.js +18 -0
  2. package/dist/components/MaskedInput.d.ts +14 -0
  3. package/dist/components/MaskedInput.js +76 -0
  4. package/dist/components/breadcrumbs.d.ts +25 -0
  5. package/dist/components/breadcrumbs.js +64 -0
  6. package/dist/components/icons.d.ts +65 -0
  7. package/dist/components/icons.js +941 -0
  8. package/dist/components/index.d.ts +16 -0
  9. package/dist/components/index.js +75 -0
  10. package/dist/components/method.d.ts +59 -0
  11. package/dist/components/method.js +97 -0
  12. package/dist/components/overview.d.ts +39 -0
  13. package/dist/components/overview.js +139 -0
  14. package/dist/components/primitives.d.ts +107 -0
  15. package/dist/components/primitives.js +253 -0
  16. package/dist/components/properties.d.ts +54 -0
  17. package/dist/components/properties.js +146 -0
  18. package/dist/components/sdk-sidebar.d.ts +15 -0
  19. package/dist/components/sdk-sidebar.js +52 -0
  20. package/dist/components/sdk.d.ts +128 -0
  21. package/dist/components/sdk.js +490 -0
  22. package/dist/components/snippets.d.ts +71 -0
  23. package/dist/components/snippets.js +184 -0
  24. package/dist/components/stl-sidebar.d.ts +58 -0
  25. package/dist/components/stl-sidebar.js +114 -0
  26. package/dist/contexts/component-generics.d.ts +30 -0
  27. package/dist/contexts/component-generics.js +33 -0
  28. package/dist/contexts/component-types.d.ts +8 -0
  29. package/dist/contexts/component-types.js +0 -0
  30. package/dist/contexts/component.d.ts +21 -0
  31. package/dist/contexts/component.js +24 -0
  32. package/dist/contexts/docs.d.ts +62 -0
  33. package/dist/contexts/docs.js +91 -0
  34. package/dist/contexts/index.d.ts +13 -0
  35. package/dist/contexts/index.js +45 -0
  36. package/dist/contexts/markdown.d.ts +22 -0
  37. package/dist/contexts/markdown.js +49 -0
  38. package/dist/contexts/navigation.d.ts +29 -0
  39. package/dist/contexts/navigation.js +24 -0
  40. package/dist/contexts/use-components.d.ts +6 -0
  41. package/dist/contexts/use-components.js +8 -0
  42. package/dist/index-pvh-w1xa.d.ts +1776 -0
  43. package/dist/index.d.ts +7 -0
  44. package/dist/index.js +9 -7542
  45. package/dist/languages/cli.d.ts +38 -0
  46. package/dist/languages/cli.js +167 -0
  47. package/dist/languages/csharp.d.ts +42 -0
  48. package/dist/languages/csharp.js +284 -0
  49. package/dist/languages/go.d.ts +40 -0
  50. package/dist/languages/go.js +304 -0
  51. package/dist/languages/http.d.ts +46 -0
  52. package/dist/languages/http.js +387 -0
  53. package/dist/languages/index.d.ts +51 -0
  54. package/dist/languages/index.js +33 -0
  55. package/dist/languages/java.d.ts +43 -0
  56. package/dist/languages/java.js +404 -0
  57. package/dist/languages/php.d.ts +40 -0
  58. package/dist/languages/php.js +313 -0
  59. package/dist/languages/python.d.ts +40 -0
  60. package/dist/languages/python.js +270 -0
  61. package/dist/languages/ruby.d.ts +40 -0
  62. package/dist/languages/ruby.js +388 -0
  63. package/dist/languages/terraform.d.ts +48 -0
  64. package/dist/languages/terraform.js +244 -0
  65. package/dist/languages/typescript.d.ts +40 -0
  66. package/dist/languages/typescript.js +450 -0
  67. package/dist/markdown/index.d.ts +11 -0
  68. package/dist/markdown/index.js +80 -0
  69. package/dist/markdown/md.d.ts +15 -0
  70. package/dist/markdown/md.js +41 -0
  71. package/dist/markdown/printer.d.ts +13 -0
  72. package/dist/markdown/printer.js +76 -0
  73. package/dist/markdown/utils.d.ts +21 -0
  74. package/dist/markdown/utils.js +31 -0
  75. package/dist/routing.d.ts +61 -0
  76. package/dist/routing.js +176 -150
  77. package/dist/spec.d.ts +65 -0
  78. package/dist/spec.js +167 -0
  79. package/dist/style.d.ts +178 -0
  80. package/dist/style.js +179 -0
  81. package/dist/styles/main.css +784 -752
  82. package/dist/styles/main.js +0 -0
  83. package/dist/styles/primitives.css +408 -446
  84. package/dist/styles/primitives.js +0 -0
  85. package/dist/styles/resets.css +32 -41
  86. package/dist/styles/resets.js +0 -0
  87. package/dist/styles/search.css +192 -270
  88. package/dist/styles/search.js +0 -0
  89. package/dist/styles/sidebar.css +182 -69
  90. package/dist/styles/sidebar.js +0 -0
  91. package/dist/styles/variables.css +28 -89
  92. package/dist/styles/variables.js +0 -0
  93. package/dist/styles.css +3423 -0
  94. package/dist/styles.mjs +1 -0
  95. package/dist/use-strict-context-L0c8JKg4.js +16 -0
  96. package/dist/utils.d.ts +20 -0
  97. package/dist/utils.js +54 -0
  98. package/package.json +74 -22
  99. package/dist/mcp.js +0 -16003
  100. package/dist/styles/snippets.css +0 -132
  101. package/src/components/breadcrumbs.tsx +0 -94
  102. package/src/components/chat.tsx +0 -154
  103. package/src/components/dropdown.tsx +0 -91
  104. package/src/components/icons.tsx +0 -584
  105. package/src/components/index.ts +0 -9
  106. package/src/components/method.tsx +0 -146
  107. package/src/components/overview.tsx +0 -160
  108. package/src/components/primitives.tsx +0 -284
  109. package/src/components/properties.tsx +0 -130
  110. package/src/components/scripts/dropdown.ts +0 -78
  111. package/src/components/sdk.tsx +0 -403
  112. package/src/components/sidebar.tsx +0 -99
  113. package/src/components/snippets.tsx +0 -180
  114. package/src/contexts/component-generics.tsx +0 -48
  115. package/src/contexts/component-types.tsx +0 -5
  116. package/src/contexts/component.tsx +0 -32
  117. package/src/contexts/docs.tsx +0 -75
  118. package/src/contexts/index.tsx +0 -17
  119. package/src/contexts/markdown.tsx +0 -43
  120. package/src/contexts/navigation.tsx +0 -44
  121. package/src/contexts/search.tsx +0 -28
  122. package/src/contexts/use-components.tsx +0 -4
  123. package/src/index.ts +0 -6
  124. package/src/languages/go.tsx +0 -281
  125. package/src/languages/http.tsx +0 -321
  126. package/src/languages/index.ts +0 -26
  127. package/src/languages/java.tsx +0 -358
  128. package/src/languages/python.tsx +0 -255
  129. package/src/languages/ruby.tsx +0 -320
  130. package/src/languages/typescript.tsx +0 -393
  131. package/src/markdown/index.ts +0 -107
  132. package/src/markdown/md.ts +0 -45
  133. package/src/markdown/utils.ts +0 -49
  134. package/src/routing.ts +0 -238
  135. package/src/search/form.tsx +0 -127
  136. package/src/search/index.tsx +0 -1
  137. package/src/search/indexer.ts +0 -246
  138. package/src/search/mcp.ts +0 -61
  139. package/src/search/printer.tsx +0 -86
  140. package/src/search/providers/algolia.ts +0 -88
  141. package/src/search/providers/fuse.ts +0 -19
  142. package/src/search/providers/pagefind.ts +0 -17
  143. package/src/search/providers/walker.ts +0 -30
  144. package/src/search/results.tsx +0 -182
  145. package/src/search/state.ts +0 -64
  146. package/src/search/types.ts +0 -116
  147. package/src/style.ts +0 -196
  148. package/src/styles/main.css +0 -986
  149. package/src/styles/primitives.css +0 -580
  150. package/src/styles/resets.css +0 -39
  151. package/src/styles/search.css +0 -341
  152. package/src/styles/sidebar.css +0 -85
  153. package/src/styles/snippets.css +0 -130
  154. package/src/styles/variables.css +0 -86
  155. package/src/utils.ts +0 -41
@@ -0,0 +1,3423 @@
1
+ /* Typography - Stainless */
2
+ @layer stl-ui.tokens {
3
+ :root {
4
+ --stl-typography-font: 'Geist', system-ui, sans-serif;
5
+ --stl-typography-font-mono: 'Geist Mono', ui-monospace, monospace;
6
+ --stl-typography-font-heading: var(--stl-typography-font);
7
+
8
+ --stl-typography-line-height: 1.5;
9
+ --stl-typography-line-height-heading: 1.2;
10
+
11
+ --stl-typography-text-body: var(--stl-typography-scale-base);
12
+ --stl-typography-text-body-sm: var(--stl-typography-scale-sm);
13
+ --stl-typography-text-body-xs: var(--stl-typography-scale-xs);
14
+
15
+ --stl-typography-text-code: max(0.875em, var(--stl-typography-scale-xs));
16
+
17
+ --stl-typography-text-h1: var(--stl-typography-scale-5xl);
18
+ --stl-typography-text-h2: var(--stl-typography-scale-4xl);
19
+ --stl-typography-text-h3: var(--stl-typography-scale-3xl);
20
+ --stl-typography-text-h4: var(--stl-typography-scale-2xl);
21
+ --stl-typography-text-h5: var(--stl-typography-scale-xl);
22
+ --stl-typography-scale-xs: 12px;
23
+ --stl-typography-scale-sm: 14px;
24
+ --stl-typography-scale-base: 16px;
25
+ --stl-typography-scale-lg: 18px;
26
+ --stl-typography-scale-xl: 20px;
27
+ --stl-typography-scale-2xl: 24px;
28
+ --stl-typography-scale-3xl: 29px;
29
+ --stl-typography-scale-4xl: 35px;
30
+ --stl-typography-scale-5xl: 42px;
31
+ --stl-typography-scale-6xl: 64px;
32
+
33
+ --stl-color-text-selection-foreground: /* unset by default; text colors are unchanged */;
34
+ --stl-color-text-selection-background: light-dark(
35
+ rgb(from var(--stl-color-text-selection) r g b / calc(alpha * 0.15)),
36
+ rgb(from var(--stl-color-text-selection) r g b / calc(alpha * 0.35))
37
+ );
38
+ }
39
+ }
40
+
41
+ /* Prose exists in its own sub-layer for easy reverting */
42
+ body {
43
+ font-family: var(--stl-typography-font);
44
+ }
45
+
46
+ .stl-ui-prose {
47
+ letter-spacing: -0.01em;
48
+ font-weight: 400;
49
+ line-height: var(--stl-typography-line-height);
50
+ font-size: var(--stl-typography-text-body);
51
+ color: var(--stl-color-foreground-reduced);
52
+
53
+ :where(.stl-ui-not-prose) {
54
+ letter-spacing: initial;
55
+ font-weight: initial;
56
+ line-height: initial;
57
+ font-size: initial;
58
+ color: initial;
59
+ }
60
+
61
+ &.small {
62
+ font-size: var(--stl-typography-scale-sm);
63
+ letter-spacing: normal;
64
+ }
65
+
66
+ :where(strong:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose strong) {
67
+ color: rgb(from currentColor r g b / 1);
68
+ }
69
+
70
+ :where(a:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose a) {
71
+ color: var(--stl-color-link-foreground);
72
+ text-decoration-color: rgb(from currentColor r g b / calc(alpha * var(--stl-opacity-level-040)));
73
+ transition: text-decoration-color 0.1s ease-out;
74
+ &:hover {
75
+ text-decoration-color: currentColor;
76
+ }
77
+ }
78
+
79
+ :where(h1, h2, h3, h4, h5, h6):where(:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose *) {
80
+ color: var(--stl-color-foreground);
81
+ font-weight: 500;
82
+ line-height: var(--stl-typography-line-height-heading);
83
+ font-family: var(--stl-typography-font-heading);
84
+
85
+ text-wrap: pretty;
86
+ &:where(h1, h2, h3) {
87
+ text-wrap: balance;
88
+ }
89
+ }
90
+
91
+ :where(h1:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose h1) {
92
+ /* Heading 1/Medium */
93
+ font-size: var(--stl-typography-text-h1);
94
+ letter-spacing: -0.03em;
95
+ margin-top: 1.5em;
96
+ }
97
+
98
+ :where(h2:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose h2) {
99
+ /* Heading 2/Medium */
100
+ font-size: var(--stl-typography-text-h2);
101
+ letter-spacing: -0.03em;
102
+ margin-top: 1.35em;
103
+ }
104
+
105
+ :where(h3:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose h3) {
106
+ /* Heading 3/Medium */
107
+ font-size: var(--stl-typography-text-h3);
108
+ letter-spacing: -0.02em;
109
+ margin-top: 1.35em;
110
+ }
111
+
112
+ :where(h4:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose h4) {
113
+ /* Heading 4/Medium */
114
+ font-size: var(--stl-typography-text-h4);
115
+ letter-spacing: -0.02em;
116
+ margin-top: 1.35em;
117
+ }
118
+
119
+ :where(h5:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose h5) {
120
+ /* Heading 5/Medium */
121
+ font-size: var(--stl-typography-text-h5);
122
+ letter-spacing: -0.02em;
123
+ margin-top: 1.2em;
124
+ }
125
+
126
+ :where(li:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose li) {
127
+ &:where(:not(:last-child)) {
128
+ margin-bottom: 8px;
129
+ }
130
+ }
131
+
132
+ &.smaller-headings {
133
+ --stl-typography-text-h1: var(--stl-typography-scale-3xl);
134
+ --stl-typography-text-h2: var(--stl-typography-scale-2xl);
135
+ --stl-typography-text-h3: var(--stl-typography-scale-xl);
136
+ --stl-typography-text-h4: var(--stl-typography-scale-lg);
137
+ --stl-typography-text-h5: var(--stl-typography-scale-base);
138
+
139
+ :where(h1) {
140
+ margin-top: 1.5em;
141
+ }
142
+ :where(h2, h3, h4) {
143
+ margin-top: 1.25em;
144
+ }
145
+ :where(h5) {
146
+ margin-top: 1em;
147
+ }
148
+ }
149
+
150
+ /* code blocks */
151
+ :where(
152
+ pre:not(.stl-ui-not-prose *, .expressive-code *),
153
+ .stl-ui-not-prose .stl-ui-prose pre:not(.expressive-code *)
154
+ ) {
155
+ padding: 12px 20px;
156
+ border-radius: var(--stl-ui-layout-border-radius-sml);
157
+ border: 1px solid var(--stl-color-border);
158
+ background-color: var(--stl-color-faint-background);
159
+ overflow: auto;
160
+ margin-bottom: 1rem;
161
+ }
162
+
163
+ :where(ol, ul) {
164
+ &:where(:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose *) {
165
+ padding-left: 26px;
166
+ }
167
+ }
168
+
169
+ :where(ol, ul, aside, img, figure, details):where(
170
+ :not(.stl-ui-not-prose *),
171
+ .stl-ui-not-prose .stl-ui-prose *
172
+ ) {
173
+ margin-top: 16px;
174
+ }
175
+
176
+ /* all code (inline + block) */
177
+ :where(code):where(:not(.stl-ui-not-prose *), .stl-ui-not-prose .stl-ui-prose *) {
178
+ font-family: var(--stl-typography-font-mono);
179
+ font-feature-settings:
180
+ 'ss01' on,
181
+ 'ss03' on,
182
+ 'ss04' on,
183
+ 'ss06' on;
184
+
185
+ font-size: var(--stl-typography-text-code);
186
+ font-weight: inherit;
187
+ letter-spacing: normal;
188
+ white-space: pre;
189
+
190
+ /* inline code */
191
+ &:where(:not(pre > code)) {
192
+ color: var(--stl-color-foreground);
193
+ padding: 0 0.2em;
194
+ background-color: rgb(from var(--stl-color-foreground) r g b / 0.1);
195
+ border-radius: 0.2em;
196
+ }
197
+
198
+ /* code blocks */
199
+ /* &:where(pre > &) { } */
200
+ }
201
+ }
202
+
203
+ /* _direct_ children of stl-ui-prose should get a margin-top by default for spacing. */
204
+ :where(.stl-ui-prose, .stl-ui-prose > .sl-markdown-content) > :where(:not(:first-child)) {
205
+ margin-top: 16px;
206
+ }
207
+
208
+ @layer starlight.content {
209
+ .stl-ui-prose .sl-markdown-content {
210
+ a,
211
+ a:hover {
212
+ color: revert-layer;
213
+ }
214
+ }
215
+ }
216
+
217
+ ::selection {
218
+ background-color: var(--stl-color-text-selection-background);
219
+ color: var(--stl-color-text-selection-foreground);
220
+ }
221
+
222
+ @layer stl-ui.tokens {
223
+ /* Layout - Stainless */
224
+ :root {
225
+ --stl-ui-layout-border-radius-xs: 4px;
226
+ --stl-ui-layout-border-radius-sml: 8px;
227
+ --stl-ui-layout-border-radius: 12px;
228
+ --stl-ui-layout-border-radius-med: 16px;
229
+ --stl-ui-layout-border-radius-max: 100vmax;
230
+ --stl-ui-left-content-indent: 24px;
231
+
232
+ --stl-ui-page-padding-inline: 20px;
233
+ }
234
+ }
235
+
236
+ /* 1. Base colors */
237
+ @layer stl-ui.tokens {
238
+ :root {
239
+ --stl-opacity-level-080: 0.80;
240
+ --stl-opacity-level-040: 0.40;
241
+ --stl-opacity-level-016: 0.16;
242
+ --stl-opacity-level-008: 0.08;
243
+ --stl-opacity-level-004: 0.04;
244
+ /* background */
245
+ --stl-color-background: light-dark(rgb(255 255 255), rgb(10 10 10));
246
+ --stl-color-background-hover: light-dark(rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-004))), rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))));
247
+ /* background shades */
248
+ /* muted background */
249
+ --stl-color-muted-background: light-dark(rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
250
+ --stl-color-muted-background-hover: rgb(from var(--stl-color-muted-background) r g b/calc(alpha * 2));
251
+ /* faint background */
252
+ --stl-color-faint-background: rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-004)));
253
+ --stl-color-faint-background-hover: rgb(from var(--stl-color-faint-background) r g b/calc(alpha * 2));
254
+ /* ui elements like cards and buttons match --stl-color-background in light mode, but have a slight tint in dark mode */
255
+ --stl-color-ui-background: light-dark(
256
+ var(--stl-color-background),
257
+ rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-004)))
258
+ );
259
+ --stl-color-ui-background-hover: light-dark(
260
+ var(--stl-color-background-hover),
261
+ rgb(from var(--stl-color-ui-background) r g b/calc(alpha * 2))
262
+ );
263
+ /* foreground */
264
+ --stl-color-foreground: light-dark(rgb(38 38 38), rgb(245 245 245));
265
+ --stl-color-foreground-reduced: rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
266
+ --stl-color-foreground-muted: rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
267
+ /* inverse */
268
+ --stl-color-inverse-background: var(--stl-color-foreground);
269
+ --stl-color-inverse-background-hover: rgb(from var(--stl-color-inverse-background) r g b/calc(alpha * 0.9));
270
+ --stl-color-inverse-foreground: var(--stl-color-background);
271
+ /* default border (“foreground border”) */
272
+ --stl-color-border: rgb(from var(--stl-color-foreground) r g b/calc(alpha * var(--stl-opacity-level-016)));
273
+ --stl-color-border-faint: rgb(from var(--stl-color-border) r g b/calc(alpha * 0.5));
274
+ --stl-color-border-strong: rgb(from var(--stl-color-border) r g b/calc(alpha * 2.5));
275
+ }
276
+ }
277
+ /* 2. Color palettes (accent, red, green, etc) */
278
+ @layer stl-ui.tokens {
279
+ :root {
280
+ /* accent */
281
+ --stl-color-accent: light-dark(#155dfc, #2b7fff);
282
+ --stl-color-accent-foreground: var(--stl-color-accent);
283
+ --stl-color-accent-foreground-reduced: rgb(from var(--stl-color-accent-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
284
+ --stl-color-accent-foreground-muted: rgb(from var(--stl-color-accent-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
285
+ --stl-color-accent-muted-background: light-dark(rgb(from var(--stl-color-accent-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-accent-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
286
+ --stl-color-accent-muted-background-hover: rgb(from var(--stl-color-accent-muted-background) r g b/calc(alpha * 2));
287
+ --stl-color-accent-border: light-dark(rgb(from var(--stl-color-accent) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-accent) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
288
+ --stl-color-accent-border-faint: rgb(from var(--stl-color-accent-border) r g b/calc(alpha * 0.5));
289
+ --stl-color-accent-border-strong: var(--stl-color-accent);
290
+ --stl-color-accent-inverse-background: var(--stl-color-accent);
291
+ --stl-color-accent-inverse-background-hover: rgb(from var(--stl-color-accent-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
292
+ --stl-color-accent-inverse-foreground: rgb(255, 255, 255);
293
+ /* red */
294
+ --stl-color-red: light-dark(#d01e22, #e34041);
295
+ --stl-color-red-foreground: var(--stl-color-red);
296
+ --stl-color-red-foreground-reduced: rgb(from var(--stl-color-red-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
297
+ --stl-color-red-foreground-muted: rgb(from var(--stl-color-red-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
298
+ --stl-color-red-muted-background: light-dark(rgb(from var(--stl-color-red-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-red-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
299
+ --stl-color-red-muted-background-hover: rgb(from var(--stl-color-red-muted-background) r g b/calc(alpha * 2));
300
+ --stl-color-red-border: light-dark(rgb(from var(--stl-color-red) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-red) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
301
+ --stl-color-red-border-faint: rgb(from var(--stl-color-red-border) r g b/calc(alpha * 0.5));
302
+ --stl-color-red-border-strong: var(--stl-color-red);
303
+ --stl-color-red-inverse-background: var(--stl-color-red);
304
+ --stl-color-red-inverse-background-hover: rgb(from var(--stl-color-red-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
305
+ --stl-color-red-inverse-foreground: rgb(255, 255, 255);
306
+ /* green */
307
+ --stl-color-green: light-dark(#16a34a, #22c55e);
308
+ --stl-color-green-foreground: var(--stl-color-green);
309
+ --stl-color-green-foreground-reduced: rgb(from var(--stl-color-green-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
310
+ --stl-color-green-foreground-muted: rgb(from var(--stl-color-green-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
311
+ --stl-color-green-muted-background: light-dark(rgb(from var(--stl-color-green-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-green-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
312
+ --stl-color-green-muted-background-hover: rgb(from var(--stl-color-green-muted-background) r g b/calc(alpha * 2));
313
+ --stl-color-green-border: light-dark(rgb(from var(--stl-color-green) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-green) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
314
+ --stl-color-green-border-faint: rgb(from var(--stl-color-green-border) r g b/calc(alpha * 0.5));
315
+ --stl-color-green-border-strong: var(--stl-color-green);
316
+ --stl-color-green-inverse-background: var(--stl-color-green);
317
+ --stl-color-green-inverse-background-hover: rgb(from var(--stl-color-green-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
318
+ --stl-color-green-inverse-foreground: rgb(255, 255, 255);
319
+ /* blue */
320
+ --stl-color-blue: light-dark(#155dfc, #2b7fff);
321
+ --stl-color-blue-foreground: var(--stl-color-blue);
322
+ --stl-color-blue-foreground-reduced: rgb(from var(--stl-color-blue-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
323
+ --stl-color-blue-foreground-muted: rgb(from var(--stl-color-blue-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
324
+ --stl-color-blue-muted-background: light-dark(rgb(from var(--stl-color-blue-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-blue-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
325
+ --stl-color-blue-muted-background-hover: rgb(from var(--stl-color-blue-muted-background) r g b/calc(alpha * 2));
326
+ --stl-color-blue-border: light-dark(rgb(from var(--stl-color-blue) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-blue) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
327
+ --stl-color-blue-border-faint: rgb(from var(--stl-color-blue-border) r g b/calc(alpha * 0.5));
328
+ --stl-color-blue-border-strong: var(--stl-color-blue);
329
+ --stl-color-blue-inverse-background: var(--stl-color-blue);
330
+ --stl-color-blue-inverse-background-hover: rgb(from var(--stl-color-blue-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
331
+ --stl-color-blue-inverse-foreground: rgb(255, 255, 255);
332
+ /* yellow */
333
+ --stl-color-yellow: light-dark(#ca8a04, #eab308);
334
+ --stl-color-yellow-foreground: var(--stl-color-yellow);
335
+ --stl-color-yellow-foreground-reduced: rgb(from var(--stl-color-yellow-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
336
+ --stl-color-yellow-foreground-muted: rgb(from var(--stl-color-yellow-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
337
+ --stl-color-yellow-muted-background: light-dark(rgb(from var(--stl-color-yellow-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-yellow-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
338
+ --stl-color-yellow-muted-background-hover: rgb(from var(--stl-color-yellow-muted-background) r g b/calc(alpha * 2));
339
+ --stl-color-yellow-border: light-dark(rgb(from var(--stl-color-yellow) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-yellow) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
340
+ --stl-color-yellow-border-faint: rgb(from var(--stl-color-yellow-border) r g b/calc(alpha * 0.5));
341
+ --stl-color-yellow-border-strong: var(--stl-color-yellow);
342
+ --stl-color-yellow-inverse-background: var(--stl-color-yellow);
343
+ --stl-color-yellow-inverse-background-hover: rgb(from var(--stl-color-yellow-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
344
+ --stl-color-yellow-inverse-foreground: rgb(255, 255, 255);
345
+ /* orange */
346
+ --stl-color-orange: light-dark(#ea580c, #f97316);
347
+ --stl-color-orange-foreground: var(--stl-color-orange);
348
+ --stl-color-orange-foreground-reduced: rgb(from var(--stl-color-orange-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
349
+ --stl-color-orange-foreground-muted: rgb(from var(--stl-color-orange-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
350
+ --stl-color-orange-muted-background: light-dark(rgb(from var(--stl-color-orange-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-orange-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
351
+ --stl-color-orange-muted-background-hover: rgb(from var(--stl-color-orange-muted-background) r g b/calc(alpha * 2));
352
+ --stl-color-orange-border: light-dark(rgb(from var(--stl-color-orange) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-orange) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
353
+ --stl-color-orange-border-faint: rgb(from var(--stl-color-orange-border) r g b/calc(alpha * 0.5));
354
+ --stl-color-orange-border-strong: var(--stl-color-orange);
355
+ --stl-color-orange-inverse-background: var(--stl-color-orange);
356
+ --stl-color-orange-inverse-background-hover: rgb(from var(--stl-color-orange-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
357
+ --stl-color-orange-inverse-foreground: rgb(255, 255, 255);
358
+ /* purple */
359
+ --stl-color-purple: light-dark(#9333ea, #a855f7);
360
+ --stl-color-purple-foreground: var(--stl-color-purple);
361
+ --stl-color-purple-foreground-reduced: rgb(from var(--stl-color-purple-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
362
+ --stl-color-purple-foreground-muted: rgb(from var(--stl-color-purple-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
363
+ --stl-color-purple-muted-background: light-dark(rgb(from var(--stl-color-purple-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-purple-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
364
+ --stl-color-purple-muted-background-hover: rgb(from var(--stl-color-purple-muted-background) r g b/calc(alpha * 2));
365
+ --stl-color-purple-border: light-dark(rgb(from var(--stl-color-purple) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-purple) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
366
+ --stl-color-purple-border-faint: rgb(from var(--stl-color-purple-border) r g b/calc(alpha * 0.5));
367
+ --stl-color-purple-border-strong: var(--stl-color-purple);
368
+ --stl-color-purple-inverse-background: var(--stl-color-purple);
369
+ --stl-color-purple-inverse-background-hover: rgb(from var(--stl-color-purple-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
370
+ --stl-color-purple-inverse-foreground: rgb(255, 255, 255);
371
+ /* cyan */
372
+ --stl-color-cyan: light-dark(#0891b2, #06b6d4);
373
+ --stl-color-cyan-foreground: var(--stl-color-cyan);
374
+ --stl-color-cyan-foreground-reduced: rgb(from var(--stl-color-cyan-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
375
+ --stl-color-cyan-foreground-muted: rgb(from var(--stl-color-cyan-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
376
+ --stl-color-cyan-muted-background: light-dark(rgb(from var(--stl-color-cyan-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-cyan-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
377
+ --stl-color-cyan-muted-background-hover: rgb(from var(--stl-color-cyan-muted-background) r g b/calc(alpha * 2));
378
+ --stl-color-cyan-border: light-dark(rgb(from var(--stl-color-cyan) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-cyan) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
379
+ --stl-color-cyan-border-faint: rgb(from var(--stl-color-cyan-border) r g b/calc(alpha * 0.5));
380
+ --stl-color-cyan-border-strong: var(--stl-color-cyan);
381
+ --stl-color-cyan-inverse-background: var(--stl-color-cyan);
382
+ --stl-color-cyan-inverse-background-hover: rgb(from var(--stl-color-cyan-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
383
+ --stl-color-cyan-inverse-foreground: rgb(255, 255, 255);
384
+ /* pink */
385
+ --stl-color-pink: light-dark(#ec4899, #ec4899);
386
+ --stl-color-pink-foreground: var(--stl-color-pink);
387
+ --stl-color-pink-foreground-reduced: rgb(from var(--stl-color-pink-foreground) r g b/calc(alpha * var(--stl-opacity-level-080)));
388
+ --stl-color-pink-foreground-muted: rgb(from var(--stl-color-pink-foreground) r g b/calc(alpha * var(--stl-opacity-level-040)));
389
+ --stl-color-pink-muted-background: light-dark(rgb(from var(--stl-color-pink-foreground) r g b/calc(alpha * var(--stl-opacity-level-008))), rgb(from var(--stl-color-pink-foreground) r g b/calc(alpha * var(--stl-opacity-level-016))));
390
+ --stl-color-pink-muted-background-hover: rgb(from var(--stl-color-pink-muted-background) r g b/calc(alpha * 2));
391
+ --stl-color-pink-border: light-dark(rgb(from var(--stl-color-pink) r g b/calc(alpha * var(--stl-opacity-level-016))), rgb(from var(--stl-color-pink) r g b/calc(alpha * calc(var(--stl-opacity-level-016) * 1.5))));
392
+ --stl-color-pink-border-faint: rgb(from var(--stl-color-pink-border) r g b/calc(alpha * 0.5));
393
+ --stl-color-pink-border-strong: var(--stl-color-pink);
394
+ --stl-color-pink-inverse-background: var(--stl-color-pink);
395
+ --stl-color-pink-inverse-background-hover: rgb(from var(--stl-color-pink-inverse-background) r g b/calc(alpha * var(--stl-opacity-level-080)));
396
+ --stl-color-pink-inverse-foreground: rgb(255, 255, 255);
397
+ }
398
+ :root[data-theme=dark],
399
+ .stl-theme-dark {
400
+ color-scheme: dark;
401
+ background: var(--stl-color-background);
402
+ color: var(--stl-color-foreground);
403
+ }
404
+ :root[data-theme=light],
405
+ .stl-theme-light {
406
+ color-scheme: light;
407
+ background: var(--stl-color-background);
408
+ color: var(--stl-color-foreground);
409
+ }
410
+ }
411
+ /* Semantic color roles */
412
+ @layer stl-ui.tokens {
413
+ :root {
414
+ --stl-color-link-foreground: var(--stl-color-accent-foreground);
415
+ --stl-color-text-selection: var(--stl-color-accent-inverse-background);
416
+ }
417
+ }
418
+ .stl-ui-button {
419
+ height: 32px;
420
+ padding: 8px 10px;
421
+ border-radius: var(--stl-ui-layout-border-radius-sml);
422
+ line-height: 150%;
423
+ font-weight: 500;
424
+ font-size: var(--stl-typography-text-body-sm);
425
+ font-family: var(--stl-typography-font);
426
+
427
+ cursor: pointer;
428
+ display: inline-flex;
429
+ align-items: center;
430
+ justify-content: center;
431
+ gap: 2px;
432
+ white-space: nowrap;
433
+ flex-shrink: 0;
434
+
435
+ border: 1px solid transparent;
436
+ color: var(--stl-color-inverse-foreground);
437
+ background-color: var(--stl-color-inverse-background);
438
+
439
+ &:hover {
440
+ background-color: var(--stl-color-inverse-background-hover);
441
+ }
442
+
443
+ &[hidden] {
444
+ display: none;
445
+ }
446
+ }
447
+
448
+ /* --- COLOR VARIANTS --- */
449
+
450
+ .stl-ui-button--accent {
451
+ color: var(--stl-color-accent-inverse-foreground);
452
+ background-color: var(--stl-color-accent-inverse-background);
453
+ &:hover {
454
+ background-color: var(--stl-color-accent-inverse-background-hover);
455
+ }
456
+ }
457
+
458
+ .stl-ui-button--accent-muted {
459
+ color: var(--stl-color-accent-foreground);
460
+ background-color: var(--stl-color-accent-muted-background);
461
+ &:hover {
462
+ background-color: var(--stl-color-accent-muted-background-hover);
463
+ }
464
+ &.stl-ui-button--with-border {
465
+ border-color: var(--stl-color-accent-border);
466
+ }
467
+ }
468
+
469
+ .stl-ui-button--muted {
470
+ color: var(--stl-color-foreground);
471
+ background-color: var(--stl-color-muted-background);
472
+ &:hover {
473
+ background-color: var(--stl-color-muted-background-hover);
474
+ }
475
+ &.stl-ui-button--with-border {
476
+ border-color: var(--stl-color-border);
477
+ }
478
+ }
479
+
480
+ .stl-ui-button--outline {
481
+ color: var(--stl-color-foreground);
482
+ background-color: var(--stl-color-ui-background);
483
+ border-color: var(--stl-color-border);
484
+ &:hover {
485
+ background:
486
+ linear-gradient(var(--stl-color-ui-background-hover), var(--stl-color-ui-background-hover)),
487
+ linear-gradient(var(--stl-color-ui-background), var(--stl-color-ui-background));
488
+ }
489
+ }
490
+
491
+ .stl-ui-button--ghost {
492
+ color: var(--stl-color-foreground);
493
+ background-color: transparent;
494
+ &:hover {
495
+ background-color: var(--stl-color-background-hover);
496
+ }
497
+ &.stl-ui-button--with-border {
498
+ border-color: var(--stl-color-border);
499
+ }
500
+ }
501
+
502
+ .stl-ui-button--success {
503
+ color: var(--stl-color-green-inverse-foreground);
504
+ background-color: var(--stl-color-green-inverse-background);
505
+ &:hover {
506
+ background-color: var(--stl-color-green-inverse-background-hover);
507
+ }
508
+ }
509
+
510
+ .stl-ui-button--destructive {
511
+ color: var(--stl-color-red-inverse-foreground);
512
+ background-color: var(--stl-color-red-inverse-background);
513
+ &:hover {
514
+ background-color: var(--stl-color-red-inverse-background-hover);
515
+ }
516
+ }
517
+
518
+ /* --- LOADING STATE --- */
519
+
520
+ /**
521
+ * When loading, set aria-disabled="true" and aria-label="<Doing action...>"
522
+ * Don't use disabled, it loses focus.
523
+ */
524
+
525
+ .stl-ui-button--loading {
526
+ -webkit-text-fill-color: transparent;
527
+ position: relative;
528
+
529
+ & * {
530
+ color: transparent;
531
+ }
532
+
533
+ &::before {
534
+ content: '';
535
+ animation: stl-ui-button--loading-spin 1s linear infinite;
536
+ position: absolute;
537
+ width: 16px;
538
+ height: 16px;
539
+ mask-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWxvYWRlci1jaXJjbGUtaWNvbiBsdWNpZGUtbG9hZGVyLWNpcmNsZSI+PHBhdGggZD0iTTIxIDEyYTkgOSAwIDEgMS02LjIxOS04LjU2Ii8+PC9zdmc+');
540
+ mask-size: contain;
541
+ mask-position: center;
542
+ mask-repeat: no-repeat;
543
+ background: currentColor;
544
+ }
545
+ }
546
+
547
+ @keyframes stl-ui-button--loading-spin {
548
+ to {
549
+ transform: rotate(360deg);
550
+ }
551
+ }
552
+
553
+ /* --- SIZE VARIANTS --- */
554
+ .stl-ui-button--size-sm {
555
+ height: 24px;
556
+ padding: 0 6px;
557
+ border-radius: var(--stl-ui-layout-border-radius-xs);
558
+ line-height: 100%;
559
+ font-weight: 500;
560
+ font-size: var(--stl-typography-text-body-xs);
561
+ }
562
+
563
+ .stl-ui-button--size-lg {
564
+ height: 40px;
565
+ padding: 8px 14px;
566
+ border-radius: var(--stl-ui-layout-border-radius);
567
+ line-height: 150%;
568
+ font-weight: 500;
569
+ font-size: var(--stl-typography-text-body);
570
+ }
571
+
572
+ /* --- ICONS --- */
573
+ .stl-ui-button__icon {
574
+ flex-shrink: 0;
575
+ display: flex;
576
+ align-items: center;
577
+ justify-content: center;
578
+
579
+ svg {
580
+ margin-top: 0;
581
+ }
582
+ }
583
+
584
+ /* Left Icon */
585
+ .stl-ui-button:has(.stl-ui-button__icon:first-child) .stl-ui-button__icon {
586
+ margin-left: -4px;
587
+ margin-right: 4px;
588
+ }
589
+
590
+ .stl-ui-button:has(.stl-ui-button__icon:last-child) .stl-ui-button__icon {
591
+ /* Right Icon */
592
+ margin-right: -4px;
593
+ margin-left: 4px;
594
+
595
+ /* Right & Left Icon */
596
+ &:first-child {
597
+ margin-left: -4px;
598
+ margin-right: 4px;
599
+ }
600
+ }
601
+
602
+ /* Only Icon */
603
+ .stl-ui-button:not(:has(.stl-ui-button-label)):has(.stl-ui-button__icon:last-child):has(
604
+ .stl-ui-button__icon:first-child
605
+ ) {
606
+ aspect-ratio: 1 / 1;
607
+
608
+ .stl-ui-button__icon {
609
+ margin-left: -4px;
610
+ margin-right: -4px;
611
+ }
612
+ }
613
+
614
+ /* --- LINKS --- */
615
+
616
+ a.stl-ui-button {
617
+ text-decoration: none;
618
+ text-align: center;
619
+ }
620
+
621
+ .stl-ui-dropdown {
622
+ --stl-ui-dropdown-button-color: var(--stl-color-foreground);
623
+ --stl-ui-dropdown-button-background-color: var(--stl-color-ui-background);
624
+ --stl-ui-dropdown-button-border-color: var(--stl-color-border);
625
+
626
+ --stl-ui-dropdown-button-border-radius: var(--stl-ui-layout-border-radius-sml);
627
+ --stl-ui-dropdown-button-font-size: var(--stl-typography-scale-sm);
628
+
629
+ --stl-ui-dropdown-button-height: 2rem;
630
+ --stl-ui-dropdown-button-padding-inline: calc(0.75rem - 1px);
631
+ --stl-ui-dropdown-button-line-height: 100%;
632
+ --stl-ui-dropdown-button-font-weight: 500;
633
+
634
+ position: relative;
635
+ display: inline-flex;
636
+ align-items: center;
637
+
638
+ color: var(--stl-ui-dropdown-button-color);
639
+ gap: 0;
640
+ font-size: var(--stl-ui-dropdown-button-font-size);
641
+
642
+ hr {
643
+ --stl-ui-dropdown-button__divider-height: 1px;
644
+ --stl-ui-dropdown-button__divider-color: var(--stl-color-border);
645
+
646
+ height: var(--stl-ui-dropdown-button__divider-height);
647
+ background-color: var(--stl-ui-dropdown-button__divider-color);
648
+ border: none;
649
+
650
+ margin: 4px 0;
651
+ width: calc(100% + 8px);
652
+ transform: translateX(-4px);
653
+ }
654
+
655
+ .stl-ui-dropdown__button {
656
+ background-color: var(--stl-ui-dropdown-button-background-color);
657
+
658
+ border: 1px solid var(--stl-ui-dropdown-button-border-color);
659
+ border-radius: var(--stl-ui-dropdown-button-border-radius);
660
+ height: var(--stl-ui-dropdown-button-height);
661
+ padding-inline: var(--stl-ui-dropdown-button-padding-inline);
662
+ line-height: var(--stl-ui-dropdown-button-line-height);
663
+ font-weight: var(--stl-ui-dropdown-button-font-weight);
664
+ cursor: pointer;
665
+ display: flex;
666
+ align-items: center;
667
+ justify-content: center;
668
+ color: inherit;
669
+
670
+ &:focus {
671
+ outline: 1px auto Highlight;
672
+ }
673
+
674
+ &:hover {
675
+ background-color: var(--stl-color-ui-background-hover);
676
+ }
677
+
678
+ .stl-ui-dropdown__trigger-icon {
679
+ margin-right: -4px;
680
+ margin-left: 4px;
681
+ display: flex;
682
+ align-items: center;
683
+ justify-content: center;
684
+ }
685
+ }
686
+
687
+ .stl-ui-dropdown__icon {
688
+ display: flex;
689
+ align-items: center;
690
+ justify-content: center;
691
+
692
+ svg {
693
+ width: 16px;
694
+ height: 16px;
695
+ }
696
+ }
697
+
698
+ /**
699
+ * Dropdown Button
700
+ */
701
+ .stl-ui-dropdown-button--action {
702
+ display: flex;
703
+ align-items: center;
704
+ gap: 8px;
705
+ border-top-right-radius: 0;
706
+ border-bottom-right-radius: 0;
707
+ border-right-width: 0;
708
+
709
+ &:hover {
710
+ background-color: var(--stl-color-ui-background-hover);
711
+ z-index: 1;
712
+ border-right-width: 1px;
713
+ & + .stl-ui-dropdown-button__trigger {
714
+ border-left-width: 0;
715
+ }
716
+ }
717
+
718
+ &.disabled {
719
+ cursor: not-allowed;
720
+ background-color: var(--stl-color-ui-background);
721
+ }
722
+ }
723
+
724
+ .stl-ui-dropdown-button__trigger {
725
+ border-radius: 0;
726
+ border-top-right-radius: var(--stl-ui-dropdown-button-border-radius);
727
+ border-bottom-right-radius: var(--stl-ui-dropdown-button-border-radius);
728
+
729
+ &:hover {
730
+ background-color: var(--stl-color-ui-background-hover);
731
+ }
732
+ }
733
+
734
+ .stl-ui-dropdown__trigger-selected {
735
+ display: flex;
736
+ align-items: center;
737
+ gap: 8px;
738
+ }
739
+
740
+ /**
741
+ * Dropdown Menu
742
+ */
743
+ .stl-ui-dropdown-menu {
744
+ --stl-ui-dropdown-menu-background-color: var(--stl-color-ui-background);
745
+ --stl-ui-dropdown-menu-border-color: var(--stl-color-border);
746
+ --stl-ui-dropdown-menu-box-shadow: 0px 4px 4px -2px #00000014;
747
+ --stl-ui-dropdown-menu-border-radius: var(--stl-ui-layout-border-radius-sml);
748
+
749
+ /* opaque background with sometimes-transparent color on top in image layer*/
750
+ background-color: var(--stl-color-background);
751
+ background-image: linear-gradient(
752
+ to right,
753
+ var(--stl-ui-dropdown-menu-background-color),
754
+ var(--stl-ui-dropdown-menu-background-color)
755
+ );
756
+
757
+ border: 1px solid var(--stl-ui-dropdown-menu-border-color);
758
+ box-shadow: var(--stl-ui-dropdown-menu-box-shadow);
759
+ border-radius: var(--stl-ui-dropdown-menu-border-radius);
760
+
761
+ position: absolute;
762
+ right: 0;
763
+ z-index: 1000;
764
+ min-width: 100%;
765
+ width: max-content;
766
+ padding: 4px;
767
+ display: none;
768
+
769
+ &.stl-ui-dropdown-menu--above {
770
+ top: auto;
771
+ bottom: 100%;
772
+ margin-bottom: 4px;
773
+ }
774
+
775
+ &.stl-ui-dropdown-menu--below {
776
+ top: 100%;
777
+ bottom: auto;
778
+ margin-top: 4px;
779
+ }
780
+
781
+ &[data-state='open'] {
782
+ display: block;
783
+ }
784
+
785
+ .stl-ui-dropdown-menu__item {
786
+ --stl-ui-dropdown-menu__item-border-radius: var(--stl-ui-dropdown-button-border-radius);
787
+ --stl-ui-dropdown-menu__item-height: var(--stl-ui-dropdown-button-height);
788
+ --stl-ui-dropdown-menu__item-line-height: var(--stl-ui-dropdown-button-line-height);
789
+ --stl-ui-dropdown-menu__item-hover-background-color: var(--stl-color-ui-background-hover);
790
+
791
+ border-radius: var(--stl-ui-dropdown-menu__item-border-radius);
792
+ height: var(--stl-ui-dropdown-menu__item-height);
793
+ line-height: var(--stl-ui-dropdown-menu__item-line-height);
794
+
795
+ background: transparent;
796
+ border: none;
797
+
798
+ padding: 8px;
799
+ cursor: pointer;
800
+ display: flex;
801
+ align-items: center;
802
+ justify-content: space-between;
803
+ gap: 16px;
804
+ width: 100%;
805
+
806
+ &:hover,
807
+ &:focus-visible {
808
+ background-color: var(--stl-ui-dropdown-menu__item-hover-background-color);
809
+ }
810
+
811
+ &:hover,
812
+ &:focus-visible,
813
+ &:focus {
814
+ color: var(--stl-color-foreground);
815
+ }
816
+
817
+ &.stl-ui-dropdown-menu__item-link {
818
+ display: flex;
819
+ align-items: center;
820
+ justify-content: space-between;
821
+ gap: 16px;
822
+ width: 100%;
823
+
824
+ &:hover {
825
+ color: var(--stl-color-foreground);
826
+ }
827
+ }
828
+
829
+ .stl-ui-dropdown-menu__item-icon {
830
+ display: flex;
831
+ }
832
+
833
+ .stl-ui-dropdown-menu__item-content {
834
+ display: flex;
835
+ align-items: center;
836
+ gap: 8px;
837
+ }
838
+
839
+ .stl-ui-dropdown-menu__item-text {
840
+ white-space: nowrap;
841
+ }
842
+
843
+ .stl-ui-dropdown-menu__item-text--subtle {
844
+ color: var(--stl-color-foreground-muted);
845
+ }
846
+
847
+ strong {
848
+ color: var(--stl-color-foreground);
849
+ font-weight: 500;
850
+ }
851
+
852
+ .stl-ui-dropdown-menu__item-subtle-icon {
853
+ --stl-ui-dropdown-menu__item-subtle-icon-color: rgb(from var(--stl-color-foreground) r g b / 0.25);
854
+
855
+ svg {
856
+ color: var(--stl-ui-dropdown-menu__item-subtle-icon-color);
857
+ }
858
+ }
859
+ }
860
+ }
861
+ }
862
+
863
+ .stl-ui-callout {
864
+ --stl-ui-callout-background-color: var(--stl-color-faint-background);
865
+ --stl-ui-callout-border-color: var(--stl-color-border);
866
+ --stl-ui-callout-accent-color: var(--stl-color-foreground);
867
+
868
+ border: 1px solid var(--stl-ui-callout-border-color);
869
+ background-color: var(--stl-ui-callout-background-color);
870
+ border-radius: var(--stl-ui-layout-border-radius);
871
+ padding: 12px;
872
+ line-height: var(--stl-typography-line-height);
873
+ font-weight: 400;
874
+ font-size: var(--stl-typography-text-body);
875
+ color: var(--stl-color-foreground);
876
+
877
+ display: flex;
878
+ align-items: flex-start;
879
+ gap: 8px;
880
+
881
+ :where(a, strong) {
882
+ color: var(--stl-ui-callout-strong-color, var(--stl-ui-callout-accent-color));
883
+ }
884
+ :where(a) {
885
+ text-decoration-color: rgba(from currentColor r g b / 0.4);
886
+ transition: text-decoration-color 0.1s ease;
887
+ &:hover {
888
+ text-decoration-color: rgba(from currentColor r g b / 0.8);
889
+ }
890
+ }
891
+
892
+ ::selection {
893
+ background-color: light-dark(
894
+ rgb(from var(--stl-ui-callout-background-color) r g b / 0.2),
895
+ rgb(from var(--stl-ui-callout-background-color) r g b / 0.35)
896
+ );
897
+ color: var(--stl-color-foreground);
898
+ }
899
+ }
900
+
901
+ .stl-ui-callout--info {
902
+ --stl-ui-callout-background-color: var(--stl-color-faint-background);
903
+ --stl-ui-callout-border-color: var(--stl-color-border);
904
+ --stl-ui-callout-accent-color: var(--stl-color-foreground-reduced);
905
+ --stl-ui-callout-strong-color: var(--stl-color-foreground);
906
+ }
907
+
908
+ .stl-ui-callout--note {
909
+ --stl-ui-callout-background-color: var(--stl-color-blue-muted-background);
910
+ --stl-ui-callout-border-color: var(--stl-color-blue-border);
911
+ --stl-ui-callout-accent-color: var(--stl-color-blue-foreground);
912
+ }
913
+
914
+ .stl-ui-callout--tip {
915
+ --stl-ui-callout-background-color: var(--stl-color-purple-muted-background);
916
+ --stl-ui-callout-border-color: var(--stl-color-purple-border);
917
+ --stl-ui-callout-accent-color: var(--stl-color-purple-foreground);
918
+ }
919
+
920
+ .stl-ui-callout--success {
921
+ --stl-ui-callout-background-color: var(--stl-color-green-muted-background);
922
+ --stl-ui-callout-border-color: var(--stl-color-green-border);
923
+ --stl-ui-callout-accent-color: var(--stl-color-green-foreground);
924
+ }
925
+
926
+ .stl-ui-callout--warning {
927
+ --stl-ui-callout-background-color: var(--stl-color-yellow-muted-background);
928
+ --stl-ui-callout-border-color: var(--stl-color-yellow-border);
929
+ --stl-ui-callout-accent-color: var(--stl-color-yellow-foreground);
930
+ }
931
+
932
+ .stl-ui-callout--danger {
933
+ --stl-ui-callout-background-color: var(--stl-color-red-muted-background);
934
+ --stl-ui-callout-border-color: var(--stl-color-red-border);
935
+ --stl-ui-callout-accent-color: var(--stl-color-red-foreground);
936
+ }
937
+
938
+ .stl-ui-callout__icon {
939
+ color: var(--stl-ui-callout-accent-color);
940
+ flex-shrink: 0;
941
+ width: 1em;
942
+ height: 1em;
943
+ margin: calc((1lh - 1em) / 2);
944
+ }
945
+
946
+ .stl-ui-callout__content {
947
+ flex: 1;
948
+ margin-top: 0;
949
+
950
+ & > :first-child {
951
+ margin-top: 0;
952
+ }
953
+ }
954
+
955
+ /* revert starlight details styles */
956
+ @layer starlight.content {
957
+ /* artificially increase specificity to outcompete selectors in the same layer whose styles we want to revert */
958
+ .stl-ui-prose .sl-markdown-content.sl-markdown-content.sl-markdown-content {
959
+ details,
960
+ summary,
961
+ summary::before,
962
+ summary::marker {
963
+ all: revert-layer;
964
+ }
965
+ }
966
+ }
967
+
968
+ .stl-ui-accordion {
969
+ --stl-ui-accordion-padding: 12px;
970
+ --stl-ui-accordion-content-padding-bottom: 4px;
971
+ --stl-ui-accordion-marker-size: 1em;
972
+ --stl-ui-accordion-marker-margin: calc((1lh - var(--stl-ui-accordion-marker-size)) / 2);
973
+ --stl-ui-accordion-marker-color: var(--stl-color-border-strong);
974
+ --stl-ui-accordion-row-gap: 8px;
975
+ --stl-ui-accordion-summary-column-gap: 8px;
976
+ --stl-ui-accordion-border-radius: var(--stl-ui-layout-border-radius);
977
+ /* left inset to make content line up with summary content (after chevron) */
978
+ --stl-ui--internal--accordion-padding-start: calc(
979
+ var(--stl-ui-accordion-padding) + var(--stl-ui-accordion-marker-size) +
980
+ var(--stl-ui-accordion-marker-margin) * 2 + var(--stl-ui-accordion-summary-column-gap)
981
+ );
982
+
983
+ background-color: var(--stl-color-ui-background);
984
+ border: 1px solid var(--stl-color-border);
985
+ border-radius: var(--stl-ui-accordion-border-radius);
986
+ font-size: var(--stl-typography-text-body);
987
+
988
+ padding: var(--stl-ui-accordion-padding);
989
+ /* indent content to line up with left edge of summary content */
990
+ padding-inline-start: var(--stl-ui--internal--accordion-padding-start);
991
+
992
+ & > .stl-ui-accordion__summary {
993
+ display: block;
994
+ list-style: none;
995
+
996
+ /* summary extends to the edges of the element in order to increase click target */
997
+ padding: var(--stl-ui-accordion-padding);
998
+ padding-inline-start: var(--stl-ui--internal--accordion-padding-start);
999
+ margin: calc(-1 * var(--stl-ui-accordion-padding));
1000
+ margin-inline-start: calc(-1 * var(--stl-ui--internal--accordion-padding-start));
1001
+
1002
+ cursor: pointer;
1003
+ font-weight: 500;
1004
+
1005
+ border-radius: var(--stl-ui-accordion-border-radius);
1006
+
1007
+ &::before {
1008
+ content: '';
1009
+ width: var(--stl-ui-accordion-marker-size);
1010
+ height: var(--stl-ui-accordion-marker-size);
1011
+ margin: var(--stl-ui-accordion-marker-margin);
1012
+ background-color: var(--stl-ui-accordion-marker-color);
1013
+ display: block;
1014
+ position: absolute;
1015
+ --stl-ui-accordion--internal--marker-width: calc(
1016
+ var(--stl-ui-accordion-marker-size) + var(--stl-ui-accordion-marker-margin) * 2
1017
+ );
1018
+ --stl-ui-accordion--internal--summary-marker-transform: translateX(
1019
+ calc(
1020
+ -1 * var(--stl-ui-accordion--internal--marker-width) - var(--stl-ui-accordion-summary-column-gap)
1021
+ )
1022
+ );
1023
+ transform: var(--stl-ui-accordion--internal--summary-marker-transform);
1024
+
1025
+ --lucide-chevron-right: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQtaWNvbiBsdWNpZGUtY2hldnJvbi1yaWdodCI+PHBhdGggZD0ibTkgMTggNi02LTYtNiIvPjwvc3ZnPg==');
1026
+ mask-image: var(--lucide-chevron-right);
1027
+ mask-size: contain;
1028
+ mask-repeat: no-repeat;
1029
+
1030
+ transition: transform 0.1s ease-out;
1031
+ }
1032
+
1033
+ & > :first-child {
1034
+ margin-top: 0;
1035
+ }
1036
+ }
1037
+
1038
+ &[open] {
1039
+ border-color: var(--stl-color-border-strong);
1040
+ padding-bottom: calc(var(--stl-ui-accordion-padding) + var(--stl-ui-accordion-content-padding-bottom));
1041
+
1042
+ & > .stl-ui-accordion__summary {
1043
+ /* padding-bottom shouldn’t extend beyond the row gap while open, i.e. we shouldn’t be negative-margin-placing content overlapping summary */
1044
+ --stl-ui--internal--summary-padding-bottom: min(
1045
+ var(--stl-ui-accordion-padding),
1046
+ var(--stl-ui-accordion-row-gap)
1047
+ );
1048
+ padding-bottom: var(--stl-ui--internal--summary-padding-bottom);
1049
+ margin-bottom: calc(var(--stl-ui-accordion-row-gap) - var(--stl-ui--internal--summary-padding-bottom));
1050
+ border-bottom-left-radius: 0;
1051
+ border-bottom-right-radius: 0;
1052
+
1053
+ &::before {
1054
+ transform: var(--stl-ui-accordion--internal--summary-marker-transform) rotate(90deg);
1055
+ }
1056
+ }
1057
+ }
1058
+
1059
+ &:has(> .stl-ui-accordion__summary:hover) {
1060
+ background-color: var(--stl-color-ui-background-hover);
1061
+ }
1062
+
1063
+ & > .stl-ui-accordion__summary + * {
1064
+ margin-top: 0;
1065
+ }
1066
+ }
1067
+
1068
+ /* Groups */
1069
+
1070
+ .stl-ui-accordion-group {
1071
+ & > .stl-ui-accordion:has(+ .stl-ui-accordion) {
1072
+ border-bottom-left-radius: 0;
1073
+ border-bottom-right-radius: 0;
1074
+ & > .stl-ui-accordion__summary {
1075
+ border-bottom-left-radius: 0;
1076
+ border-bottom-right-radius: 0;
1077
+ }
1078
+ }
1079
+
1080
+ & > .stl-ui-accordion + .stl-ui-accordion {
1081
+ margin-top: 0;
1082
+ border-top-width: 0;
1083
+ border-top-left-radius: 0;
1084
+ border-top-right-radius: 0;
1085
+
1086
+ & > .stl-ui-accordion__summary {
1087
+ border-top-left-radius: 0;
1088
+ border-top-right-radius: 0;
1089
+ }
1090
+ }
1091
+
1092
+ /* Ensure the darker border always extends all the way around the active element, instead of
1093
+ * leaving an inactive border-top */
1094
+
1095
+ .stl-ui-accordion:not(:hover, [open]):has(+ .stl-ui-accordion:hover) {
1096
+ border-bottom-width: 0;
1097
+ }
1098
+ .stl-ui-accordion:not(:hover, [open]) + .stl-ui-accordion:hover {
1099
+ border-top-width: 1px;
1100
+ }
1101
+
1102
+ .stl-ui-accordion:not([open]):has(+ .stl-ui-accordion[open]) {
1103
+ border-bottom-width: 0;
1104
+ }
1105
+ .stl-ui-accordion:not([open]) + .stl-ui-accordion[open] {
1106
+ border-top-width: 1px;
1107
+ }
1108
+ }
1109
+
1110
+ .stl-ui-steps {
1111
+ padding-left: 0;
1112
+ }
1113
+
1114
+ .stl-ui-steps__step {
1115
+ --step-icon-width: 24px;
1116
+ --step-padding: 12px;
1117
+ list-style: none;
1118
+ position: relative;
1119
+ padding: var(--step-padding);
1120
+ /* Space for the custom marker */
1121
+ padding-left: calc(var(--step-icon-width) + var(--step-padding));
1122
+ margin: 0;
1123
+
1124
+ &::before {
1125
+ content: counter(list-item);
1126
+ position: absolute;
1127
+ left: 0;
1128
+ top: var(--step-padding);
1129
+ width: var(--step-icon-width);
1130
+ height: var(--step-icon-width);
1131
+ border: 1px solid var(--stl-color-border);
1132
+ border-radius: 100%;
1133
+ display: flex;
1134
+ align-items: center;
1135
+ justify-content: center;
1136
+ background: var(--stl-color-bg);
1137
+ z-index: 1;
1138
+ font-size: var(--stl-typography-text-body-xs);
1139
+ font-style: normal;
1140
+ font-weight: 600;
1141
+ line-height: 100%;
1142
+ }
1143
+
1144
+ &::after {
1145
+ content: '';
1146
+ position: absolute;
1147
+ left: calc(var(--step-icon-width) / 2 - 0.5px);
1148
+ top: calc(var(--step-icon-width) + var(--step-padding));
1149
+ bottom: calc(-1 * (var(--step-padding)));
1150
+ width: 1px;
1151
+ background: var(--stl-color-border);
1152
+ }
1153
+
1154
+ &:last-child {
1155
+ padding-bottom: 0;
1156
+
1157
+ /* No line after the last step */
1158
+ &::after {
1159
+ display: none;
1160
+ }
1161
+ }
1162
+ }
1163
+ .stl-ui-steps__step-title {
1164
+ font-weight: 600;
1165
+ }
1166
+
1167
+ .stl-ui-steps__step-content {
1168
+ margin-bottom: 0;
1169
+ margin-top: 4px;
1170
+ }
1171
+
1172
+ .stl-ui-badge {
1173
+ display: inline-flex;
1174
+ align-items: center;
1175
+ gap: 0.125em;
1176
+
1177
+ font-weight: 500;
1178
+ letter-spacing: normal;
1179
+
1180
+ border-width: 1px;
1181
+ border-style: solid;
1182
+
1183
+ /* sizes */
1184
+ &.stl-ui-badge--size-sm {
1185
+ height: 20px;
1186
+ font-size: var(--stl-typography-scale-xs);
1187
+ padding: 0 2px;
1188
+ border-radius: var(--stl-ui-layout-border-radius-xs);
1189
+ --stl-ui-badge-icon-size: 14px;
1190
+ }
1191
+ &,
1192
+ &.stl-ui-badge--size-md {
1193
+ height: 24px;
1194
+ font-size: var(--stl-typography-scale-sm);
1195
+ padding: 0 4px;
1196
+ border-radius: var(--stl-ui-layout-border-radius-xs);
1197
+ --stl-ui-badge-icon-size: 14px;
1198
+ }
1199
+ &.stl-ui-badge--size-lg {
1200
+ height: 32px;
1201
+ font-size: var(--stl-typography-scale-md);
1202
+ padding: 0 6px;
1203
+ border-radius: var(--stl-ui-layout-border-radius-sml);
1204
+ --stl-ui-badge-icon-size: 16px;
1205
+ }
1206
+
1207
+ /* intents */
1208
+ &.stl-ui-badge--intent-none {
1209
+ background-color: var(--stl-color-ui-background);
1210
+ color: var(--stl-color-foreground-muted);
1211
+ --stl-ui-badge-icon-opacity: var(--stl-opacity-level-040);
1212
+ border-color: var(--stl-color-border);
1213
+ }
1214
+ &.stl-ui-badge--intent-info {
1215
+ background-color: var(--stl-color-muted-background);
1216
+ color: var(--stl-color-foreground);
1217
+ border-color: var(--stl-color-border);
1218
+ &.stl-ui-badge--solid {
1219
+ background-color: var(--stl-color-inverse-background);
1220
+ color: var(--stl-color-inverse-foreground);
1221
+ --stl-ui-badge-icon-opacity: 1;
1222
+ }
1223
+ }
1224
+ &.stl-ui-badge--intent-success,
1225
+ &.stl-ui-badge--http-get {
1226
+ background-color: var(--stl-color-green-muted-background);
1227
+ color: var(--stl-color-green-foreground);
1228
+ border-color: var(--stl-color-green-border);
1229
+ &.stl-ui-badge--solid {
1230
+ background-color: var(--stl-color-green-inverse-background);
1231
+ color: var(--stl-color-green-inverse-foreground);
1232
+ }
1233
+ }
1234
+ &.stl-ui-badge--intent-warning {
1235
+ background-color: var(--stl-color-yellow-muted-background);
1236
+ color: var(--stl-color-yellow-foreground);
1237
+ border-color: var(--stl-color-yellow-border);
1238
+ &.stl-ui-badge--solid {
1239
+ background-color: var(--stl-color-yellow-inverse-background);
1240
+ color: var(--stl-color-yellow-inverse-foreground);
1241
+ }
1242
+ }
1243
+ &.stl-ui-badge--intent-danger,
1244
+ &.stl-ui-badge--http-delete {
1245
+ background-color: var(--stl-color-red-muted-background);
1246
+ color: var(--stl-color-red-foreground);
1247
+ border-color: var(--stl-color-red-border);
1248
+ &.stl-ui-badge--solid {
1249
+ background-color: var(--stl-color-red-inverse-background);
1250
+ color: var(--stl-color-red-inverse-foreground);
1251
+ }
1252
+ }
1253
+ &.stl-ui-badge--intent-note,
1254
+ &.stl-ui-badge--http-post {
1255
+ background-color: var(--stl-color-blue-muted-background);
1256
+ color: var(--stl-color-blue-foreground);
1257
+ border-color: var(--stl-color-blue-border);
1258
+ &.stl-ui-badge--solid {
1259
+ background-color: var(--stl-color-blue-inverse-background);
1260
+ color: var(--stl-color-blue-inverse-foreground);
1261
+ }
1262
+ }
1263
+ &.stl-ui-badge--intent-tip {
1264
+ background-color: var(--stl-color-purple-muted-background);
1265
+ color: var(--stl-color-purple-foreground);
1266
+ border-color: var(--stl-color-purple-border);
1267
+ &.stl-ui-badge--solid {
1268
+ background-color: var(--stl-color-purple-inverse-background);
1269
+ color: var(--stl-color-purple-inverse-foreground);
1270
+ }
1271
+ }
1272
+ &.stl-ui-badge--intent-accent {
1273
+ background-color: var(--stl-color-accent-muted-background);
1274
+ color: var(--stl-color-accent-foreground);
1275
+ border-color: var(--stl-color-accent-border);
1276
+ &.stl-ui-badge--solid {
1277
+ background-color: var(--stl-color-accent-inverse-background);
1278
+ color: var(--stl-color-accent-inverse-foreground);
1279
+ }
1280
+ }
1281
+ &.stl-ui-badge--http-put,
1282
+ &.stl-ui-badge--http-patch {
1283
+ background-color: var(--stl-color-orange-muted-background);
1284
+ color: var(--stl-color-orange-foreground);
1285
+ border-color: var(--stl-color-orange-border);
1286
+ &.stl-ui-badge--solid {
1287
+ background-color: var(--stl-color-orange-inverse-background);
1288
+ color: var(--stl-color-orange-inverse-foreground);
1289
+ }
1290
+ }
1291
+
1292
+ /* Text content */
1293
+ .stl-ui-badge__content {
1294
+ display: inline-block;
1295
+ padding: 0.25em;
1296
+ }
1297
+
1298
+ /* Icons */
1299
+ svg {
1300
+ flex-shrink: 0;
1301
+ display: inline-block;
1302
+ color: rgb(from currentColor r g b / 1);
1303
+ opacity: var(--stl-ui-badge-icon-opacity, 1);
1304
+ width: var(--stl-ui-badge-icon-size);
1305
+ height: var(--stl-ui-badge-icon-size);
1306
+ }
1307
+ &:has(> svg:only-child) {
1308
+ padding: 0;
1309
+ aspect-ratio: 1;
1310
+ justify-content: center;
1311
+ }
1312
+
1313
+ /* HTTP */
1314
+ &.stl-ui-badge--http {
1315
+ font-family: var(--stl-typography-font-mono);
1316
+ font-variant-numeric: tabular-nums;
1317
+ text-transform: uppercase;
1318
+ }
1319
+ }
1320
+
1321
+ /* design system variables */
1322
+
1323
+ /* components */
1324
+
1325
+
1326
+ /* Resets */
1327
+ .stldocs-root {
1328
+ line-height: 1.5;
1329
+ letter-spacing: -0.01em;
1330
+
1331
+ a:not(.stl-ui-callout a) {
1332
+ color: inherit;
1333
+ cursor: pointer;
1334
+ text-decoration: none;
1335
+ }
1336
+
1337
+ *,
1338
+ *::before,
1339
+ *::after {
1340
+ box-sizing: border-box;
1341
+ }
1342
+
1343
+ /* Markdown content should get prose styling */
1344
+ :where(h1, h2, h3, h4, h5):where(:not(.stldocs-markdown, .stldocs-markdown *)) {
1345
+ display: block;
1346
+ color: var(--stl-color-foreground);
1347
+ font-weight: 500;
1348
+ line-height: var(--stl-typography-line-height-heading);
1349
+ font-family: var(--stl-typography-font-heading);
1350
+ }
1351
+
1352
+ display: block;
1353
+ margin: 0;
1354
+ }
1355
+
1356
+ .sl-markdown-content {
1357
+ .stldocs-root
1358
+ :not(a, strong, em, del, span, input, code, br)
1359
+ + :not(a, strong, em, del, span, input, code, br, :where(.not-content *)) {
1360
+ margin-top: 0;
1361
+ }
1362
+ }
1363
+
1364
+ :root {
1365
+ --stldocs-color-selected: var(--stl-color-muted-background);
1366
+ --stldocs-color-bg-inline-code: var(--stl-color-muted-background);
1367
+
1368
+ --stldocs-content-width: 720px;
1369
+ --stldocs-content-padding: 16px;
1370
+ --stldocs-content-padding-inline: var(--stldocs-content-padding);
1371
+ --stldocs-content-padding-block: var(--stldocs-content-padding);
1372
+
1373
+ --stldocs-color-http-get-bg: var(--stl-color-green-muted-background);
1374
+ --stldocs-color-http-get: var(--stl-color-green-foreground);
1375
+ --stldocs-color-http-put-bg: var(--stl-color-orange-muted-background);
1376
+ --stldocs-color-http-put: var(--stl-color-orange-foreground);
1377
+ --stldocs-color-http-post-bg: var(--stl-color-blue-muted-background);
1378
+ --stldocs-color-http-post: var(--stl-color-blue-foreground);
1379
+ --stldocs-color-http-delete-bg: var(--stl-color-red-muted-background);
1380
+ --stldocs-color-http-delete: var(--stl-color-red-foreground);
1381
+
1382
+ --stldocs-syntax-color-green: var(--stl-color-green-foreground);
1383
+ --stldocs-syntax-color-orange: var(--stl-color-orange-foreground);
1384
+ --stldocs-syntax-color-purple: var(--stl-color-purple-foreground);
1385
+ --stldocs-syntax-color-blue: var(--stl-color-blue-foreground);
1386
+
1387
+ --stldocs-expander-margin-shift: 24px;
1388
+ --stldocs-expander-right-margin: 8px;
1389
+ --stldocs-title-padding-y: 2.5rem;
1390
+ --stldocs-color-backdrop-overlay: var(--stl-color-muted-background);
1391
+ }
1392
+
1393
+ /* Design System Defaults */
1394
+ .stldocs-root {
1395
+ font-family: var(--stl-typography-font);
1396
+ color: var(--stl-color-foreground);
1397
+ letter-spacing: -0.01em;
1398
+
1399
+ :where(h1) {
1400
+ font-size: var(--stl-typography-text-h1);
1401
+ letter-spacing: -0.03em;
1402
+ }
1403
+
1404
+ :where(h2) {
1405
+ font-size: var(--stl-typography-text-h2);
1406
+ letter-spacing: -0.03em;
1407
+ }
1408
+
1409
+ :where(h3) {
1410
+ font-size: var(--stl-typography-text-h3);
1411
+ letter-spacing: -0.02em;
1412
+ }
1413
+
1414
+ :where(h4) {
1415
+ font-size: var(--stl-typography-text-h4);
1416
+ letter-spacing: -0.02em;
1417
+ }
1418
+
1419
+ :where(h5) {
1420
+ font-size: var(--stl-typography-text-h5);
1421
+ letter-spacing: -0.02em;
1422
+ }
1423
+ }
1424
+
1425
+ /* Color mapping for types */
1426
+ .stldocs-root {
1427
+ .stldocs-text-keyword {
1428
+ color: var(--stl-color-foreground-muted);
1429
+ }
1430
+
1431
+ .stldocs-property-type,
1432
+ .stldocs-property-declaration,
1433
+ .stldocs-type:not(.stldocs-property-typename .stldocs-type) {
1434
+ font-family: var(--stl-typography-font-mono);
1435
+
1436
+ .stldocs-type-keyword {
1437
+ color: var(--stldocs-syntax-color-orange);
1438
+ }
1439
+
1440
+ .stldocs-type-string {
1441
+ color: var(--stldocs-syntax-color-green);
1442
+ }
1443
+
1444
+ .stldocs-type-brace,
1445
+ .stldocs-type-bracket,
1446
+ .stldocs-type-plain,
1447
+ .stldocs-text-operator,
1448
+ .stldocs-text-punctuation,
1449
+ .stldocs-truncation,
1450
+ .stldocs-type-array {
1451
+ color: var(--stl-color-foreground-reduced);
1452
+ }
1453
+
1454
+ .stldocs-type-plain {
1455
+ font-family: var(--stl-typography-font);
1456
+ }
1457
+
1458
+ .stldocs-type-reference {
1459
+ color: var(--stldocs-syntax-color-blue);
1460
+ font-weight: 600;
1461
+ a:hover {
1462
+ text-decoration: underline;
1463
+ }
1464
+ }
1465
+
1466
+ .stldocs-literal-string {
1467
+ color: var(--stldocs-syntax-color-green);
1468
+ }
1469
+
1470
+ .stldocs-literal-numeric {
1471
+ color: var(--stldocs-syntax-color-orange);
1472
+ }
1473
+
1474
+ .stldocs-text-identifier {
1475
+ font-family: var(--stl-typography-font-mono);
1476
+ color: var(--stl-color-foreground);
1477
+ }
1478
+
1479
+ .stldocs-type-propertyname .stldocs-text-identifier {
1480
+ font-family: var(--stl-typography-font);
1481
+ font-weight: 600;
1482
+ }
1483
+ }
1484
+
1485
+ [data-stldocs-language='http'],
1486
+ [data-stldocs-language='cli'] {
1487
+ .stldocs-property-type,
1488
+ .stldocs-property-declaration {
1489
+ .stldocs-truncation,
1490
+ .stldocs-type-array,
1491
+ .stldocs-text-punctuation {
1492
+ font-family: var(--stl-typography-font);
1493
+ }
1494
+ }
1495
+ }
1496
+ }
1497
+
1498
+ /* HTTP Method Color Settings */
1499
+ .stldocs-root .stldocs-method-route,
1500
+ .stldocs-root .stldocs-sidebar-method {
1501
+ [data-method='get'] {
1502
+ background: var(--stldocs-color-http-get-bg);
1503
+ color: var(--stldocs-color-http-get);
1504
+ border-color: var(--stldocs-color-http-get);
1505
+ }
1506
+
1507
+ [data-method='post'] {
1508
+ background: var(--stldocs-color-http-post-bg);
1509
+ color: var(--stldocs-color-http-post);
1510
+ border-color: var(--stldocs-color-http-post);
1511
+ }
1512
+
1513
+ [data-method='patch'],
1514
+ [data-method='put'] {
1515
+ background: var(--stldocs-color-http-put-bg);
1516
+ color: var(--stldocs-color-http-put);
1517
+ border-color: var(--stldocs-color-http-put);
1518
+ }
1519
+
1520
+ [data-method='delete'] {
1521
+ background: var(--stldocs-color-http-delete-bg);
1522
+ color: var(--stldocs-color-http-delete);
1523
+ border-color: var(--stldocs-color-http-delete);
1524
+ }
1525
+ }
1526
+
1527
+ /* Generic expand/collapse button */
1528
+ .stldocs-root .stldocs-expander {
1529
+ &[data-stldocs-expander-muted='true'] {
1530
+ .stldocs-expander-summary-icon {
1531
+ visibility: hidden;
1532
+ }
1533
+
1534
+ &:hover .stldocs-expander-summary-icon {
1535
+ visibility: visible;
1536
+ }
1537
+ }
1538
+
1539
+ .stldocs-expander-summary {
1540
+ cursor: pointer;
1541
+ display: flex;
1542
+
1543
+ & > .stldocs-expander-summary-icon {
1544
+ margin-right: 8px;
1545
+ transform: translateX(-0.5px) translateY(-0.5px);
1546
+
1547
+ & > .stldocs-icon {
1548
+ vertical-align: middle;
1549
+ color: var(--stl-color-foreground-muted);
1550
+ background-color: var(--stl-color-background);
1551
+ }
1552
+
1553
+ & > :last-child {
1554
+ display: none;
1555
+ }
1556
+ }
1557
+ }
1558
+
1559
+ &[open],
1560
+ &[data-open='true'] {
1561
+ & > .stldocs-expander-summary {
1562
+ .stldocs-type-preview[data-stldocs-type-preview='properties']
1563
+ :is(.stldocs-type-preview-content, .stldocs-type-brace) {
1564
+ display: none;
1565
+ }
1566
+
1567
+ & > .stldocs-expander-summary-icon {
1568
+ & > :first-child {
1569
+ display: none;
1570
+ }
1571
+
1572
+ & > :last-child {
1573
+ display: inline;
1574
+ }
1575
+ }
1576
+ }
1577
+
1578
+ & > .stldocs-expander-content {
1579
+ line-height: 150%;
1580
+
1581
+ & > .stldocs-property-children {
1582
+ border-left: 1px solid var(--stl-color-border);
1583
+ padding-left: 16px;
1584
+
1585
+ .stldocs-expander {
1586
+ margin-left: calc(-1 * var(--stldocs-expander-margin-shift));
1587
+ padding-right: var(--stldocs-expander-right-margin);
1588
+ }
1589
+ }
1590
+ }
1591
+ }
1592
+
1593
+ /* makes a big perf difference in browser calculating layout, even though the UA should do this? */
1594
+ &:not([open], [data-open='true']) .stldocs-expander-content {
1595
+ display: none;
1596
+ }
1597
+ }
1598
+
1599
+ /* Markdown content */
1600
+ .stldocs-root .stldocs-content {
1601
+ a {
1602
+ color: var(--stl-color-link-foreground);
1603
+ }
1604
+
1605
+ code:not(pre code) {
1606
+ font-family: var(--stl-typography-font-mono);
1607
+ border-radius: 4px;
1608
+ padding: 0 4px;
1609
+ background-color: var(--stldocs-color-bg-inline-code);
1610
+ word-break: break-all;
1611
+ font-size: 0.84rem;
1612
+ }
1613
+
1614
+ strong {
1615
+ font-weight: bold;
1616
+ }
1617
+
1618
+ em {
1619
+ font-style: italic;
1620
+ }
1621
+
1622
+ p {
1623
+ display: block;
1624
+ margin: 0 0 1em;
1625
+
1626
+ &:last-child {
1627
+ margin: 0;
1628
+ }
1629
+ }
1630
+
1631
+ li {
1632
+ margin-bottom: 0.25rem;
1633
+ display: list-item;
1634
+ }
1635
+
1636
+ ol,
1637
+ ul {
1638
+ display: block;
1639
+ list-style-type: initial;
1640
+ margin-left: 2rem;
1641
+ margin-bottom: 0.8rem;
1642
+ }
1643
+
1644
+ ol {
1645
+ list-style-type: decimal;
1646
+ }
1647
+
1648
+ hr {
1649
+ margin-bottom: 16px;
1650
+ border: none;
1651
+ border-bottom: 1px solid var(--stl-color-border);
1652
+ }
1653
+ }
1654
+
1655
+ .stldocs-root .stldocs-input {
1656
+ border: 1px solid var(--stl-color-border);
1657
+ background: var(--stl-color-background);
1658
+ border-radius: var(--stl-ui-layout-border-radius-sml);
1659
+ display: flex;
1660
+
1661
+ &:focus-within {
1662
+ border-color: var(--stl-color-accent);
1663
+ }
1664
+
1665
+ &.stldocs-input-disabled {
1666
+ opacity: 0.5;
1667
+ }
1668
+
1669
+ input,
1670
+ .stldocs-masked-input-display {
1671
+ flex-grow: 1;
1672
+ border: none;
1673
+ background-color: transparent;
1674
+ margin: 0.5rem;
1675
+ font-size: 1rem;
1676
+ letter-spacing: initial;
1677
+ white-space: pre;
1678
+ contain: content;
1679
+ padding: 0;
1680
+
1681
+ &:focus {
1682
+ outline: none;
1683
+ }
1684
+ }
1685
+
1686
+ .stldocs-masked-input-wrapper {
1687
+ &:focus-within .stldocs-masked-input-display,
1688
+ &:not(:focus-within) input {
1689
+ opacity: 0;
1690
+ }
1691
+ }
1692
+
1693
+ .stldocs-masked-input-obscured {
1694
+ -webkit-text-stroke: currentColor 0.2em;
1695
+ }
1696
+
1697
+ .stldocs-icon {
1698
+ margin: auto 0.25rem auto 0.75rem;
1699
+ }
1700
+ }
1701
+
1702
+ .stldocs-root .stldocs-masked-input-wrapper {
1703
+ display: flex;
1704
+ flex-grow: 1;
1705
+ position: relative;
1706
+ font-family: var(--stl-typography-font-mono);
1707
+ }
1708
+
1709
+ .stldocs-root .stldocs-masked-input-display {
1710
+ position: absolute;
1711
+ inset: 0;
1712
+ display: flex;
1713
+ align-items: center;
1714
+ pointer-events: none; /* so you can click through to the real input */
1715
+ }
1716
+
1717
+ .stldocs-root .stldocs-listview {
1718
+ overflow-y: scroll;
1719
+
1720
+ .stldocs-listview-item:not(:last-child) {
1721
+ border-bottom: 1px solid var(--stl-color-border);
1722
+ }
1723
+
1724
+ [data-stldocs-listview-selected='true'] > :first-child {
1725
+ background:
1726
+ linear-gradient(var(--stl-color-ui-background-hover), var(--stl-color-ui-background-hover)),
1727
+ linear-gradient(var(--stl-color-ui-background), var(--stl-color-ui-background));
1728
+ border-radius: 0.5rem;
1729
+ }
1730
+ }
1731
+
1732
+ .stldocs-root {
1733
+ .stldocs-tooltip-host {
1734
+ display: inline-block;
1735
+ }
1736
+
1737
+ .stldocs-tooltip-content {
1738
+ border: 1px solid var(--stl-color-border);
1739
+ background: var(--stl-color-background);
1740
+ border-radius: 8px;
1741
+ padding: 0.2rem 0.4rem;
1742
+
1743
+ * {
1744
+ font-size: 0.8rem !important;
1745
+ }
1746
+
1747
+ position: absolute;
1748
+
1749
+ transition:
1750
+ opacity 0.3s ease-in-out,
1751
+ visibility 0.3s step-end 0.3s;
1752
+ visibility: hidden;
1753
+ opacity: 0;
1754
+
1755
+ max-width: 400px;
1756
+ max-height: 300px;
1757
+ overflow: auto;
1758
+
1759
+ .stldocs-property-description {
1760
+ display: none;
1761
+ }
1762
+ }
1763
+
1764
+ .stldocs-tooltip:hover .stldocs-tooltip-content {
1765
+ transition-delay: 0s, 0s;
1766
+ visibility: visible;
1767
+ opacity: 1;
1768
+ }
1769
+ }
1770
+
1771
+ .stldocs-root {
1772
+ .stldocs-breadcrumbs {
1773
+ display: flex;
1774
+ align-items: center;
1775
+ gap: 0.5rem;
1776
+
1777
+ svg {
1778
+ width: 1rem;
1779
+ min-width: 1rem;
1780
+ stroke: var(--stl-color-foreground-reduced);
1781
+ opacity: 0.25;
1782
+ margin: 0;
1783
+ }
1784
+
1785
+ .stldocs-breadcrumbs-non-link,
1786
+ .stldocs-breadcrumbs-link {
1787
+ color: var(--stl-color-foreground-reduced);
1788
+ font-size: var(--stl-typography-scale-sm);
1789
+ line-height: 150%;
1790
+ text-decoration: none;
1791
+ }
1792
+
1793
+ .stldocs-breadcrumbs-link:hover {
1794
+ text-decoration: underline;
1795
+ color: var(--stl-color-foreground);
1796
+ }
1797
+
1798
+ .stldocs-breadcrumbs-item {
1799
+ display: flex;
1800
+ align-items: center;
1801
+ gap: 0.5rem;
1802
+ margin: 0;
1803
+ }
1804
+ }
1805
+ }
1806
+
1807
+ .stldocs-root .stldocs-expand-toggle {
1808
+ font-size: var(--stl-typography-scale-sm);
1809
+ display: flex;
1810
+ flex-grow: 1;
1811
+ justify-content: flex-end;
1812
+ user-select: none;
1813
+
1814
+ &[data-stldocs-property-toggle-expanded='false'] {
1815
+ .stldocs-expand-toggle-content:last-child {
1816
+ display: none;
1817
+ }
1818
+ }
1819
+
1820
+ &[data-stldocs-property-toggle-expanded='true'] {
1821
+ .stldocs-expand-toggle-content:first-child {
1822
+ display: none;
1823
+ }
1824
+ }
1825
+
1826
+ .stldocs-expand-toggle-content {
1827
+ cursor: pointer;
1828
+
1829
+ .stldocs-icon {
1830
+ vertical-align: middle;
1831
+ }
1832
+ }
1833
+ }
1834
+
1835
+ /* Deeplink button */
1836
+
1837
+ /* Link is not inside <summary> because interactive content in <summary> considered harmful
1838
+ * Subgrid must be applied from the top-level .stldocs-property all the way down to where the
1839
+ * inline summary content is rendered, so that the link button can be positioned at the “end” of
1840
+ * the summary line without actually shrinking the <details> or summary element.
1841
+ */
1842
+ .stldocs-root .stldocs-property:has(.stldocs-deep-link-button) {
1843
+ display: grid;
1844
+ /* expander | summary content | deeplink */
1845
+ grid-template-columns: auto minmax(0, max-content) 1fr;
1846
+ grid-template-rows: auto auto;
1847
+ gap: 0;
1848
+ width: 100%;
1849
+
1850
+ /* expander child */
1851
+ & > .stldocs-expander {
1852
+ grid-column: 1 / -1;
1853
+ grid-row: 1 / -1;
1854
+
1855
+ display: grid;
1856
+ grid-template-columns: subgrid;
1857
+ grid-template-rows: subgrid;
1858
+
1859
+ & > .stldocs-expander-summary {
1860
+ grid-column: 1 / -1;
1861
+ grid-row: 1;
1862
+ display: grid;
1863
+ grid-template-columns: subgrid;
1864
+ grid-template-rows: subgrid;
1865
+ & > .stldocs-expander-summary-icon {
1866
+ grid-column: 1;
1867
+ }
1868
+ & > .stldocs-expander-summary-content {
1869
+ grid-column: 2;
1870
+ }
1871
+ }
1872
+
1873
+ &::details-content,
1874
+ & > .stldocs-expander-content {
1875
+ grid-row: 2;
1876
+ grid-column: 2 / -1;
1877
+ }
1878
+ }
1879
+
1880
+ /* non-expanding child */
1881
+ & > .stldocs-property-info {
1882
+ grid-column: 2;
1883
+ grid-row: 1;
1884
+ }
1885
+
1886
+ & > .stldocs-deep-link-button {
1887
+ grid-column: span 1 / -1;
1888
+ grid-row: 1;
1889
+ align-self: center;
1890
+ justify-self: start;
1891
+ margin-left: 0.25em;
1892
+ display: none;
1893
+ margin-top: -1rem;
1894
+ margin-bottom: -1rem;
1895
+ animation: stldocs-deep-link-delay-enter 0.2s ease-out;
1896
+ animation-delay: 0.3s;
1897
+ animation-fill-mode: both;
1898
+
1899
+ svg {
1900
+ width: 1em;
1901
+ height: 1em;
1902
+ }
1903
+ }
1904
+
1905
+ /* show link button when expander summary is hovered */
1906
+ & > .stldocs-expander:has(> .stldocs-expander-summary:is(:hover, :focus-within)) + .stldocs-deep-link-button,
1907
+ /* show link button when non-expander rows are hovered */
1908
+ &:not(:has(> .stldocs-expander)):hover > .stldocs-deep-link-button,
1909
+ /* keep it visible when it itself is hovered or focused */
1910
+ & > .stldocs-deep-link-button:is(:hover, :focus) {
1911
+ display: flex;
1912
+ }
1913
+ }
1914
+
1915
+ @keyframes stldocs-deep-link-delay-enter {
1916
+ from {
1917
+ display: none;
1918
+ opacity: 0;
1919
+ scale: 0.85;
1920
+ }
1921
+ to {
1922
+ opacity: 1;
1923
+ scale: 0.99;
1924
+ }
1925
+ }
1926
+
1927
+ /* Overview page content */
1928
+ .stldocs-root .stldocs-overview {
1929
+ .stldocs-overview-header {
1930
+ padding: var(--stldocs-title-padding-y) 0;
1931
+
1932
+ & > * {
1933
+ max-width: var(--stldocs-content-width);
1934
+ margin: auto 0;
1935
+ }
1936
+
1937
+ .stldocs-overview-header-info {
1938
+ margin-top: 16px;
1939
+ height: 40px;
1940
+ display: flex;
1941
+ align-items: center;
1942
+
1943
+ .stldocs-overview-header-info-timestamp {
1944
+ font-size: var(--stl-typography-scale-xs);
1945
+ color: var(--stl-color-foreground);
1946
+ opacity: 50%;
1947
+ }
1948
+ }
1949
+ }
1950
+
1951
+ .stldocs-resource {
1952
+ padding: 2rem 0;
1953
+
1954
+ &:not([data-stl-resource-language='terraform']) .stldocs-resource-content {
1955
+ max-width: var(--stldocs-content-width);
1956
+ margin: auto 0;
1957
+ }
1958
+
1959
+ .stldocs-resource-header {
1960
+ display: flex;
1961
+ flex-direction: column;
1962
+ gap: 16px;
1963
+ opacity: 85%;
1964
+
1965
+ .stldocs-resource-title {
1966
+ .stldocs-icon {
1967
+ margin-left: 8px;
1968
+ color: var(--stl-color-foreground-muted);
1969
+ vertical-align: middle;
1970
+ display: inline;
1971
+ height: 1rem;
1972
+ }
1973
+
1974
+ .stldocs-resource-title-segment {
1975
+ margin-right: 8px;
1976
+ color: var(--stl-color-foreground);
1977
+
1978
+ &:not(:last-child) {
1979
+ color: var(--stl-color-foreground-reduced);
1980
+ font-weight: 400;
1981
+ }
1982
+ }
1983
+ }
1984
+
1985
+ .stldocs-resource-name {
1986
+ font-family: var(--stl-typography-font-mono);
1987
+ color: var(--stl-color-foreground);
1988
+ }
1989
+
1990
+ .stldocs-resource-description {
1991
+ font-size: var(--stl-typography-scale-base);
1992
+ color: var(--stl-color-foreground-reduced);
1993
+ line-height: 150%;
1994
+ }
1995
+ }
1996
+
1997
+ .stldocs-resource-content {
1998
+ .stldocs-resource-content-group {
1999
+ display: flex;
2000
+ flex-direction: column;
2001
+
2002
+ .stldocs-resource-content-group-model-title {
2003
+ padding-top: var(--stldocs-content-padding-block);
2004
+ color: var(--stl-color-foreground-muted);
2005
+ font-weight: normal;
2006
+ font-size: 1rem;
2007
+ padding-bottom: 0.5rem;
2008
+ display: flex;
2009
+ }
2010
+
2011
+ .stldocs-resource-content-group-name {
2012
+ color: var(--stl-color-foreground-muted);
2013
+ }
2014
+
2015
+ .stldocs-resource-content-properties {
2016
+ margin-left: calc(-1 * var(--stldocs-expander-margin-shift));
2017
+ }
2018
+ }
2019
+ }
2020
+ }
2021
+
2022
+ > .stldocs-resource:nth-child(2) {
2023
+ padding-top: 0;
2024
+ }
2025
+ }
2026
+
2027
+ /* Overview page method summary */
2028
+ .stldocs-root .stldocs-overview .stldocs-method-summary,
2029
+ .stldocs-root .stldocs-overview .stldocs-method {
2030
+ padding: var(--stldocs-content-padding-block) 0;
2031
+
2032
+ .stldocs-method-header {
2033
+ display: flex;
2034
+ flex-direction: column;
2035
+ gap: 4px;
2036
+
2037
+ .stldocs-method-title {
2038
+ margin-bottom: 2px;
2039
+
2040
+ a:hover {
2041
+ text-decoration: underline;
2042
+ }
2043
+ }
2044
+
2045
+ .stldocs-method-route {
2046
+ padding-top: 4px;
2047
+ }
2048
+ }
2049
+
2050
+ .stldocs-method-signature {
2051
+ max-width: var(--stldocs-content-width);
2052
+ overflow: hidden;
2053
+ text-overflow: ellipsis;
2054
+ }
2055
+
2056
+ .stldocs-method-description {
2057
+ color: var(--stl-color-foreground-muted);
2058
+ height: 1.7rem;
2059
+ overflow-y: hidden;
2060
+ line-height: 1.7rem;
2061
+ padding-bottom: var(--stldocs-content-padding-block);
2062
+
2063
+ .stldocs-content > * {
2064
+ white-space: nowrap;
2065
+ overflow-x: hidden;
2066
+ text-overflow: ellipsis;
2067
+ }
2068
+ }
2069
+ }
2070
+
2071
+ /* Method route rendering is shared between method previews and pages */
2072
+ .stldocs-root .stldocs-method-header .stldocs-method-route {
2073
+ display: flex;
2074
+ gap: 4px;
2075
+ padding: 0;
2076
+
2077
+ .stldocs-method-route-endpoint {
2078
+ font-family: var(--stl-typography-font-mono);
2079
+ font-size: var(--stl-typography-scale-sm);
2080
+ color: var(--stl-color-foreground-reduced);
2081
+ align-content: center;
2082
+ line-height: 120%;
2083
+ overflow: hidden;
2084
+ text-overflow: ellipsis;
2085
+ white-space: nowrap;
2086
+ }
2087
+ }
2088
+
2089
+ /* Models and properties */
2090
+ .stldocs-root .stldocs-property,
2091
+ .stldocs-root .stldocs-model {
2092
+ display: flex;
2093
+ flex-direction: column;
2094
+ gap: 0.8rem;
2095
+ padding: 0.5rem 0;
2096
+ font-size: var(--stl-typography-scale-sm);
2097
+
2098
+ &:has(.stldocs-expander-summary-content .stldocs-property-description)
2099
+ .stldocs-expander-content
2100
+ > .stldocs-property-description {
2101
+ padding-top: 0.75rem;
2102
+ }
2103
+
2104
+ .stldocs-expander-summary-content {
2105
+ max-width: 100%;
2106
+ }
2107
+
2108
+ .stldocs-property-header {
2109
+ align-items: first baseline;
2110
+ display: flex;
2111
+ gap: 0.5rem;
2112
+ flex-wrap: wrap;
2113
+ }
2114
+
2115
+ .stldocs-property-info {
2116
+ display: flex;
2117
+ flex-direction: column;
2118
+
2119
+ & > .stldocs-property-type > .stldocs-text-identifier {
2120
+ color: var(--stl-color-foreground);
2121
+ }
2122
+ }
2123
+
2124
+ .stldocs-property-type {
2125
+ font-family: var(--stl-typography-font-mono);
2126
+ color: var(--stl-color-foreground-muted);
2127
+ }
2128
+
2129
+ .stldocs-property-type,
2130
+ .stldocs-property-declaration {
2131
+ .stldocs-type-preview[data-stldocs-type-preview='union']
2132
+ .stldocs-type-preview[data-stldocs-type-preview='properties'] {
2133
+ display: none;
2134
+ }
2135
+ }
2136
+
2137
+ .stldocs-property-deprecated {
2138
+ font-family: var(--stl-typography-font);
2139
+ color: var(--stl-color-red-foreground);
2140
+ font-size: var(--stl-typography-scale-sm);
2141
+ font-weight: 600;
2142
+ }
2143
+
2144
+ .stldocs-property-deprecated-message {
2145
+ color: var(--stl-color-red-foreground);
2146
+ font-size: var(--stl-typography-scale-sm);
2147
+ }
2148
+ .stldocs-property-declaration {
2149
+ white-space: nowrap;
2150
+ overflow: hidden;
2151
+ text-overflow: ellipsis;
2152
+ min-width: 0;
2153
+ max-width: max-content;
2154
+ border-radius: var(--stl-ui-layout-border-radius-xs);
2155
+ padding-inline: var(--stl-ui-layout-border-radius-xs);
2156
+ margin-left: calc(-1 * var(--stl-ui-layout-border-radius-xs));
2157
+ background-color: transparent;
2158
+ transition: 0.1s background-color ease;
2159
+
2160
+ .stldocs-property-deprecated {
2161
+ margin-right: 0.44rem;
2162
+ }
2163
+ }
2164
+ .stldocs-property-info:is(:target, .stldocs-property-highlighted) .stldocs-property-declaration {
2165
+ background-color: var(--stl-color-accent-muted-background);
2166
+ transition: 0.1s background-color ease;
2167
+ }
2168
+
2169
+ .stldocs-property-description,
2170
+ .stldocs-property-title {
2171
+ font-size: var(--stl-typography-scale-sm);
2172
+ color: var(--stl-color-foreground-reduced);
2173
+
2174
+ .stldocs-content {
2175
+ color: inherit;
2176
+ font-size: inherit;
2177
+ }
2178
+ }
2179
+
2180
+ .stldocs-property-name {
2181
+ font-family: var(--stl-typography-font-mono);
2182
+ color: var(--stl-color-foreground);
2183
+ font-weight: 700;
2184
+ }
2185
+
2186
+ .stldocs-property-annotation {
2187
+ color: var(--stl-color-foreground-reduced);
2188
+ }
2189
+
2190
+ .stldocs-property-typename {
2191
+ font-size: var(--stl-typography-scale-xs);
2192
+ color: var(--stl-color-foreground-muted);
2193
+ line-height: 175%;
2194
+
2195
+ .stldocs-type-reference {
2196
+ font-size: 0.8rem;
2197
+ color: var(--stldocs-syntax-color-blue);
2198
+ font-weight: 600;
2199
+ }
2200
+ }
2201
+
2202
+ .stldocs-property-type {
2203
+ .stldocs-truncation {
2204
+ margin-right: 0.2rem;
2205
+ white-space: nowrap;
2206
+ }
2207
+ }
2208
+
2209
+ .stldocs-property-badges {
2210
+ display: flex;
2211
+ font-size: 0.85rem;
2212
+ gap: 0.5rem;
2213
+ text-transform: lowercase;
2214
+ line-height: 1.5rem;
2215
+ }
2216
+
2217
+ .stldocs-property-constraints {
2218
+ display: flex;
2219
+ }
2220
+
2221
+ .stldocs-property-constraint {
2222
+ color: var(--stl-color-foreground-reduced);
2223
+
2224
+ &:not(:last-child) {
2225
+ &::after {
2226
+ content: ', ';
2227
+ margin-right: 0.4rem;
2228
+ color: var(--stl-color-foreground-reduced);
2229
+ }
2230
+ }
2231
+
2232
+ .stldocs-property-constraint-name {
2233
+ color: var(--stl-color-foreground-reduced);
2234
+
2235
+ &::after {
2236
+ content: ':';
2237
+ margin-right: 0.4rem;
2238
+ }
2239
+ }
2240
+
2241
+ .stldocs-property-constraint-value {
2242
+ background-color: var(--stldocs-color-bg-inline-code);
2243
+ color: var(--stl-color-foreground-reduced);
2244
+ font-family: var(--stl-typography-font-mono);
2245
+ border-radius: 4px;
2246
+ padding: 3px 4px;
2247
+ }
2248
+ }
2249
+
2250
+ .stldocs-property-type:not(:first-child) {
2251
+ font-size: 0.8rem;
2252
+ }
2253
+
2254
+ .stldocs-property .stldocs-property-type {
2255
+ font-size: 0.8rem;
2256
+ }
2257
+ }
2258
+
2259
+ .stldocs-root {
2260
+ .stldocs-properties {
2261
+ display: flex;
2262
+ flex-direction: column;
2263
+ line-height: 150%;
2264
+ }
2265
+ }
2266
+
2267
+ .stldocs-root .stldocs-property {
2268
+ padding: 0.2rem 0;
2269
+ }
2270
+
2271
+ .stldocs-root .stldocs-property:not(.stldocs-property .stldocs-property) > .stldocs-property-info {
2272
+ margin-left: var(--stldocs-expander-margin-shift);
2273
+ }
2274
+
2275
+ .stldocs-root .stldocs-tooltip-content .stldocs-property {
2276
+ gap: 0.1rem;
2277
+ padding: 0.1rem !important;
2278
+ border: 0;
2279
+ }
2280
+
2281
+ .stldocs-root .stldocs-badge {
2282
+ display: inline-block;
2283
+ background-color: var(--stl-color-muted-background);
2284
+ padding: 0 0.5rem;
2285
+ border-radius: 4px;
2286
+ font-size: var(--stl-typography-scale-xs);
2287
+ font-weight: 500;
2288
+
2289
+ &[data-badge-id='deprecated'] {
2290
+ background-color: var(--stl-color-red-muted-background);
2291
+ color: var(--stl-color-red-foreground);
2292
+ text-transform: capitalize;
2293
+ }
2294
+
2295
+ &[data-badge-id='optional'] {
2296
+ background-color: var(--stl-color-muted-background);
2297
+ text-transform: capitalize;
2298
+ }
2299
+ }
2300
+
2301
+ /* Method Pages */
2302
+
2303
+ .stldocs-root .stldocs-method-signature {
2304
+ font-family: var(--stl-typography-font-mono);
2305
+ font-size: var(--stl-typography-scale-sm);
2306
+ color: var(--stl-color-foreground-muted);
2307
+ white-space: pre-wrap;
2308
+ word-wrap: break-word;
2309
+ font-weight: 400;
2310
+ line-height: 1.5rem;
2311
+
2312
+ .stldocs-signature-qualified {
2313
+ color: var(--stl-color-foreground-reduced);
2314
+ font-weight: 400;
2315
+ }
2316
+
2317
+ .stldocs-signature-name {
2318
+ color: var(--stl-color-foreground);
2319
+ font-weight: 600;
2320
+ }
2321
+
2322
+ .stldoc-signature-params {
2323
+ .stldocs-text-identifier {
2324
+ color: var(--stl-color-foreground);
2325
+ }
2326
+ }
2327
+
2328
+ .stldocs-type {
2329
+ color: var(--stl-color-foreground);
2330
+ }
2331
+
2332
+ .stldocs-type-preview[data-stldocs-type-preview='properties'] {
2333
+ display: none;
2334
+ }
2335
+
2336
+ .stldocs-method-badges {
2337
+ margin-top: 1rem;
2338
+ }
2339
+ }
2340
+
2341
+ .stldocs-root .stldocs-method {
2342
+ .stldocs-method-content-column {
2343
+ display: contents;
2344
+ }
2345
+
2346
+ .stldocs-method-header {
2347
+ padding: var(--stldocs-title-padding-y) var(--stldocs-content-padding-inline)
2348
+ var(--stldocs-content-padding-block);
2349
+
2350
+ .stldocs-method-title {
2351
+ font-size: var(--stl-typography-text-h1);
2352
+ letter-spacing: -0.03em;
2353
+ }
2354
+
2355
+ .stldocs-method-signature {
2356
+ margin-top: 0.75rem;
2357
+ }
2358
+
2359
+ .stldocs-method-route {
2360
+ padding-top: 12px;
2361
+ }
2362
+ }
2363
+
2364
+ .stldocs-method-description {
2365
+ grid-area: 1 / 1 / 2 / 2;
2366
+ padding-bottom: var(--stldocs-content-padding-block);
2367
+
2368
+ code {
2369
+ line-height: 150%;
2370
+ font-size: 0.93rem;
2371
+ }
2372
+ }
2373
+
2374
+ .stldocs-method-example {
2375
+ margin-top: 1rem;
2376
+ grid-area: 2 / 1 / 3 / 2;
2377
+
2378
+ .stldocs-snippet-multi-response {
2379
+ display: none;
2380
+ }
2381
+ }
2382
+
2383
+ .stldocs-snippet-multi-response {
2384
+ border: 1px solid var(--stl-color-border);
2385
+ border-radius: 12px;
2386
+
2387
+ .stldocs-snippet {
2388
+ background-color: transparent;
2389
+ }
2390
+
2391
+ .stldocs-snippet-code .shiki {
2392
+ padding: 0.5rem;
2393
+ }
2394
+ }
2395
+
2396
+ .stldocs-method-info {
2397
+ padding: var(--stldocs-content-padding-block) 0;
2398
+ grid-area: 3 / 1 / 4 / 2;
2399
+ display: flex;
2400
+ gap: 2rem;
2401
+ flex-direction: column;
2402
+ margin-top: 2.5rem;
2403
+ font-size: var(--stl-typography-scale-sm);
2404
+
2405
+ h5 {
2406
+ display: flex;
2407
+ }
2408
+ }
2409
+
2410
+ /* TODO(soon): we shouldn't be copying these styles here. */
2411
+ .stldocs-method-available-languages a {
2412
+ color: var(--stl-color-link-foreground);
2413
+ text-decoration-color: rgb(from currentColor r g b / calc(alpha * var(--stl-opacity-level-040)));
2414
+ transition: text-decoration-color 0.1s ease-out;
2415
+ }
2416
+
2417
+ .stldocs-method-info-section {
2418
+ display: flex;
2419
+ gap: 0.5rem;
2420
+ flex-direction: column;
2421
+
2422
+ h5 .stl-ui-badge {
2423
+ vertical-align: bottom;
2424
+ margin-left: 0.5em;
2425
+ margin-top: -1px;
2426
+ transform: translateY(1px);
2427
+ }
2428
+ }
2429
+
2430
+ .stldocs-method-content-column {
2431
+ display: contents;
2432
+ }
2433
+
2434
+ .stldocs-method-body {
2435
+ display: grid;
2436
+ gap: 2rem;
2437
+ grid-template-columns: minmax(0, 1fr);
2438
+ grid-template-rows: repeat(4, auto);
2439
+ padding: var(--stldocs-content-padding-block) 0;
2440
+
2441
+ .stldocs-method-description p {
2442
+ color: var(--stl-color-foreground-reduced);
2443
+ line-height: 150%;
2444
+ }
2445
+
2446
+ h5 {
2447
+ font-weight: 400;
2448
+ color: var(--stl-color-foreground-muted);
2449
+ font-size: var(--stl-typography-scale-base);
2450
+ }
2451
+
2452
+ .stldocs-method-parameters,
2453
+ .stldocs-method-parameters,
2454
+ .stldocs-method-returns {
2455
+ margin-left: calc(-1 * var(--stldocs-expander-margin-shift));
2456
+ }
2457
+
2458
+ .stldocs-method-parameters {
2459
+ display: flex;
2460
+ flex-direction: column;
2461
+ gap: 0.5rem;
2462
+ }
2463
+
2464
+ .stldocs-method-parameters h5 {
2465
+ margin-left: var(--stldocs-expander-margin-shift);
2466
+ }
2467
+
2468
+ .stldocs-terraform-resource-title {
2469
+ font-family: var(--stl-typography-font-mono);
2470
+ font-size: 1.1rem;
2471
+ white-space: nowrap;
2472
+ overflow: hidden;
2473
+ text-overflow: ellipsis;
2474
+ }
2475
+ }
2476
+
2477
+ .stldocs-snippet,
2478
+ .stldocs-snippet-multi {
2479
+ top: calc(var(--sl-nav-height) + 1rem);
2480
+ position: sticky;
2481
+ z-index: 5;
2482
+ }
2483
+
2484
+ .stldocs-snippet {
2485
+ font-size: var(--stl-typography-scale-sm);
2486
+ font-family: var(--stl-typography-font-mono);
2487
+
2488
+ padding: 0.25rem;
2489
+ border-radius: calc(12px + 0.25rem);
2490
+ display: flex;
2491
+ flex-direction: column;
2492
+ background-color: var(--stl-color-faint-background);
2493
+ border: 1px solid var(--stl-color-border-faint);
2494
+
2495
+ .stldocs-snippet-request {
2496
+ background-color: var(--stl-color-background);
2497
+ --shiki-background: var(--stl-color-background);
2498
+ border: 1px solid var(--stl-color-border);
2499
+ border-radius: 12px;
2500
+ position: relative;
2501
+
2502
+ .stldocs-snippet-code {
2503
+ border-bottom-left-radius: 12px;
2504
+ border-bottom-right-radius: 12px;
2505
+ }
2506
+ }
2507
+
2508
+ .stldocs-snippet-request-title {
2509
+ display: flex;
2510
+ justify-content: space-between;
2511
+ background-color: var(--stl-color-background);
2512
+ color: var(--stl-color-foreground-reduced);
2513
+ border-bottom: 1px solid var(--stl-color-border);
2514
+ border-top-right-radius: 12px;
2515
+ border-top-left-radius: 12px;
2516
+ padding: 0.5rem;
2517
+ padding-left: 0.75rem;
2518
+ gap: 0.5rem;
2519
+ font-family: var(--stl-typography-font);
2520
+
2521
+ .stldocs-snippet-request-title-method {
2522
+ flex-grow: 1;
2523
+ min-width: 0;
2524
+ }
2525
+
2526
+ .stldocs-snippet-request-title-method,
2527
+ .stldocs-snippet-request-title-content {
2528
+ display: flex;
2529
+ gap: 0.5rem;
2530
+ align-items: center;
2531
+ }
2532
+
2533
+ h3 {
2534
+ font-weight: 500;
2535
+ font-style: normal;
2536
+ line-height: 100%;
2537
+ font-size: inherit;
2538
+ font-family: var(--stl-typography-font);
2539
+ color: var(--stl-color-foreground);
2540
+ margin: 0;
2541
+
2542
+ overflow: hidden;
2543
+ white-space: nowrap;
2544
+ text-overflow: ellipsis;
2545
+ }
2546
+
2547
+ @media (min-width: 1280px) {
2548
+ .stldocs-snippet-request-title-label {
2549
+ display: none;
2550
+ }
2551
+ }
2552
+
2553
+ .stldocs-icon {
2554
+ width: 16px;
2555
+ }
2556
+
2557
+ .stldocs-snippet-request-title-content {
2558
+ font-family: var(--stl-typography-font);
2559
+ display: flex;
2560
+ gap: 0.5rem;
2561
+
2562
+ .stldocs-snippet-request-title-language {
2563
+ position: relative;
2564
+ color: var(--stl-color-foreground);
2565
+ cursor: pointer;
2566
+ display: flex;
2567
+ align-items: center;
2568
+ gap: 4px;
2569
+
2570
+ select {
2571
+ z-index: 5;
2572
+ padding-right: 25px;
2573
+ display: flex;
2574
+ align-items: center;
2575
+ }
2576
+ }
2577
+ }
2578
+ }
2579
+
2580
+ .stldocs-snippet-response-pane {
2581
+ padding: 0.5rem;
2582
+ display: none;
2583
+ --shiki-background: var(--stl-color-faint-background);
2584
+
2585
+ &.stldocs-snippet-response-pane-active {
2586
+ display: block;
2587
+ }
2588
+
2589
+ .stldocs-snippet-code {
2590
+ padding: 0;
2591
+ }
2592
+ }
2593
+
2594
+ .stldocs-snippet-response {
2595
+ margin-top: 1rem;
2596
+ }
2597
+ }
2598
+
2599
+ .stldocs-method-response-column {
2600
+ display: flex;
2601
+ flex-direction: column;
2602
+ gap: 1rem;
2603
+ margin-top: 2.5rem;
2604
+ }
2605
+
2606
+ .stldocs-snippet-code {
2607
+ width: 0;
2608
+ min-width: 100%;
2609
+ overflow: auto;
2610
+ display: block;
2611
+ white-space: preserve nowrap;
2612
+ padding: 1rem;
2613
+ max-height: 560px;
2614
+ font-size: var(--stl-typography-scale-sm);
2615
+ line-height: 1.5;
2616
+ transition: height 240ms ease;
2617
+ will-change: height;
2618
+ scrollbar-color: var(--stl-color-border) transparent;
2619
+
2620
+ pre,
2621
+ .shiki {
2622
+ margin: 0;
2623
+ padding: 0;
2624
+ width: max-content;
2625
+ min-width: 100%;
2626
+ }
2627
+
2628
+ pre.shiki {
2629
+ counter-reset: codeblock-line;
2630
+
2631
+ .line {
2632
+ counter-increment: codeblock-line;
2633
+
2634
+ &::before {
2635
+ content: counter(codeblock-line);
2636
+ color: var(--stl-color-foreground-muted);
2637
+ margin-right: 1rem;
2638
+ opacity: 0.5;
2639
+ display: inline-flex;
2640
+ width: 1rem;
2641
+ text-align: right;
2642
+ }
2643
+
2644
+ &.ellipsis {
2645
+ color: var(--stl-color-foreground-muted) !important;
2646
+ opacity: 0.5;
2647
+ }
2648
+ }
2649
+ }
2650
+ }
2651
+
2652
+ .stldocs-snippet-footer {
2653
+ border-top: 1px solid var(--stl-color-border);
2654
+ padding: 0.5rem;
2655
+ }
2656
+
2657
+ .stldocs-snippet-response-tab {
2658
+ display: flex;
2659
+ gap: 0.5rem;
2660
+ overflow-x: auto;
2661
+ border-bottom: 1px solid var(--stl-color-border-faint);
2662
+ margin-inline: -0.5rem;
2663
+ padding-inline: 0.5rem;
2664
+
2665
+ .stldocs-snippet-response-tab-item {
2666
+ flex: 1;
2667
+ border-bottom: 2px solid transparent;
2668
+ min-width: 160px;
2669
+ height: 40px;
2670
+
2671
+ button {
2672
+ width: 100%;
2673
+ white-space: nowrap;
2674
+ overflow: hidden;
2675
+ text-overflow: ellipsis;
2676
+ vertical-align: middle;
2677
+ color: var(--stl-color-foreground-reduced);
2678
+ }
2679
+
2680
+ button:hover {
2681
+ background-color: var(--stl-color-background-hover);
2682
+ }
2683
+ }
2684
+
2685
+ .stldocs-snippet-response-tab-item-active {
2686
+ border-color: var(--stl-color-accent-inverse-background);
2687
+
2688
+ button {
2689
+ color: var(--stl-color-foreground);
2690
+ }
2691
+ }
2692
+
2693
+ &.stldocs-snippet-response-tab-single-return {
2694
+ background-color: var(--stl-color-faint-background);
2695
+ border-top-left-radius: 12px;
2696
+ border-top-right-radius: 12px;
2697
+
2698
+ .stldocs-snippet-response-tab-item {
2699
+ border: none;
2700
+ color: var(--stl-color-foreground-reduced);
2701
+ font-weight: 400;
2702
+ display: flex;
2703
+
2704
+ button {
2705
+ justify-content: flex-start;
2706
+ cursor: default;
2707
+ height: auto;
2708
+
2709
+ &:hover {
2710
+ background-color: transparent;
2711
+ }
2712
+ }
2713
+ }
2714
+ }
2715
+ }
2716
+
2717
+ .stldocs-markdown {
2718
+ :first-child {
2719
+ margin-top: 0;
2720
+ }
2721
+ }
2722
+
2723
+ .stldocs-snippet-multi {
2724
+ .stldocs-snippet-multi-tabs {
2725
+ background: var(--stl-color-faint-background);
2726
+ border: 1px solid var(--stl-color-border-faint);
2727
+ padding: 0.25rem;
2728
+ border-radius: calc(var(--stl-ui-layout-border-radius) + 0.25rem);
2729
+ display: flex;
2730
+ flex-wrap: nowrap;
2731
+ margin-bottom: 0.5rem;
2732
+ overflow-x: scroll;
2733
+ scrollbar-color: var(--stl-color-border) transparent;
2734
+
2735
+ font-size: var(--stl-typography-scale-sm);
2736
+ line-height: 1;
2737
+
2738
+ max-width: max-content;
2739
+
2740
+ .stldocs-snippet-multi-tab {
2741
+ border-radius: var(--stl-ui-layout-border-radius);
2742
+ border: 1px solid transparent;
2743
+ padding: 9px 14px;
2744
+ font-weight: 400;
2745
+ color: var(--stl-color-foreground-reduced);
2746
+ flex: 0 0 auto;
2747
+
2748
+ & > input {
2749
+ display: none;
2750
+ }
2751
+ &:has(> :checked) {
2752
+ background-color: var(--stl-color-ui-background);
2753
+ border-color: var(--stl-color-border);
2754
+ font-weight: 500;
2755
+ color: var(--stl-color-foreground);
2756
+ }
2757
+ }
2758
+ }
2759
+ .stldocs-snippet-multi-pane {
2760
+ display: none;
2761
+ &.stldocs-snippet-multi-pane-active {
2762
+ display: block;
2763
+ }
2764
+ }
2765
+ }
2766
+ }
2767
+
2768
+ .stldocs-root .stldocs-language-block {
2769
+ background-color: var(--stl-color-background);
2770
+ border: 1px solid var(--stl-color-border);
2771
+ border-radius: 8px;
2772
+ padding: 16px;
2773
+ display: flex;
2774
+ flex-direction: column;
2775
+ gap: 8px;
2776
+
2777
+ .stldocs-language-block-content {
2778
+ display: flex;
2779
+ gap: 12px;
2780
+
2781
+ .stldocs-language-block-content-icon {
2782
+ display: inline-flex;
2783
+ border: 1px solid var(--stl-color-border);
2784
+ border-radius: 4px;
2785
+ padding: 12px;
2786
+ aspect-ratio: 1 / 1;
2787
+ }
2788
+
2789
+ .stldocs-language-block-content-info {
2790
+ .stldocs-language-block-content-info-language {
2791
+ line-height: 120%;
2792
+ font-weight: 600;
2793
+ }
2794
+
2795
+ .stldocs-language-block-content-info-version {
2796
+ font-family: var(--stl-typography-font-mono);
2797
+ font-size: var(--stl-typography-scale-sm);
2798
+ font-weight: 200;
2799
+ }
2800
+ }
2801
+ }
2802
+
2803
+ .stldocs-language-block-install {
2804
+ display: flex;
2805
+ font-family: var(--stl-typography-font-mono);
2806
+ font-size: var(--stl-typography-scale-sm);
2807
+ background-color: var(--stldocs-color-bg-inline-code);
2808
+ border: 1px solid var(--stl-color-border);
2809
+ color: var(--stl-color-foreground-reduced);
2810
+ border-radius: 4px;
2811
+ padding: 4px 8px;
2812
+
2813
+ pre {
2814
+ flex-grow: 1;
2815
+ white-space: nowrap;
2816
+ overflow-x: hidden;
2817
+ text-overflow: ellipsis;
2818
+ display: flex;
2819
+ align-items: center;
2820
+ }
2821
+
2822
+ svg {
2823
+ vertical-align: middle;
2824
+ min-width: 16px;
2825
+ }
2826
+ }
2827
+
2828
+ .stldocs-language-block-links {
2829
+ display: flex;
2830
+ gap: 8px;
2831
+
2832
+ & > a:last-child {
2833
+ flex-grow: 1;
2834
+ }
2835
+ }
2836
+ }
2837
+
2838
+ @media (min-width: 1280px) {
2839
+ .stldocs-root .stldocs-method.stldocs-method-double-pane {
2840
+ .stldocs-method-example {
2841
+ flex: 1 1 500px;
2842
+ max-width: 100%;
2843
+ width: 100%;
2844
+ }
2845
+
2846
+ .stldocs-method-body {
2847
+ flex-direction: row;
2848
+ gap: 2rem;
2849
+ }
2850
+ }
2851
+ }
2852
+
2853
+ /* Don't put expanders in the margin on mobile */
2854
+ @media (max-width: 50rem) {
2855
+ .stldocs-root .stldocs-method-body {
2856
+ padding: 1rem var(--stldocs-content-padding-inline) !important;
2857
+ }
2858
+
2859
+ .stldocs-root .stldocs-resource .stldocs-resource-content {
2860
+ padding: 0 var(--stldocs-content-padding-inline) !important;
2861
+
2862
+ .stldocs-resource-content-properties {
2863
+ margin-left: 0 !important;
2864
+ }
2865
+ }
2866
+ }
2867
+
2868
+ @media (min-width: 50rem) {
2869
+ .stldocs-root .stldocs-method {
2870
+ .stldocs-method-header {
2871
+ padding: var(--stldocs-title-padding-y) 0;
2872
+ }
2873
+ }
2874
+ }
2875
+
2876
+ @media (min-width: 1280px) {
2877
+ .stldocs-root {
2878
+ .stldocs-method.stldocs-method-double-pane .stldocs-method-content-column {
2879
+ display: block;
2880
+ }
2881
+
2882
+ .stldocs-method.stldocs-method-double-pane .stldocs-method-body {
2883
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2884
+ grid-template-areas: 'description example';
2885
+ grid-template-rows: unset;
2886
+
2887
+ .stldocs-snippet {
2888
+ .stldocs-snippet-response {
2889
+ display: block;
2890
+ }
2891
+
2892
+ .stldocs-snippet-response-pane {
2893
+ position: relative;
2894
+ padding: 0;
2895
+ --shiki-background: transparent;
2896
+ }
2897
+
2898
+ .stldocs-snippet-multi-response {
2899
+ display: block;
2900
+ padding: 0;
2901
+ }
2902
+ }
2903
+
2904
+ .stldocs-method-response-column {
2905
+ display: none;
2906
+ margin-top: 0;
2907
+ }
2908
+
2909
+ .stldocs-method-content-column {
2910
+ grid-area: description;
2911
+ }
2912
+
2913
+ .stldocs-method-example {
2914
+ margin-top: 0;
2915
+ grid-area: example;
2916
+
2917
+ .stldocs-snippet-multi-response {
2918
+ display: block;
2919
+ border: none;
2920
+
2921
+ .stldocs-snippet {
2922
+ background-color: transparent;
2923
+ border: none;
2924
+ }
2925
+ }
2926
+ }
2927
+
2928
+ .stldocs-method-info {
2929
+ grid-area: unset;
2930
+ margin-top: 0;
2931
+ }
2932
+
2933
+ .stldocs-snippet-response-tab {
2934
+ margin-bottom: 0.5rem;
2935
+
2936
+ &.stldocs-snippet-response-tab-single-return {
2937
+ background-color: transparent;
2938
+
2939
+ .stldocs-snippet-response-tab-item {
2940
+ button {
2941
+ &:hover {
2942
+ background-color: transparent;
2943
+ }
2944
+ }
2945
+ }
2946
+ }
2947
+ }
2948
+ }
2949
+ }
2950
+ }
2951
+
2952
+ :root {
2953
+ --stldocs-sidebar-item-padding-inline: 0.75rem;
2954
+ --stldocs-sidebar-item-padding-block: 0.375rem;
2955
+ --stldocs-sidebar-indent: 0.75rem;
2956
+ }
2957
+
2958
+ .stldocs-sidebar {
2959
+ font-family: var(--stl-typography-font);
2960
+ font-size: var(--stl-typography-scale-sm);
2961
+ /* Remove background color from stldocs-root reset. */
2962
+ background-color: transparent;
2963
+
2964
+ ul,
2965
+ summary {
2966
+ list-style-type: none;
2967
+ }
2968
+
2969
+ .stldocs-expander-summary,
2970
+ .stldocs-sidebar-entry-group > a {
2971
+ font-weight: 500;
2972
+ }
2973
+
2974
+ .stldocs-expander-summary {
2975
+ display: flex;
2976
+ align-items: center;
2977
+ user-select: none;
2978
+
2979
+ .stldocs-expander-summary-icon {
2980
+ margin-left: 4px;
2981
+ opacity: 0.65;
2982
+ transition:
2983
+ opacity 0.1s ease-out,
2984
+ transform 0.1s ease-out;
2985
+ border-radius: 4px;
2986
+
2987
+ &:hover {
2988
+ background-color: var(--stl-color-background-hover);
2989
+ }
2990
+ }
2991
+
2992
+ span[aria-hidden='true'] {
2993
+ opacity: 0;
2994
+ }
2995
+ }
2996
+
2997
+ .stldocs-sidebar-entry-group {
2998
+ position: relative;
2999
+
3000
+ /* Anchor is positioned over the <details>. */
3001
+ > a {
3002
+ position: absolute;
3003
+ top: 0;
3004
+ left: 0;
3005
+ right: 0;
3006
+ padding-block: var(--stldocs-sidebar-item-padding-block);
3007
+ padding-inline: var(--stldocs-sidebar-item-padding-inline);
3008
+ }
3009
+ }
3010
+
3011
+ .stldocs-sidebar-expander[open] > .stldocs-expander-summary .stldocs-expander-summary-icon {
3012
+ opacity: 1;
3013
+ transform: rotate(90deg);
3014
+ }
3015
+
3016
+ /* Explicitly prevent collapsed groups from painting.
3017
+ Browsers should not be computing styles/layout on collapsed <details> non-summary children, but Safari still seems to.
3018
+ Applying display: none lowers rendering cost for trees with many items (eg. the CF API which has ~2k+ items)
3019
+ In Arena's testing using dev server, Safari paint time for a CF page went from 10-14 seconds to ~3 seconds.
3020
+ */
3021
+ .stldocs-sidebar-expander:not([open]) > .stldocs-sidebar-list {
3022
+ display: none;
3023
+ }
3024
+
3025
+ /* List items. */
3026
+ .stldocs-sidebar-entry,
3027
+ .stldocs-expander-summary {
3028
+ margin: 0;
3029
+ border-radius: 8px;
3030
+ }
3031
+
3032
+ .stldocs-expander-summary,
3033
+ .stldocs-sidebar-entry-link a {
3034
+ padding: var(--stldocs-sidebar-item-padding-block) var(--stldocs-sidebar-item-padding-inline);
3035
+ }
3036
+
3037
+ summary.stldocs-expander-summary,
3038
+ .stldocs-sidebar-entry-link a {
3039
+ cursor: pointer;
3040
+ }
3041
+
3042
+ .stldocs-sidebar-entry-link a:hover {
3043
+ color: var(--stl-color-foreground);
3044
+ }
3045
+
3046
+ .stldocs-sidebar-entry-link a {
3047
+ color: var(--stl-color-foreground-reduced);
3048
+ font-weight: 400;
3049
+ display: flex;
3050
+ text-decoration: none;
3051
+ span {
3052
+ font-weight: inherit;
3053
+ }
3054
+
3055
+ &:hover {
3056
+ text-decoration: underline;
3057
+ text-decoration-color: var(--stl-color-foreground-reduced);
3058
+ }
3059
+ &[aria-current='page'] {
3060
+ font-weight: 500;
3061
+ color: var(--stl-color-foreground);
3062
+ }
3063
+ }
3064
+
3065
+ /* When the sidebar entry has a link, disable pointer events on the <details> text
3066
+ so that they pass through to the <a>. */
3067
+ .stldocs-sidebar-entry-group:has(> a) .stldocs-expander-summary > span {
3068
+ pointer-events: none;
3069
+ }
3070
+
3071
+ .stldocs-sidebar-entry-link:has(> a:is(:hover, [aria-current='page'])),
3072
+ .stldocs-sidebar-entry-group:has(> a:is(:hover, [aria-current='page']))
3073
+ > .stldocs-sidebar-expander
3074
+ > .stldocs-expander-summary,
3075
+ summary.stldocs-expander-summary:hover {
3076
+ background-color: var(--stl-color-background-hover);
3077
+ }
3078
+
3079
+ /* Nested list items have flat left edge. */
3080
+ .stldocs-sidebar-list .stldocs-sidebar-list :is(.stldocs-expander-summary, .stldocs-sidebar-entry) {
3081
+ border-start-start-radius: 0;
3082
+ border-end-start-radius: 0;
3083
+ }
3084
+
3085
+ .stldocs-sidebar-list {
3086
+ padding: 0;
3087
+ }
3088
+
3089
+ .stldocs-sidebar-list .stldocs-sidebar-list .stldocs-sidebar-entry {
3090
+ border-inline-start: 1px solid var(--stl-color-border-faint);
3091
+ margin-inline-start: var(--stldocs-sidebar-indent);
3092
+
3093
+ > a[aria-current='page'] {
3094
+ border-inline-start: 2px solid var(--stl-color-accent-border-strong);
3095
+ margin-left: -1px;
3096
+ }
3097
+ }
3098
+
3099
+ /* Icon positioning within links/groups. */
3100
+ .stldocs-sidebar-entry-link > a,
3101
+ .stldocs-sidebar-entry-group > a,
3102
+ .stldocs-sidebar-entry-group .stldocs-expander-summary > span {
3103
+ display: flex;
3104
+ align-items: center;
3105
+ gap: 8px;
3106
+ }
3107
+
3108
+ /* Hover/active states for HTTP badges. */
3109
+ a[aria-current='page'] .stl-ui-badge--http {
3110
+ &.stl-ui-badge--http-get {
3111
+ background-color: var(--stl-color-green-inverse-background);
3112
+ color: var(--stl-color-green-inverse-foreground);
3113
+ }
3114
+
3115
+ &.stl-ui-badge--http-post {
3116
+ background-color: var(--stl-color-blue-inverse-background);
3117
+ color: var(--stl-color-blue-inverse-foreground);
3118
+ }
3119
+
3120
+ &.stl-ui-badge--http-patch,
3121
+ &.stl-ui-badge--http-put {
3122
+ background-color: var(--stl-color-orange-inverse-background);
3123
+ color: var(--stl-color-orange-inverse-foreground);
3124
+ }
3125
+
3126
+ &.stl-ui-badge--http-delete {
3127
+ background-color: var(--stl-color-red-inverse-background);
3128
+ color: var(--stl-color-red-inverse-foreground);
3129
+ }
3130
+ }
3131
+
3132
+ a:hover:not([aria-current='page']) .stl-ui-badge--http {
3133
+ &.stl-ui-badge--http-get {
3134
+ background-color: var(--stl-color-green-muted-background-hover);
3135
+ }
3136
+
3137
+ &.stl-ui-badge--http-post {
3138
+ background-color: var(--stl-color-blue-muted-background-hover);
3139
+ }
3140
+
3141
+ &.stl-ui-badge--http-patch,
3142
+ &.stl-ui-badge--http-put {
3143
+ background-color: var(--stl-color-orange-muted-background-hover);
3144
+ }
3145
+
3146
+ &.stl-ui-badge--http-delete {
3147
+ background-color: var(--stl-color-red-muted-background-hover);
3148
+ }
3149
+ }
3150
+ }
3151
+
3152
+ .stldocs-root .stldocs-search-form {
3153
+ display: flex;
3154
+ flex-direction: column;
3155
+
3156
+ .stldocs-search-filter {
3157
+ margin-top: 0.5rem;
3158
+ display: flex;
3159
+ gap: 0.5rem;
3160
+
3161
+ .stl-ui-button {
3162
+ flex: 1 1 auto;
3163
+ padding: 0;
3164
+ display: flex;
3165
+ gap: 0.5em;
3166
+
3167
+ .stldocs-search-filter-count {
3168
+ font-size: 0.75rem;
3169
+ background-color: var(--stldocs-color-selected);
3170
+ border-radius: 100vmax;
3171
+ padding: 0 0.35rem;
3172
+ line-height: 1.5;
3173
+ font-variant-numeric: tabular-nums;
3174
+ }
3175
+
3176
+ svg {
3177
+ flex: 0 0 auto;
3178
+ }
3179
+ }
3180
+
3181
+ @media not (min-width: 50rem) {
3182
+ svg {
3183
+ display: block;
3184
+ }
3185
+ .stldocs-search-filter-label,
3186
+ .stldocs-search-filter-count {
3187
+ display: none;
3188
+ }
3189
+ }
3190
+ }
3191
+
3192
+ .stldocs-search-result {
3193
+ display: flex;
3194
+ flex-direction: column;
3195
+ gap: 0.5rem;
3196
+ cursor: pointer;
3197
+ margin: 0.5rem 0;
3198
+ padding: 0.5rem 0.8rem;
3199
+
3200
+ mark {
3201
+ color: var(--stl-color-foreground);
3202
+ background-color: var(--stl-color-text-selection-background);
3203
+ box-shadow: inset 0 -1px rgb(from var(--stl-color-text-selection-background) r g b / 1);
3204
+ }
3205
+
3206
+ &[data-stldocs-search-result='resource'] {
3207
+ .stldocs-search-result-resource-info {
3208
+ display: flex;
3209
+ gap: 0.5rem;
3210
+
3211
+ .stldocs-search-result-resource-title {
3212
+ font-weight: 600;
3213
+ }
3214
+
3215
+ .stldocs-search-result-resource-path {
3216
+ font-family: var(--stl-typography-font-mono);
3217
+ color: var(--stl-color-foreground);
3218
+ overflow: hidden;
3219
+ text-overflow: ellipsis;
3220
+ white-space: nowrap;
3221
+ }
3222
+ }
3223
+ }
3224
+
3225
+ &[data-stldocs-search-result='http_method'] {
3226
+ h3.stldocs-method-title {
3227
+ font-size: 1.2rem;
3228
+ }
3229
+
3230
+ .stldocs-method-header {
3231
+ display: flex;
3232
+ flex-direction: column;
3233
+ gap: 0.5rem;
3234
+
3235
+ .stldocs-method-signature {
3236
+ font-family: var(--stl-typography-font-mono);
3237
+ color: var(--stl-color-foreground);
3238
+ white-space: pre-wrap;
3239
+ word-break: break-word;
3240
+
3241
+ .stldocs-text-identifier {
3242
+ color: var(--stl-color-foreground);
3243
+ }
3244
+ }
3245
+
3246
+ .stldocs-method-route {
3247
+ font-size: 0.8rem;
3248
+
3249
+ .stldocs-method-route-endpoint {
3250
+ font-family: var(--stl-typography-font-mono);
3251
+ color: var(--stl-color-foreground-muted);
3252
+ }
3253
+ }
3254
+ }
3255
+
3256
+ .stldocs-method-description {
3257
+ color: var(--stl-color-foreground);
3258
+ }
3259
+ }
3260
+
3261
+ &[data-stldocs-search-result='property'] {
3262
+ .stldocs-property-info {
3263
+ display: flex;
3264
+ flex-direction: column;
3265
+ gap: 0.5rem;
3266
+ }
3267
+
3268
+ .stldocs-property-header {
3269
+ display: flex;
3270
+ gap: 0.5rem;
3271
+
3272
+ .stldocs-property-name {
3273
+ font-family: var(--stl-typography-font-mono);
3274
+ }
3275
+
3276
+ .stldocs-property-typename {
3277
+ color: var(--stl-color-foreground-muted);
3278
+ }
3279
+ }
3280
+
3281
+ .stldocs-property-description {
3282
+ color: var(--stl-color-foreground);
3283
+ }
3284
+ }
3285
+
3286
+ &[data-stldocs-search-result='model'] {
3287
+ .stldocs-property-info {
3288
+ display: flex;
3289
+ flex-direction: column;
3290
+ gap: 0.5rem;
3291
+
3292
+ .stldocs-property-type {
3293
+ font-family: var(--stl-typography-font-mono);
3294
+ color: var(--stl-color-foreground);
3295
+ }
3296
+ }
3297
+ }
3298
+
3299
+ &[data-stldocs-search-result='guide'] {
3300
+ .stldocs-search-result-guide-title {
3301
+ font-size: 1.2rem;
3302
+ }
3303
+
3304
+ .stldocs-search-result-guide-excerpt {
3305
+ color: var(--stl-color-foreground);
3306
+ }
3307
+
3308
+ .stldocs-search-breadcrumb-item {
3309
+ text-transform: capitalize;
3310
+ }
3311
+ }
3312
+ }
3313
+
3314
+ .stldocs-search-breadcrumb {
3315
+ display: flex;
3316
+ gap: 0.5rem;
3317
+ font-size: 0.8rem;
3318
+ overflow: hidden;
3319
+ text-overflow: ellipsis;
3320
+ white-space: nowrap;
3321
+
3322
+ .stldocs-search-breadcrumb-item {
3323
+ color: var(--stl-color-foreground-muted);
3324
+ }
3325
+
3326
+ .stldocs-icon {
3327
+ margin-top: auto;
3328
+ margin-bottom: auto;
3329
+ }
3330
+ }
3331
+
3332
+ .stldocs-search-disabled-state-container {
3333
+ margin: auto;
3334
+ text-align: center;
3335
+ }
3336
+ }
3337
+
3338
+ .stldocs-root .stldocs-search-modal {
3339
+ height: calc(100svh - var(--sl-nav-height));
3340
+ width: 100%;
3341
+ overflow: hidden;
3342
+ display: none;
3343
+ padding: 1rem 1rem 0;
3344
+ inset: 0;
3345
+ background-color: var(--stl-color-background);
3346
+ color: var(--stl-color-foreground);
3347
+ gap: 0.5rem;
3348
+ border: none;
3349
+
3350
+ &:popover-open,
3351
+ &[data-stldocs-modal-open='true'] {
3352
+ display: flex;
3353
+ flex-direction: column;
3354
+ position: fixed;
3355
+ top: var(--sl-nav-height);
3356
+ }
3357
+
3358
+ .stldocs-search-form {
3359
+ height: 100%;
3360
+ width: 100%;
3361
+
3362
+ .stldocs-listview {
3363
+ margin: 0.8rem 0 0;
3364
+ height: 100%;
3365
+ padding-bottom: 1rem;
3366
+ }
3367
+ }
3368
+
3369
+ .stldocs-search-modal-close-button {
3370
+ display: flex;
3371
+ justify-content: flex-end;
3372
+ }
3373
+
3374
+ &::backdrop {
3375
+ background-color: var(--stldocs-color-backdrop-overlay);
3376
+ -webkit-backdrop-filter: blur(0.25rem);
3377
+ backdrop-filter: blur(0.25rem);
3378
+ top: var(--sl-nav-height);
3379
+ }
3380
+ }
3381
+
3382
+ @keyframes stldocs-spinner-rotate {
3383
+ 100% {
3384
+ transform: rotate(360deg);
3385
+ }
3386
+ }
3387
+
3388
+ @media (min-width: 50rem) {
3389
+ .stldocs-root {
3390
+ .stldocs-search-modal {
3391
+ height: 100%;
3392
+ width: 1024px;
3393
+ max-width: calc(100% - 4rem);
3394
+ max-height: 80vh;
3395
+ margin: 3rem auto;
3396
+ border: 1px solid var(--stl-color-border);
3397
+ /* nest with input that has --stl-ui-layout-border-radius-sml */
3398
+ border-radius: calc(var(--stl-ui-layout-border-radius-sml) + 0.9rem);
3399
+
3400
+ .stldocs-search-modal-close-button {
3401
+ display: none;
3402
+ }
3403
+
3404
+ &:popover-open,
3405
+ &[data-stldocs-modal-open='true'] {
3406
+ top: 0;
3407
+ }
3408
+
3409
+ &::backdrop {
3410
+ top: 0;
3411
+ }
3412
+ }
3413
+ }
3414
+ }
3415
+
3416
+ /* For standalone usage of docs-ui */
3417
+
3418
+ /*
3419
+ * TODO: replace with real import once rolldown css support matures further
3420
+ * This import gets bundled so this import will should need to be resolved at runtime
3421
+ */
3422
+
3423
+