igniteui-astro-components 0.0.8 → 0.0.9

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 (30) hide show
  1. package/package.json +1 -1
  2. package/src/components/DocsBreadcrumb/DocsBreadcrumb.astro +3 -3
  3. package/src/components/DocsBreadcrumb/DocsBreadcrumb.scss +12 -3
  4. package/src/components/DocsSidebar/DocsSidebar.astro +5 -1
  5. package/src/components/DocsSidebar/DocsSidebar.scss +27 -40
  6. package/src/components/DocsSidebar/SidebarFilterInput.astro +3 -4
  7. package/src/components/DocsSidebar/SidebarFilterInput.scss +2 -3
  8. package/src/components/DocsSubHeader/DocsSubHeader.astro +16 -7
  9. package/src/components/DocsSubHeader/DocsSubHeader.scss +32 -35
  10. package/src/components/DocsToc/DocsToc.astro +10 -5
  11. package/src/components/DocsToc/DocsToc.scss +10 -11
  12. package/src/components/DocsTree/docs-tree.scss +16 -9
  13. package/src/components/MobileTocToggle/MobileTocToggle.astro +96 -0
  14. package/src/components/MobileTocToggle/MobileTocToggle.scss +74 -0
  15. package/src/components/Search/Search.astro +11 -0
  16. package/src/components/Search/Search.scss +13 -0
  17. package/src/components/SearchAdvanced/SearchAdvanced.astro +17 -3
  18. package/src/components/SearchAdvanced/SearchAdvanced.scss +170 -139
  19. package/src/components/mdx/DocsAside/DocsAside.scss +11 -28
  20. package/src/components/mdx/Sample/Sample.scss +3 -3
  21. package/src/layouts/DocsLayout/DocsLayout.astro +24 -6
  22. package/src/layouts/DocsLayout/DocsLayout.scss +241 -81
  23. package/src/styles/global/_breakpoints.scss +15 -37
  24. package/src/styles/global/_component-themes.scss +8 -27
  25. package/src/styles/global/_markdown.scss +514 -452
  26. package/src/styles/global/_palette.scss +8 -7
  27. package/src/styles/global/_search-shared.scss +63 -64
  28. package/src/styles/global/_type-scale.scss +2 -2
  29. package/src/styles/global/_variables.scss +8 -21
  30. package/src/styles/theme.scss +26 -8
@@ -1,532 +1,594 @@
1
- @use '../../styles/global/breakpoints' as *;
2
1
  @use 'igniteui-theming/sass/typography' as *;
3
2
 
4
- // 'code' and 'small' are custom type-scale entries — their CSS vars are
5
- // generated by typography() but type-style() only accepts standard names.
6
- // Read the generated --ig-* vars directly to avoid the warning.
7
- .igd-main-content__markdown {
8
- padding: var(--igd-page-padding);
9
- min-width: 0;
10
-
11
- > pre {
12
- @include type-style('code', false) {
13
- margin: 0;
14
- };
3
+ @layer components {
4
+ // 'code' and 'small' are custom type-scale entries — their CSS vars are
5
+ // generated by typography() but type-style() only accepts standard names.
6
+ // Read the generated --ig-* vars directly to avoid the warning.
7
+ .igd-main-content__markdown {
8
+ p {
9
+ @include type-style('body-1');
10
+ }
15
11
 
16
- border: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-primary-900));
17
- background-color: light-dark(var(--ig-gray-50), var(--ig-gray-50)) !important;
18
- color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
19
- }
20
-
21
- > pre,
22
- > code {
23
- margin-block-end: rem(26px);
24
- }
25
-
26
- kbd {
27
- @include type-style('code', false) {
28
- margin: 0;
29
- };
12
+ h1 {
13
+ @include type-style('h1');
14
+ }
30
15
 
31
- background-color: var(--ig-gray-100);
32
- color: var(--ig-gray-100-contrast);
33
- box-shadow: none;
34
- border: rem(1px) solid var(--ig-gray-300);
35
- }
36
-
37
- // <code> that is not inside a <pre> tag
38
- code:not(pre code) {
39
- @include type-style('code', false) {
40
- margin: 0;
41
- };
16
+ h2 {
17
+ @include type-style('h2');
18
+ }
42
19
 
43
- background: light-dark(var(--ig-primary-50), var(--ig-gray-50));
44
- color: light-dark(var(--ig-primary-600), var(--ig-gray-500));
45
- border: rem(1px) solid light-dark(var(--ig-gray-300), var(--ig-gray-200));
20
+ h3 {
21
+ @include type-style('h3');
22
+ }
46
23
 
47
- padding: rem(4px) rem(8px);
48
- border-radius: rem(4px);
49
- }
50
-
51
- > ul,
52
- > ol,
53
- > dl {
54
- @include type-style('body-2') {
55
- margin: 0;
24
+ h4 {
25
+ @include type-style('h4');
26
+ }
27
+
28
+ h5 {
29
+ @include type-style('h5');
56
30
  }
57
31
 
58
- padding-inline-start: rem(18px);
59
- padding-block: 0;
32
+ h6 {
33
+ @include type-style('h6');
34
+ }
60
35
 
61
- li {
62
- @include type-style('secondary-text', false) {
36
+ p,h1,h2,h3,h4,h5,h6,table {
37
+ code {
38
+ margin-block-end: 0;
39
+ }
40
+ }
41
+
42
+ color: light-dark(var(--ig-gray-700), var(--ig-gray-500));
43
+
44
+ padding: var(--igd-page-padding);
45
+ min-width: 0;
46
+
47
+ pre {
48
+ @include type-style('code', false) {
63
49
  margin: 0;
64
50
  };
65
51
 
66
- > strong {
67
- @include type-style('subtitle-2') {
68
- margin: 0;
69
- }
70
- ;
52
+ border: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-primary-900));
53
+ background-color: light-dark(var(--ig-gray-50), var(--ig-gray-50)) !important;
54
+ color: light-dark(var(--ig-gray-900), var(--ig-gray-800));
55
+ }
56
+
57
+ pre,
58
+ code {
59
+ margin-block-end: rem(26px);
60
+ }
61
+
62
+ code {
63
+ --shiki-dark-bg: transparent;
64
+ --shiki-light-bg: transparent;
65
+ }
66
+
67
+ kbd {
68
+ @include type-style('code', false) {
69
+ margin: 0;
70
+ };
71
+
72
+ background-color: var(--ig-gray-100);
73
+ color: var(--ig-gray-100-contrast);
74
+ box-shadow: none;
75
+ border: rem(1px) solid var(--ig-gray-300);
76
+ }
77
+
78
+ // <code> that is not inside a <pre> tag
79
+ code:not(pre code) {
80
+ @include type-style('code', false) {
81
+ margin: 0;
82
+ };
83
+
84
+ background: light-dark(var(--ig-primary-50), #112031);
85
+ color: light-dark(var(--ig-primary-600), var(--ig-gray-400));
86
+ border: rem(1px) solid light-dark(var(--ig-gray-300), #1A314A);
87
+
88
+ padding: rem(4px) rem(8px);
89
+ border-radius: rem(4px);
90
+ }
91
+
92
+ ul,
93
+ ol,
94
+ dl {
95
+ @include type-style('body-1') {
96
+ margin: 0;
71
97
  }
72
98
 
73
- position: relative;
74
- color: var(--ig-gray-700);
75
- padding-inline: 0 rem(8px);
76
- padding-block: rem(8px);
99
+ padding-inline-start: rem(18px);
100
+ padding-block: 0;
101
+ color: inherit;
77
102
 
78
- > .shiki {
79
- margin-top: rem(8px);
103
+ li {
104
+ > strong {
105
+ @include type-style('subtitle-2') {
106
+ margin: 0;
107
+ }
108
+ ;
109
+ }
110
+
111
+ position: relative;
112
+ color: inherit;
113
+ padding-inline: 0 rem(8px);
114
+ padding-block: rem(8px);
115
+
116
+ > .shiki {
117
+ margin-top: rem(8px);
118
+ }
119
+
120
+ ::marker {
121
+ color: var(--ig-gray-700);
122
+ }
123
+
124
+ &:has(> ul) {
125
+ padding-block-end: 0;
126
+ }
80
127
  }
81
128
 
82
- ::marker {
83
- color: var(--ig-gray-700);
129
+ code {
130
+ margin-block-end: 0;
84
131
  }
85
132
 
86
- &:has(> ul) {
87
- padding-block-end: 0;
133
+ p, h1, h2, h3, h4, h5, h6:only-child {
134
+ margin: 0;
88
135
  }
89
136
  }
90
137
 
91
- p, h1, h2, h3, h4, h5, h6:only-child {
92
- margin: 0;
138
+ // <ul> that is not inside <li>
139
+ // <ol> that is not inside <li>
140
+ ul:not(li ul),
141
+ ol:not(li ol),
142
+ dl:not(dd dl)
143
+ {
144
+ margin-bottom: rem(26px) !important;
93
145
  }
94
- }
95
-
96
- // <ul> that is not inside <li>
97
- // <ol> that is not inside <li>
98
- > ul:not(li ul),
99
- > ol:not(li ol),
100
- > dl:not(dd dl)
101
- {
102
- margin-bottom: rem(26px) !important;
103
- }
104
-
105
- dl {
106
- padding-inline-start: 0;
107
146
 
108
- dt {
109
- color: var(--ig-gray-900);
110
- }
111
-
112
- dd {
113
- margin-block-end: rem(16px);
114
- color: var(--ig-gray-700);
147
+ dl {
148
+ padding-inline-start: 0;
149
+
150
+ dt {
151
+ color: var(--ig-gray-900);
152
+ }
153
+
154
+ dd {
155
+ margin-block-end: rem(16px);
156
+ color: inherit;
157
+ }
115
158
  }
116
- }
117
-
118
- > address {
119
- line-height: rem(32px);
120
159
 
121
- p {
122
- @include type-style('body-2') {
123
- line-height: rem(32px);
124
- };
160
+ address {
161
+ line-height: rem(32px);
162
+
163
+ p {
164
+ @include type-style('body-2') {
165
+ line-height: rem(32px);
166
+ };
167
+ }
168
+
169
+ a {
170
+ color: inherit;
171
+ text-decoration: underline;
172
+ }
173
+
174
+ margin-block-end: rem(26px);
125
175
  }
126
176
 
127
177
  a {
128
178
  color: inherit;
129
179
  text-decoration: underline;
180
+
181
+ &:hover,
182
+ &:focus {
183
+ color: light-dark(var(--ig-primary-600), var(--ig-primary-100));
184
+ }
130
185
  }
131
186
 
132
- margin-block-end: rem(26px);
133
- }
134
-
135
- a {
136
- color: inherit;
137
- text-decoration: underline;
138
-
139
- &:hover,
140
- &:focus {
141
- color: light-dark(var(--ig-primary-600), var(--ig-primary-100));
187
+ .igd-defined-in {
188
+ > span {
189
+ white-space: nowrap;
190
+ }
191
+
192
+ border: 1px solid light-dark(var(--ig-primary-500), var(--ig-primary-800));
193
+ padding: rem(8px) rem(16px);
194
+ border-radius: var(--igd-border-radius);
195
+
196
+ @include type-style('body-1');
197
+
198
+ display: grid;
199
+ align-items: start;
200
+ grid-template-columns: auto 1fr;
201
+ gap: rem(8px);
202
+ color: var(--ig-secondary-500);
203
+ margin-block-end: rem(26px);
204
+
205
+ a {
206
+ min-width: 0;
207
+ text-overflow: ellipsis;
208
+ white-space: nowrap;
209
+ overflow: hidden;
210
+ }
142
211
  }
143
- }
212
+
213
+ // Headings injected with anchor link button by rehype-heading-anchors
214
+ h2, h3, h4, h5, h6 {
215
+ display: flex;
216
+ align-items: center;
217
+ gap: rem(8px);
218
+ // CSS baseline: ensure in-page anchor links scroll the heading clear of
219
+ // the sticky subheader. The JS-driven scroll-padding-top set by DocsToc
220
+ // (using the measured subheader bottom) takes precedence when available.
221
+ scroll-margin-top: rem(18px);
144
222
 
145
- .igd-defined-in {
146
- > span {
147
- white-space: nowrap;
223
+ &:hover .igd-anchor-link {
224
+ opacity: 1;
225
+ }
148
226
  }
149
227
 
150
- border: 1px solid light-dark(var(--ig-primary-500), var(--ig-primary-800));
151
- padding: rem(8px) rem(16px);
152
- border-radius: var(--igd-border-radius);
153
-
154
- @include type-style('body-1');
155
-
156
- display: grid;
157
- align-items: start;
158
- grid-template-columns: auto 1fr;
159
- gap: rem(8px);
160
- color: var(--ig-secondary-500);
161
- margin-block-end: rem(26px);
162
-
163
- a {
164
- min-width: 0;
165
- text-overflow: ellipsis;
166
- white-space: nowrap;
167
- overflow: hidden;
228
+ h1, h2, h3, h4, h5, h6 {
229
+ color: light-dark(var(--ig-gray-800), var(--ig-gray-700));
168
230
  }
169
- }
170
231
 
171
- // Headings injected with anchor link button by rehype-heading-anchors
172
- h2, h3, h4, h5, h6 {
173
- display: flex;
174
- align-items: center;
175
- gap: rem(8px);
176
- // CSS baseline: ensure in-page anchor links scroll the heading clear of
177
- // the sticky subheader. The JS-driven scroll-padding-top set by DocsToc
178
- // (using the measured subheader bottom) takes precedence when available.
179
- scroll-margin-top: rem(18px);
180
-
181
- &:hover .igd-anchor-link {
182
- opacity: 1;
232
+ .igd-anchor-link {
233
+ opacity: 0;
234
+ flex-shrink: 0;
235
+ transition: opacity 0.15s ease;
236
+
237
+ // igc-icon-button internal sizing
238
+ --ig-size: 1;
239
+ --foreground: var(--ig-secondary-500);
240
+ --background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
241
+ --border-color: light-dark(var(--ig-gray-100), var(--ig-secondary-500));
242
+
243
+ --hover-foreground: var(--ig-secondary-500);
244
+ --hover-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
245
+
246
+ --focus-foreground: var(--ig-secondary-500);
247
+ --focus-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
248
+
249
+ --active-foreground: var(--ig-secondary-500);
250
+ --active-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
251
+
252
+ &::part(focused) {
253
+ &:after {
254
+ display: none;
255
+ }
256
+ }
257
+
258
+ &:focus-within,
259
+ &:focus-visible {
260
+ opacity: 1;
261
+ outline: none;
262
+ }
263
+
264
+ igc-icon {
265
+ --size: rem(24px);
266
+ }
183
267
  }
184
- }
185
-
186
- .igd-anchor-link {
187
- opacity: 0;
188
- flex-shrink: 0;
189
- transition: opacity 0.15s ease;
190
-
191
- // igc-icon-button internal sizing
192
- --ig-size: 1;
193
- --foreground: var(--ig-secondary-500);
194
- --background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
195
- --border-color: light-dark(var(--ig-gray-100), var(--ig-secondary-500));
196
268
 
197
- --hover-foreground: var(--ig-secondary-500);
198
- --hover-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
199
-
200
- --focus-foreground: var(--ig-secondary-500);
201
- --focus-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
202
-
203
- --active-foreground: var(--ig-secondary-500);
204
- --active-background: light-dark(var(--ig-gray-100), var(--ig-secondary-900));
205
-
206
- &::part(focused) {
207
- &:after {
208
- display: none;
209
- }
269
+ .lead {
270
+ margin-bottom: rem(26px)
210
271
  }
211
272
 
212
- &:focus-within,
213
- &:focus-visible {
214
- opacity: 1;
215
- outline: none;
273
+ img {
274
+ display: block;
275
+ max-width: 100%;
276
+ height: auto;
277
+ margin-block-end: rem(26px);
278
+ border-radius: var(--igd-border-radius);
279
+ content-visibility: auto;
216
280
  }
217
-
218
- igc-icon {
219
- --size: rem(24px);
281
+
282
+ // Image wrapped in a link — no underline, contain the block margin
283
+ a:has(> img) {
284
+ text-decoration: none;
285
+ display: inline-block;
220
286
  }
221
- }
222
287
 
223
- .lead {
224
- margin-bottom: rem(26px)
225
- }
288
+ // Figure / figcaption
289
+ figure {
290
+ margin-inline: 0;
291
+ margin-block-end: rem(26px);
226
292
 
227
- img {
228
- display: block;
229
- max-width: 100%;
230
- height: auto;
231
- margin-block-end: rem(26px);
232
- border-radius: var(--igd-border-radius);
233
- content-visibility: auto;
234
- }
235
-
236
- // Image wrapped in a link — no underline, contain the block margin
237
- a:has(> img) {
238
- text-decoration: none;
239
- display: inline-block;
240
- }
241
-
242
- // Figure / figcaption
243
- figure {
244
- margin-inline: 0;
245
- margin-block-end: rem(26px);
246
-
247
- // Nested img should not double-margin
248
- img,
249
- video,
250
- p, h1, h2, h3, h4, h5, h6 {
251
- margin-block-end: 0;
293
+ // Nested img should not double-margin
294
+ img,
295
+ video,
296
+ p, h1, h2, h3, h4, h5, h6 {
297
+ margin-block-end: 0;
298
+ }
252
299
  }
253
- }
254
-
255
- figcaption {
256
- @include type-style('caption') { margin: 0; }
257
-
258
- > p {
300
+
301
+ figcaption {
259
302
  @include type-style('caption') { margin: 0; }
260
- }
261
-
262
- padding-block-start: rem(8px);
263
- margin-block-end: rem(26px);
264
- color: var(--ig-gray-600);
265
- text-align: center;
266
- }
303
+
304
+ > p {
305
+ @include type-style('caption') { margin: 0; }
306
+ }
267
307
 
268
- blockquote {
269
- padding: rem(16px);
270
- border-inline-start-width: rem(1px);
271
- border-inline-start-color: var(--ig-gray-500);
272
- margin-block-end: rem(26px);
308
+ padding-block-start: rem(8px);
309
+ margin-block-end: rem(26px);
310
+ color: var(--ig-gray-600);
311
+ text-align: center;
312
+ }
273
313
 
274
- p:only-child {
275
- @include type-style('detail-1', false) {
314
+ blockquote {
315
+ padding: rem(16px);
316
+ border-inline-start-width: rem(1px);
317
+ border-inline-start-color: var(--ig-gray-500);
318
+ margin-block-end: rem(26px);
319
+
320
+ p:only-child {
321
+ @include type-style('detail-1', false) {
322
+ margin: 0;
323
+ font-style: italic;
324
+ }
325
+
276
326
  margin: 0;
277
- font-style: italic;
278
327
  }
328
+ }
329
+
330
+ blockquote .small,
331
+ blockquote footer,
332
+ blockquote small {
333
+ @include type-style('detail-1', false) { margin: 0; }
279
334
 
280
- margin: 0;
335
+ color: var(--ig-gray-600);
281
336
  }
282
- }
283
337
 
284
- blockquote .small,
285
- blockquote footer,
286
- blockquote small {
287
- @include type-style('detail-1', false) { margin: 0; }
288
-
289
- color: var(--ig-gray-600);
290
- }
291
-
292
- // Responsive video / iframe embeds
293
- // Wrap a YouTube (or any 16:9) <iframe> in:
294
- // <div class="igd-video"> … </div>
295
- // or <figure class="igd-video"> for a caption.
296
- .igd-video {
297
- position: relative;
298
- width: 100%;
299
- aspect-ratio: 16 / 9;
300
- margin-block-end: rem(26px);
301
- border-radius: var(--igd-border-radius);
302
- overflow: hidden;
303
- outline: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-700));
304
-
305
- iframe,
306
- video {
307
- position: absolute;
308
- inset: 0;
338
+ // Responsive video / iframe embeds
339
+ // Wrap a YouTube (or any 16:9) <iframe> in:
340
+ // <div class="igd-video"> … </div>
341
+ // or <figure class="igd-video"> for a caption.
342
+ .igd-video {
343
+ position: relative;
309
344
  width: 100%;
310
- height: 100%;
311
- border: 0;
312
- }
313
- }
314
-
315
- // Native <video> standalone
316
- video {
317
- display: block;
318
- max-width: 100%;
319
- height: auto;
320
- border-radius: var(--igd-border-radius);
321
- margin-block-end: rem(26px);
322
- font-family: inherit;
323
- outline: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-700));
324
- }
325
-
326
- // Native <audio> standalone
327
- audio {
328
- display: block;
329
- width: 100%;
330
- margin-block-end: rem(26px);
331
- }
345
+ aspect-ratio: 16 / 9;
346
+ margin-block-end: rem(26px);
347
+ border-radius: var(--igd-border-radius);
348
+ overflow: hidden;
349
+ outline: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-100));
332
350
 
333
- p, ul, ol, table {
334
- code {
335
- @include type-style('code', false) {
336
- margin: 0;
337
- };
338
-
339
- padding: rem(2px) rem(4px);
340
- font-size: 90%;
341
- color: var(--ig-primary-800);
342
- background-color: var(--ig-primary-50);
343
- border-radius: rem(4px);
344
- }
345
-
346
- a:has(code) {
347
- text-decoration: none;
348
-
349
- &:hover {
350
- text-decoration: underline;
351
+ iframe,
352
+ video {
353
+ position: absolute;
354
+ inset: 0;
355
+ width: 100%;
356
+ height: 100%;
357
+ border: 0;
351
358
  }
352
359
  }
353
- }
354
360
 
355
- > hr {
356
- border: none;
357
- border-block-start: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-100));
358
- margin-block: rem(26px);
359
- }
360
-
361
- @media (max-width: #{$bp-mobile-horizontal-max}) {
362
- padding-inline: rem(32px);
363
- }
364
- }
365
-
366
- // Theme property map tab switcher (used in component theming sections)
367
- .theme-switcher-wrapper {
368
- input[type='radio'][name='theme'] {
369
- display: none;
370
- }
371
-
372
- .switch-label {
373
- display: inline-block;
374
- cursor: pointer;
375
- padding: rem(6px) rem(16px);
376
- border-bottom: rem(2px) solid transparent;
377
- margin-inline-end: rem(4px);
378
- color: var(--ig-gray-600);
379
-
380
- &:hover {
381
- color: var(--ig-gray-900);
361
+ // Native <video> standalone
362
+ video {
363
+ display: block;
364
+ max-width: 100%;
365
+ height: auto;
366
+ border-radius: var(--igd-border-radius);
367
+ margin-block-end: rem(26px);
368
+ font-family: inherit;
369
+ outline: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-100));
382
370
  }
383
- }
384
-
385
- .tables .theme-table {
386
- display: none;
387
- }
388
-
389
- #material:checked ~ .tables .theme-table.material,
390
- #fluent:checked ~ .tables .theme-table.fluent,
391
- #bootstrap:checked ~ .tables .theme-table.bootstrap,
392
- #indigo:checked ~ .tables .theme-table.indigo {
393
- display: block;
394
- }
395
-
396
- #material:checked ~ label[for='material'],
397
- #fluent:checked ~ label[for='fluent'],
398
- #bootstrap:checked ~ label[for='bootstrap'],
399
- #indigo:checked ~ label[for='indigo'] {
400
- color: var(--igd-accent);
401
- border-bottom-color: var(--igd-accent);
402
- font-weight: 600;
403
- }
404
- }
405
-
406
- // Scroll container — wraps every <table> (injected by rehypeTableWrapper).
407
- // Technique from https://piccalil.li/blog/styling-tables-the-modern-css-way/
408
- .igd-table-wrapper {
409
- overflow: auto;
410
- max-height: var(--igd-table-max-height);
411
- border: rem(1px) solid var(--igd-table-border-color);
412
- margin-block-end: rem(26px);
413
- width: 100%;
414
- position: relative;
415
- z-index: 0;
416
371
 
417
- table {
418
- font-family: inherit;
419
- border-collapse: collapse;
420
-
421
- // Ensure the table is at least as wide as its container but can grow
422
- // wider for many columns — enabling horizontal scroll in the wrapper.
423
- min-width: 100%;
424
- color: var(--igd-table-fg);
425
-
426
- th {
427
- white-space: nowrap;
428
- }
429
-
430
- td, th {
431
- // Only row borders — no column dividers.
432
- border-block: rem(1px) solid var(--igd-table-border-color);
433
- border-inline: none;
434
- padding-block: rem(16px);
435
- padding-inline: rem(24px);
436
- vertical-align: baseline;
372
+ // Native <audio> standalone
373
+ audio {
374
+ display: block;
375
+ width: 100%;
376
+ margin-block-end: rem(26px);
437
377
  }
438
378
 
439
- // First row: no top border — the wrapper provides it.
440
- thead tr:first-child th,
441
- tbody tr:first-child td,
442
- tbody tr:first-child th {
443
- border-block-start: none;
444
- }
445
379
 
446
- // Last row: no bottom border — the wrapper provides it.
447
- tbody tr:last-child td,
448
- tbody tr:last-child th,
449
- tfoot tr:last-child td,
450
- tfoot tr:last-child th {
451
- border-block-end: none;
380
+ > hr {
381
+ border: none;
382
+ border-block-start: rem(1px) solid light-dark(var(--ig-gray-200), var(--ig-gray-100));
383
+ margin-block: rem(26px);
452
384
  }
453
-
454
- thead th {
455
- vertical-align: bottom;
456
-
457
- // Remove the cell's own bottom border — the ::after pseudo-element
458
- // on the sticky rule below provides the single 2px line.
459
- border-block-end: none;
385
+ }
386
+
387
+ // Theme property map tab switcher (used in component theming sections)
388
+ .theme-switcher-wrapper {
389
+ input[type='radio'][name='theme'] {
390
+ display: none;
460
391
  }
461
-
462
- // Zebra effect — disabled by default.
463
- tr {
464
- background-color: var(--igd-table-bg);
392
+
393
+ .switch-label {
394
+ display: inline-block;
395
+ cursor: pointer;
396
+ padding: rem(6px) rem(16px);
397
+ border-bottom: rem(2px) solid transparent;
398
+ margin-inline-end: rem(4px);
399
+ color: var(--ig-gray-600);
400
+
401
+ &:hover {
402
+ color: var(--ig-gray-900);
403
+ }
465
404
  }
466
-
467
- tr:nth-child(even) {
468
- background-color: var(--igd-tabe-row-even-bg);
405
+
406
+ .tables .theme-table {
407
+ display: none;
469
408
  }
470
-
471
- tr:hover {
472
- background-color: var(--igd-tabe-row-hover-bg);
409
+
410
+ #material:checked ~ .tables .theme-table.material,
411
+ #fluent:checked ~ .tables .theme-table.fluent,
412
+ #bootstrap:checked ~ .tables .theme-table.bootstrap,
413
+ #indigo:checked ~ .tables .theme-table.indigo {
414
+ display: block;
473
415
  }
474
-
475
- th {
476
- text-align: left;
477
- background-color: var(--igd-table-header-bg);
478
- color: var(--igd-table-header-fg);
416
+
417
+ #material:checked ~ label[for='material'],
418
+ #fluent:checked ~ label[for='fluent'],
419
+ #bootstrap:checked ~ label[for='bootstrap'],
420
+ #indigo:checked ~ label[for='indigo'] {
421
+ color: var(--igd-accent);
422
+ border-bottom-color: var(--igd-accent);
423
+ font-weight: 600;
479
424
  }
425
+ }
426
+
427
+ // Scroll container — wraps every <table> (injected by rehypeTableWrapper).
428
+ // Technique from https://piccalil.li/blog/styling-tables-the-modern-css-way/
429
+ .igd-table-wrapper {
430
+ overflow: auto;
431
+ max-height: var(--igd-table-max-height);
432
+ border: rem(1px) solid var(--igd-table-border-color);
433
+ margin-block-end: rem(26px);
434
+ width: 100%;
435
+ position: relative;
436
+ z-index: 0;
480
437
 
481
- // Sticky header row
482
- thead th {
483
- position: sticky;
484
- top: 0;
485
- z-index: 2;
486
-
487
- // ::before for the bottom border so it doesn't conflict with the
488
- // ::after column separator on th:first-child (both are the same element).
489
- &::before {
490
- content: '';
491
- position: absolute;
492
- inset-block-end: 0;
438
+ table {
439
+ font-family: inherit;
440
+ border-collapse: collapse;
441
+
442
+ // Ensure the table is at least as wide as its container but can grow
443
+ // wider for many columns — enabling horizontal scroll in the wrapper.
444
+ min-width: 100%;
445
+ color: var(--igd-table-fg);
446
+
447
+ th {
448
+ @include type-style('subtitle-2') {
449
+ margin: 0;
450
+ }
451
+
452
+ white-space: nowrap;
453
+ }
454
+
455
+ td {
456
+ @include type-style('detail-1', false) {
457
+ margin: 0;
458
+ }
459
+ }
460
+
461
+ td, th {
462
+ // Only row borders — no column dividers.
463
+ border-block: rem(1px) solid var(--igd-table-border-color);
464
+ border-inline: none;
465
+ padding-block: rem(16px);
466
+ padding-inline: rem(24px);
467
+ vertical-align: baseline;
468
+ }
469
+
470
+ // First row: no top border — the wrapper provides it.
471
+ thead tr:first-child th,
472
+ tbody tr:first-child td,
473
+ tbody tr:first-child th {
474
+ border-block-start: none;
475
+ }
476
+
477
+ // Last row: no bottom border — the wrapper provides it.
478
+ tbody tr:last-child td,
479
+ tbody tr:last-child th,
480
+ tfoot tr:last-child td,
481
+ tfoot tr:last-child th {
482
+ border-block-end: none;
483
+ }
484
+
485
+ thead th {
486
+ vertical-align: bottom;
487
+
488
+ // Remove the cell's own bottom border — the ::after pseudo-element
489
+ // on the sticky rule below provides the single 2px line.
490
+ border-block-end: none;
491
+ }
492
+
493
+ // Zebra effect — disabled by default.
494
+ tr {
495
+ background-color: var(--igd-table-bg);
496
+ }
497
+
498
+ tr:nth-child(even) {
499
+ background-color: var(--igd-tabe-row-even-bg);
500
+ }
501
+
502
+ tr:hover {
503
+ background-color: var(--igd-tabe-row-hover-bg);
504
+ }
505
+
506
+ th {
507
+ text-align: left;
508
+ background-color: var(--igd-table-header-bg);
509
+ color: var(--igd-table-header-fg);
510
+ }
511
+
512
+ // Sticky header row
513
+ thead th {
514
+ position: sticky;
515
+ top: 0;
516
+ z-index: 2;
517
+
518
+ // ::before for the bottom border so it doesn't conflict with the
519
+ // ::after column separator on th:first-child (both are the same element).
520
+ &::before {
521
+ content: '';
522
+ position: absolute;
523
+ inset-block-end: 0;
524
+ inset-inline-start: 0;
525
+ width: 100%;
526
+ height: var(--igd-table-pinned-border-size);
527
+ background: var(--igd-table-border-color);
528
+ }
529
+ }
530
+
531
+ // Double bottom border on the sticky header row when scrolled vertically.
532
+ .igd-table-wrapper[data-scrolled-y] & thead th::before {
533
+ height: rem(3px);
534
+ background: linear-gradient(
535
+ to bottom,
536
+ var(--igd-table-border-color) 0,
537
+ var(--igd-table-border-color) rem(1px),
538
+ transparent rem(1px),
539
+ transparent rem(2px),
540
+ var(--igd-table-border-color) rem(2px),
541
+ var(--igd-table-border-color) rem(3px)
542
+ );
543
+ }
544
+
545
+ // Sticky first column — each cell needs its own background so content doesn't bleed through.
546
+ th:first-child {
547
+ background-color: var(--igd-table-header-bg);
548
+ }
549
+
550
+ td:first-child {
551
+ background-color: var(--igd-table-bg);
552
+ }
553
+
554
+ th:first-child,
555
+ td:first-child {
556
+ position: sticky;
493
557
  inset-inline-start: 0;
494
- width: 100%;
495
- height: var(--igd-table-pinned-border-size);
496
- background: var(--igd-table-border-color);
558
+
559
+ &::after {
560
+ content: '';
561
+ position: absolute;
562
+ inset-block-start: 0;
563
+ inset-inline-end: 0;
564
+ width: var(--igd-table-pinned-border-size);
565
+ height: 100%;
566
+ background: var(--igd-table-border-color);
567
+ }
497
568
  }
498
- }
499
-
500
- // Sticky first column — each cell needs its own background so content doesn't bleed through.
501
- th:first-child {
502
- background-color: var(--igd-table-header-bg);
503
- }
504
-
505
- td:first-child {
506
- background-color: var(--igd-table-bg);
507
- }
508
-
509
- th:first-child,
510
- td:first-child {
511
- position: sticky;
512
- inset-inline-start: 0;
513
569
 
514
- &::after {
515
- content: '';
516
- position: absolute;
517
- inset-block-start: 0;
518
- inset-inline-end: 0;
519
- width: var(--igd-table-pinned-border-size);
520
- height: 100%;
521
- background: var(--igd-table-border-color);
570
+ // Double right border on the sticky first column when scrolled horizontally.
571
+ .igd-table-wrapper[data-scrolled-x] & th:first-child::after,
572
+ .igd-table-wrapper[data-scrolled-x] & td:first-child::after {
573
+ width: rem(3px);
574
+ background: linear-gradient(
575
+ to right,
576
+ var(--igd-table-border-color) 0,
577
+ var(--igd-table-border-color) rem(1px),
578
+ transparent rem(1px),
579
+ transparent rem(2px),
580
+ var(--igd-table-border-color) rem(2px),
581
+ var(--igd-table-border-color) rem(3px)
582
+ );
583
+ }
584
+
585
+ // Sticky first header cell sits above both axes — needs header background.
586
+ thead th:first-child,
587
+ tfoot th:first-child {
588
+ background-color: var(--igd-table-header-bg);
589
+ z-index: 3;
522
590
  }
523
- }
524
-
525
- // Sticky first header cell sits above both axes — needs header background.
526
- thead th:first-child,
527
- tfoot th:first-child {
528
- background-color: var(--igd-table-header-bg);
529
- z-index: 3;
530
591
  }
531
592
  }
532
593
  }
594
+