@khanacademy/wonder-blocks-modal 8.10.6 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,618 @@
1
+ @layer shared {/**
2
+ * ModalDialog styles
3
+ *
4
+ * Every rule is nested inside `.root` — the marker class on the outer padding
5
+ * layer `View`, which carries no declarations of its own. Every element here
6
+ * is a `View`, and these rules override properties `View` sets in its own
7
+ * single-class rule in the same `@layer shared` (`flex-direction`,
8
+ * `padding`, `position`, `z-index`, …). The bundle loads this package's CSS
9
+ * before core's, so the compound selector makes the result depend on
10
+ * specificity instead of load order.
11
+ *
12
+ * The wrapper's full-size defaults are assigned inside `:where()`, which has
13
+ * zero specificity, so `OnePaneDialog`'s module (passed through `style`)
14
+ * overrides them regardless of load order. `View` sets neither property.
15
+ *
16
+ * The small-screen overrides for elements a consumer can style live in
17
+ * `util/small-screen-styles.ts` as plain style objects, not here: the
18
+ * consumer's `style` goes through Aphrodite (unlayered and `!important`), so a
19
+ * rule in `@layer shared` would lose to it even inside a media query. That
20
+ * covers the wrapper's small-screen rules; the media blocks below only target
21
+ * elements consumers can't style. The media queries are the modal
22
+ * breakpoints: `midOrSmaller` (`max-width: 767px`) and `smMinOrSmallerHeight`
23
+ * (`max-height: 500px`). The build wraps every rule in `@layer shared { … }`.
24
+ *
25
+ * TODO [WB-2137]: standardize media query breakpoint tokens
26
+ */.wb-modal-dialog-root-0c114631 {
27
+ /* Pad outside of the shadow layer so the background color stays
28
+ * aligned. */
29
+ &.wb-modal-dialog-paddingLayer-0c114631 {
30
+ align-items: center;
31
+ block-size: 100%;
32
+ justify-content: center;
33
+ inline-size: 100%;
34
+ }
35
+
36
+ & .wb-modal-dialog-wrapper-0c114631 {
37
+ align-items: stretch;
38
+ border-radius: var(--wb-c-modal-root-border-radius);
39
+ box-shadow: var(--wb-c-modal-dialog-shadow-default);
40
+
41
+ /* Allows propagating the text color to all the children. */
42
+ color: var(--wb-semanticColor-core-foreground-neutral-strong);
43
+ flex-direction: row;
44
+ position: relative;
45
+ }
46
+
47
+ /* Ensures the dialog container uses the container size */
48
+ & .wb-modal-dialog-dialog-0c114631 {
49
+ inline-size: 100%;
50
+ block-size: 100%;
51
+ border-radius: var(--wb-c-modal-root-border-radius);
52
+ overflow: hidden;
53
+ }
54
+
55
+ & .wb-modal-dialog-above-0c114631 {
56
+ pointer-events: none;
57
+ position: absolute;
58
+ inset: 0;
59
+ z-index: 1;
60
+ }
61
+
62
+ & .wb-modal-dialog-below-0c114631 {
63
+ pointer-events: none;
64
+ position: absolute;
65
+ inset: 0;
66
+ z-index: -1;
67
+ }
68
+
69
+ @media screen and (height <= 500px) {
70
+ & .wb-modal-dialog-dialog-0c114631 {
71
+ overflow: auto;
72
+ }
73
+ }
74
+
75
+ /* stylelint-disable-next-line media-feature-name-disallowed-list -- Modal's small-screen breakpoint (767px) has no breakpoint token; switching to one would change the layout. TODO(WB-2137): move Modal (CSS and modalMediaQuery) to a standard breakpoint together */
76
+ @media screen and (width <= 767px) {
77
+ &.wb-modal-dialog-paddingLayer-0c114631 {
78
+ padding: var(--wb-c-modal-dialog-layout-padding);
79
+ }
80
+ }
81
+ }:where(.wb-modal-dialog-wrapper-0c114631) {
82
+ block-size: 100%;
83
+ inline-size: 100%;
84
+ }
85
+ }
86
+
87
+ @layer shared {/**
88
+ * ModalFooter styles
89
+ *
90
+ * The footer is a `View`, and this rule overrides properties `View` sets in
91
+ * its own single-class rule in the same `@layer shared` (`flex-direction`,
92
+ * `padding`, `margin`, …). The bundle loads this package's CSS before core's,
93
+ * so the rule is nested under the `.root` marker class (`.root.footer`) to
94
+ * win on specificity rather than load order. The build wraps every rule in
95
+ * `@layer shared { … }`.
96
+ */.wb-modal-footer-root-9e947823 {
97
+ &.wb-modal-footer-footer-9e947823 {
98
+ flex: 0 0 auto;
99
+ box-sizing: border-box;
100
+
101
+ /* ensure footer stays at the bottom of modal content with scrolling */
102
+ margin-block-start: auto;
103
+ min-block-size: var(--wb-sizing-size_640);
104
+ padding-inline: var(--wb-c-modal-footer-layout-padding-inline);
105
+ padding-block: var(--wb-c-modal-footer-layout-padding-block);
106
+ display: flex;
107
+ flex-direction: row;
108
+ align-items: center;
109
+ justify-content: flex-end;
110
+ box-shadow: 0 -1px 0 var(--wb-semanticColor-core-border-neutral-subtle);
111
+ }
112
+ }
113
+ }
114
+
115
+ @layer shared {/**
116
+ * ModalHeader styles
117
+ *
118
+ * Every rule is nested inside `.root` — the marker class on the header
119
+ * `View`, which carries no declarations of its own. The header and
120
+ * breadcrumbs are `View`s and the title/subtitle are `Heading`/`BodyText`;
121
+ * these rules override properties those components set in single-class rules
122
+ * in the same `@layer shared` (`padding`, `margin`, `min-block-size`, …). The
123
+ * bundle loads this package's CSS before theirs, so the compound selector
124
+ * makes the result depend on specificity instead of load order.
125
+ *
126
+ * Base declarations come first and the media blocks after them, the order
127
+ * Aphrodite emitted them in. The media queries are the modal breakpoints:
128
+ * `midOrSmaller` (`max-width: 767px`) and `smMinOrSmallerHeight`
129
+ * (`max-height: 500px`). The build wraps every rule in `@layer shared { … }`.
130
+ *
131
+ * TODO [WB-2137]: standardize media query breakpoint tokens
132
+ */.wb-modal-header-root-861865df {
133
+ &.wb-modal-header-header-861865df {
134
+ box-shadow: 0 1px 0 var(--wb-semanticColor-core-border-neutral-subtle);
135
+ display: flex;
136
+ flex-direction: column;
137
+ min-block-size: 66px;
138
+ padding-block: var(--wb-c-modal-header-layout-padding-block);
139
+ padding-inline: var(--wb-c-modal-header-layout-padding-inline-default);
140
+ position: relative;
141
+ inline-size: 100%;
142
+ }
143
+
144
+ & .wb-modal-header-breadcrumbs-861865df {
145
+ color: var(--wb-semanticColor-core-foreground-neutral-default);
146
+ margin-block-end: var(--wb-c-modal-header-layout-gap-default);
147
+ }
148
+
149
+ & .wb-modal-header-title-861865df {
150
+ /* Prevent title from overlapping the close button */
151
+ padding-inline-end: var(--wb-c-modal-header-layout-gap-title-default);
152
+ }
153
+
154
+ & .wb-modal-header-subtitle-861865df {
155
+ color: var(--wb-semanticColor-core-foreground-neutral-default);
156
+ margin-block-start: var(--wb-c-modal-header-layout-gap-default);
157
+ }
158
+
159
+ /* stylelint-disable-next-line media-feature-name-disallowed-list -- Modal's small-screen breakpoint (767px) has no breakpoint token; switching to one would change the layout. TODO(WB-2137): move Modal (CSS and modalMediaQuery) to a standard breakpoint together */
160
+ @media screen and (width <= 767px) {
161
+ &.wb-modal-header-header-861865df {
162
+ padding-inline: var(--wb-c-modal-header-layout-padding-inline-small);
163
+ }
164
+
165
+ & .wb-modal-header-title-861865df {
166
+ padding-inline-end: var(--wb-c-modal-header-layout-gap-title-small);
167
+ }
168
+ }
169
+
170
+ @media screen and (height <= 500px) {
171
+ &.wb-modal-header-header-861865df {
172
+ min-block-size: unset;
173
+ }
174
+ }
175
+ }
176
+ }
177
+
178
+ @layer shared {/**
179
+ * ModalBackdrop styles
180
+ *
181
+ * The positioner is a `View`, and this component overrides properties `View`
182
+ * sets in its own single-class rule in the same `@layer shared` (`position`,
183
+ * `align-items`). The bundle loads this package's CSS before core's, so the
184
+ * rule is nested under the `.root` marker class (`.root.modalPositioner`) to
185
+ * win on specificity rather than load order.
186
+ *
187
+ * The consumer's `styles.backdrop` (via `ModalLauncher`) still goes through
188
+ * Aphrodite (unlayered and `!important`), so it wins over this module as it
189
+ * did before. The build wraps every rule in `@layer shared { … }`.
190
+ */.wb-modal-backdrop-root-26b9a9a8 {
191
+ &.wb-modal-backdrop-modalPositioner-26b9a9a8 {
192
+ position: fixed;
193
+ inset-inline-start: 0;
194
+ inset-block-start: 0;
195
+ inline-size: 100%;
196
+ block-size: 100%;
197
+ align-items: center;
198
+ justify-content: center;
199
+
200
+ /* If the modal ends up being too big for the viewport (e.g., the min
201
+ * height is triggered), add another scrollbar specifically for
202
+ * scrolling modal content. */
203
+ overflow: auto;
204
+ background: var(--wb-semanticColor-core-background-overlay-default);
205
+ }
206
+ }
207
+ }
208
+
209
+ @layer shared {/**
210
+ * ModalLauncher styles
211
+ *
212
+ * The container is `FocusTrap`'s root `View`, and `z-index` overrides the
213
+ * `z-index: 0` `View` sets in its own single-class rule in the same
214
+ * `@layer shared`. The bundle loads this package's CSS before core's, so the
215
+ * rule is nested under the `.root` marker class (`.root.container`) to win on
216
+ * specificity rather than load order. The build wraps every rule in
217
+ * `@layer shared { … }`.
218
+ */.wb-modal-launcher-root-8b1f173e {
219
+ &.wb-modal-launcher-container-8b1f173e {
220
+ /* This z-index is copied from the Khan Academy webapp.
221
+ *
222
+ * TODO(mdr): Should we keep this in a constants file somewhere? Or
223
+ * not hardcode it at all, and provide it to Wonder Blocks via
224
+ * configuration? */
225
+ z-index: 1080;
226
+ }
227
+ }
228
+ }
229
+
230
+ @layer shared {/**
231
+ * ModalContent styles
232
+ *
233
+ * Every rule is nested inside `.root` — the marker class on the outer
234
+ * wrapper `View`, which carries no declarations of its own. Both elements are
235
+ * `View`s, and these rules override properties `View` sets in its own
236
+ * single-class rule in the same `@layer shared` (`display`, `padding`,
237
+ * `min-block-size`). The bundle loads this package's CSS before core's, so
238
+ * the compound selector makes the result depend on specificity instead.
239
+ *
240
+ * The small-screen overrides for elements a consumer can style live in
241
+ * `util/small-screen-styles.ts` as plain style objects, not here: the
242
+ * consumer's `style` goes through Aphrodite (unlayered and `!important`), so a
243
+ * rule in `@layer shared` would lose to it even inside a media query. That
244
+ * covers `.content`'s small-screen rules.
245
+ * `.wrapperSmallHeight` stays here because consumers can't style the outer
246
+ * wrapper; it only carries a media query (`max-height: 500px`) and is applied
247
+ * unless `applySmallHeightStyles` is false (`FlexibleDialog` /
248
+ * `DrawerDialog`). The build wraps every rule in `@layer shared { … }`.
249
+ *
250
+ * TODO [WB-2137]: standardize media query breakpoint tokens
251
+ */.wb-modal-content-root-71497938 {
252
+ &.wb-modal-content-wrapper-71497938 {
253
+ flex: 1;
254
+
255
+ /* This helps to ensure that the paddingBottom is preserved when the
256
+ * contents start to overflow, this goes away on display: flex */
257
+ display: block;
258
+ }
259
+
260
+ &.wb-modal-content-scrollOverflow-71497938 {
261
+ overflow: auto;
262
+ }
263
+
264
+ & .wb-modal-content-content-71497938 {
265
+ flex: 1;
266
+ min-block-size: 100%;
267
+ padding: var(--wb-c-modal-panel-layout-gap-default);
268
+ box-sizing: border-box;
269
+ }
270
+
271
+ @media screen and (height <= 500px) {
272
+ &.wb-modal-content-wrapperSmallHeight-71497938 {
273
+ flex: unset;
274
+ min-block-size: unset;
275
+ overflow: unset;
276
+ }
277
+ }
278
+ }
279
+ }
280
+
281
+ @layer shared {/**
282
+ * ModalPanel styles
283
+ *
284
+ * Every rule is nested inside `.root` — the marker class on the panel's
285
+ * `View`, which carries no declarations of its own. The panel overrides
286
+ * properties `View` sets (`flex-direction`), and the close button overrides
287
+ * `IconButton`'s own rules; both packages ship single-class rules in the same
288
+ * `@layer shared`, and the bundle loads this package's CSS before theirs, so
289
+ * the compound selector makes the result depend on specificity instead of
290
+ * load order.
291
+ *
292
+ * The close button's `:focus` ring (0,3,0) outranks every `IconButton` state
293
+ * rule (`.button:hover` / `:active`, (0,2,0)), so it shows whenever the
294
+ * button is focused, as the unlayered Aphrodite rule did.
295
+ *
296
+ * `.hasFooter` is passed into `ModalContent`'s `style`, so it lands on the
297
+ * same element as `ModalContent`'s `.content` (0,2,0). Nesting it under
298
+ * `.root.wrapper` (0,3,0) makes it win regardless of load order.
299
+ *
300
+ * The consumer's `style` still goes through Aphrodite (unlayered and
301
+ * `!important`), so it wins over this module. The wrapper's small-height
302
+ * `overflow` rule lives in `util/small-screen-styles.ts` so it keeps beating
303
+ * the consumer's base `overflow`. The build wraps every rule in
304
+ * `@layer shared { … }`.
305
+ *
306
+ * TODO [WB-2137]: standardize media query breakpoint tokens
307
+ *//*
308
+ * Cross-package focus-visible mixin.
309
+ *
310
+ * Authors include the mixin via:
311
+ *
312
+ * @import "@khanacademy/wonder-blocks-styles/focus-styles.css";
313
+ *
314
+ * .my-component:focus-visible {
315
+ * @apply --wb-focus-visible;
316
+ * }
317
+ *
318
+ * postcss-import resolves the @import through the workspace and
319
+ * @csstools/postcss-mixins expands the @apply at build time
320
+ * (CSS Mixins Level 1 syntax — note the leading `--` on the name).
321
+ */.wb-modal-panel-root-77565dcb {
322
+ &.wb-modal-panel-wrapper-77565dcb {
323
+ flex: 1 1 auto;
324
+ flex-direction: column;
325
+ background: var(--wb-semanticColor-core-background-base-default);
326
+ box-sizing: border-box;
327
+ overflow: hidden;
328
+ block-size: 100%;
329
+ inline-size: 100%;
330
+
331
+ /* The space between the content and the footer */
332
+ & .wb-modal-panel-hasFooter-77565dcb {
333
+ padding-block-end: var(--wb-c-modal-panel-layout-gap-default);
334
+ }
335
+ }
336
+
337
+ & .wb-modal-panel-closeButton-77565dcb {
338
+ position: absolute;
339
+
340
+ /* insetInlineEnd supports both RTL and LTR layouts */
341
+ inset-inline-end: var(--wb-c-modal-closeButton-layout-gapRight);
342
+ inset-block-start: var(--wb-c-modal-closeButton-layout-gapTop);
343
+
344
+ /* This is to allow the button to be tab-ordered before the modal
345
+ * content but still be above the header and content. */
346
+ z-index: 1;
347
+
348
+ /* NOTE: IconButton uses :focus-visible, which is not supported for
349
+ * programmatic focus. This is a workaround to make sure the focus
350
+ * outline is visible when this control is focused. */
351
+ &:focus {
352
+ box-shadow: 0 0 0 var(--wb-border-width-medium)
353
+ var(--wb-semanticColor-focus-inner);
354
+ outline: var(--wb-border-width-medium) solid
355
+ var(--wb-semanticColor-focus-outer);
356
+ outline-offset: var(--wb-border-width-medium);
357
+ }
358
+ }
359
+ }
360
+ }
361
+
362
+ @layer shared {/**
363
+ * OnePaneDialog styles
364
+ *
365
+ * `OnePaneDialog` passes `.onePaneDialog` into `ModalDialog`'s `style`, which
366
+ * lands on the same element as `ModalDialog`'s `.wrapper`. That rule assigns
367
+ * its full-size defaults (`inline-size` / `block-size: 100%`) inside
368
+ * `:where()`, which has zero specificity, so this single-class rule wins
369
+ * regardless of stylesheet load order. `View` sets none of these properties.
370
+ *
371
+ * The small-screen overrides live in `util/small-screen-styles.ts` as plain
372
+ * style objects, so they keep beating the consumer's `style` (Aphrodite,
373
+ * unlayered and `!important`). The build wraps every rule in
374
+ * `@layer shared { … }`.
375
+ */.wb-one-pane-dialog-onePaneDialog-a4d4f705 {
376
+ max-inline-size: 576px;
377
+ inline-size: 93.75%;
378
+ block-size: 81.25%;
379
+ max-block-size: 624px;
380
+ }
381
+ }
382
+
383
+ @layer shared {/**
384
+ * FlexiblePanel styles
385
+ *
386
+ * Every rule is nested inside `.root` — the marker class on the panel's
387
+ * `View`, which carries no declarations of its own. The panel overrides
388
+ * properties `View` sets (`flex-direction`), and the close button overrides
389
+ * `IconButton`'s own rules; both packages ship single-class rules in the same
390
+ * `@layer shared`, and the bundle loads this package's CSS before theirs, so
391
+ * the compound selector makes the result depend on specificity instead of
392
+ * load order.
393
+ *
394
+ * The close button's `:focus` ring (0,3,0) outranks every `IconButton` state
395
+ * rule (`.button:hover` / `:active`, (0,2,0)), so it shows whenever the
396
+ * button is focused, as the unlayered Aphrodite rule did.
397
+ *
398
+ * The default background and the consumer's `styles.panel` /
399
+ * `styles.closeButton` still go through Aphrodite (unlayered and
400
+ * `!important`), so they win over this module. The build wraps every rule in
401
+ * `@layer shared { … }`.
402
+ *//*
403
+ * Cross-package focus-visible mixin.
404
+ *
405
+ * Authors include the mixin via:
406
+ *
407
+ * @import "@khanacademy/wonder-blocks-styles/focus-styles.css";
408
+ *
409
+ * .my-component:focus-visible {
410
+ * @apply --wb-focus-visible;
411
+ * }
412
+ *
413
+ * postcss-import resolves the @import through the workspace and
414
+ * @csstools/postcss-mixins expands the @apply at build time
415
+ * (CSS Mixins Level 1 syntax — note the leading `--` on the name).
416
+ */.wb-flexible-panel-root-caa0bc2b {
417
+ &.wb-flexible-panel-wrapper-caa0bc2b {
418
+ flex: 1 1 auto;
419
+ flex-direction: column;
420
+ box-sizing: border-box;
421
+ overflow: hidden;
422
+ block-size: 100%;
423
+ inline-size: 100%;
424
+ }
425
+
426
+ & .wb-flexible-panel-closeButton-caa0bc2b {
427
+ position: absolute;
428
+
429
+ /* insetInlineEnd supports both RTL and LTR layouts */
430
+ inset-inline-end: var(--wb-c-modal-closeButton-layout-gapRight);
431
+ inset-block-start: var(--wb-c-modal-closeButton-layout-gapTop);
432
+
433
+ /* This is to allow the button to be tab-ordered before the modal
434
+ * content but still be above the header and content. */
435
+ z-index: 1;
436
+
437
+ /* NOTE: IconButton uses :focus-visible, which is not supported for
438
+ * programmatic focus. This is a workaround to make sure the focus
439
+ * outline is visible when this control is focused. */
440
+ &:focus {
441
+ box-shadow: 0 0 0 var(--wb-border-width-medium)
442
+ var(--wb-semanticColor-focus-inner);
443
+ outline: var(--wb-border-width-medium) solid
444
+ var(--wb-semanticColor-focus-outer);
445
+ outline-offset: var(--wb-border-width-medium);
446
+ }
447
+ }
448
+ }
449
+ }
450
+
451
+ @layer shared {/**
452
+ * FlexibleDialog styles
453
+ *
454
+ * The root rule is nested inside `.root` — the marker class on the dialog's
455
+ * outer `View`, which carries no declarations of its own. It overrides a
456
+ * property `View` sets in its own single-class rule in the same
457
+ * `@layer shared` (`position`), and the bundle loads this package's CSS
458
+ * before core's, so the compound selector makes the result depend on
459
+ * specificity instead of load order.
460
+ *
461
+ * The default sizes are assigned inside `:where()`, which has zero
462
+ * specificity, so `DrawerDialog`'s own module (passed through `styles.root`)
463
+ * overrides them regardless of load order. `View` sets none of them.
464
+ *
465
+ * The consumer's `styles.*` are Aphrodite styles, which `processStyleList`
466
+ * merges after every class here (unlayered and `!important`), so they win
467
+ * over this module as they did before. The build wraps every rule in
468
+ * `@layer shared { … }`.
469
+ */.wb-flexible-dialog-root-77f9ee79 {
470
+ &.wb-flexible-dialog-flexibleRoot-77f9ee79 {
471
+ box-shadow: var(--wb-c-modal-dialog-shadow-default);
472
+
473
+ /* Allows propagating the text color to all the children. */
474
+ color: var(--wb-semanticColor-core-foreground-neutral-strong);
475
+ overflow: auto; /* Prevent dialog from scrolling with background */
476
+ position: relative;
477
+ will-change: transform, opacity;
478
+ }
479
+ }/* Default widths/heights for FlexibleDialog alone */:where(.wb-flexible-dialog-flexibleRoot-77f9ee79) {
480
+ block-size: auto;
481
+ max-block-size: 100vh;
482
+ max-inline-size: 576px;
483
+ inline-size: 93.75%;
484
+ }
485
+ }
486
+
487
+ @layer shared {/**
488
+ * DrawerBackdrop styles
489
+ *
490
+ * The positioner is a `View`, and these rules override properties `View`
491
+ * sets in its own single-class rule in the same `@layer shared` (`position`,
492
+ * `align-items`). The bundle loads this package's CSS before core's, so the
493
+ * rules are nested under the `.root` marker class to win on specificity
494
+ * rather than load order.
495
+ *
496
+ * The fade classes are only applied when `animated` is true. The durations
497
+ * mirror `DRAWER_ENTER_DURATION_MS` / `DRAWER_EXIT_DURATION_MS` in
498
+ * `util/drawer-animation.ts`; a `timingDuration` override and the consumer's
499
+ * `style` are plain style objects that still go through Aphrodite (unlayered
500
+ * and `!important`), so they win over this module. The build wraps every
501
+ * rule in `@layer shared { … }`.
502
+ */.wb-drawer-backdrop-root-be242eab {
503
+ &.wb-drawer-backdrop-drawerPositioner-be242eab {
504
+ position: fixed;
505
+ inset-inline-start: 0;
506
+ inset-block-start: 0;
507
+ inline-size: 100%;
508
+ block-size: 100%;
509
+ display: flex;
510
+ overflow: hidden;
511
+ background: var(--wb-semanticColor-core-background-overlay-default);
512
+ }
513
+
514
+ &.wb-drawer-backdrop-inlineStart-be242eab {
515
+ align-items: flex-start;
516
+ justify-content: flex-start;
517
+ }
518
+
519
+ &.wb-drawer-backdrop-inlineEnd-be242eab {
520
+ align-items: flex-end;
521
+ justify-content: flex-start;
522
+ }
523
+
524
+ &.wb-drawer-backdrop-blockEnd-be242eab {
525
+ align-items: center;
526
+ justify-content: flex-end;
527
+ }
528
+
529
+ /* The backdrop's fade. Shares the panel's durations by default, so the
530
+ * two finish together. */
531
+ &.wb-drawer-backdrop-fadeIn-be242eab {
532
+ animation-name: wb-drawer-backdrop-backdrop-fade-in-be242eab;
533
+ animation-duration: 300ms;
534
+ animation-timing-function: linear;
535
+ animation-fill-mode: forwards;
536
+ }
537
+
538
+ &.wb-drawer-backdrop-fadeOut-be242eab {
539
+ animation-name: wb-drawer-backdrop-backdrop-fade-out-be242eab;
540
+ animation-duration: 150ms;
541
+ animation-timing-function: linear;
542
+ animation-fill-mode: forwards;
543
+ }
544
+ }@keyframes wb-drawer-backdrop-backdrop-fade-in-be242eab {
545
+ 0% {
546
+ opacity: 0;
547
+ }
548
+
549
+ 100% {
550
+ opacity: 1;
551
+ }
552
+ }@keyframes wb-drawer-backdrop-backdrop-fade-out-be242eab {
553
+ 0% {
554
+ opacity: 1;
555
+ }
556
+
557
+ 100% {
558
+ opacity: 0;
559
+ }
560
+ }
561
+ }
562
+
563
+ @layer shared {/**
564
+ * DrawerDialog styles
565
+ *
566
+ * Every rule is nested inside `.root` — the marker class `DrawerDialog`
567
+ * passes into `FlexibleDialog`'s `styles.root`, which carries no declarations
568
+ * of its own. The root and dialog rules override properties `View` sets in
569
+ * its own single-class rule in the same `@layer shared` (`min-block-size`,
570
+ * `min-inline-size`); the bundle loads this package's CSS before core's, so
571
+ * the compound selector makes the result depend on specificity instead of
572
+ * load order.
573
+ *
574
+ * `FlexibleDialog` assigns its default sizes inside `:where()` (zero
575
+ * specificity), so these rules override them regardless of load order.
576
+ * Within this file, source order reproduces the old Aphrodite merge:
577
+ * `.drawerRoot` → `.blockEnd`.
578
+ *
579
+ * The drawer's small-screen rules (`breakpoint.mediaQuery.smOrSmaller`) live
580
+ * in `util/small-screen-styles.ts`, because the consumer's `styles.root`
581
+ * would otherwise beat them. The slide/fade animation and the consumer's
582
+ * `styles.*` are plain style objects / Aphrodite styles, which
583
+ * `processStyleList` merges after every class here (unlayered and
584
+ * `!important`), so they win over this module as they did before. The build
585
+ * wraps every rule in `@layer shared { … }`.
586
+ */.wb-drawer-dialog-root-e8a53d57 {
587
+ &.wb-drawer-dialog-drawerRoot-e8a53d57 {
588
+ /* Override FlexibleDialog defaults for drawer usage */
589
+ block-size: 100%;
590
+ min-block-size: 100vh;
591
+
592
+ /* Use common widths for mininum/maximum */
593
+ min-inline-size: var(--wb-breakpoint-width-xsMax);
594
+ max-inline-size: var(--wb-breakpoint-width-smMax);
595
+ inline-size: 100%;
596
+ }
597
+
598
+ &.wb-drawer-dialog-blockEnd-e8a53d57 {
599
+ block-size: auto;
600
+ min-block-size: unset;
601
+ max-inline-size: unset;
602
+ }
603
+
604
+ /* Override the minBlockSize and minInlineSize on View, and allow blockEnd
605
+ * content to provide its own height. */
606
+ & .wb-drawer-dialog-dialogDefault-e8a53d57 {
607
+ min-block-size: 100vh;
608
+ min-inline-size: unset;
609
+ }
610
+
611
+ & .wb-drawer-dialog-dialogBlockEnd-e8a53d57 {
612
+ min-block-size: unset;
613
+ min-inline-size: unset;
614
+ }
615
+ }
616
+ }
617
+
618
+ /*# sourceMappingURL=index.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["<no source>","../../src/components/modal-dialog.module.css","../../src/components/modal-footer.module.css","../../src/components/modal-header.module.css","../../src/components/modal-backdrop.module.css","../../src/components/modal-launcher.module.css","../../src/components/modal-content.module.css","../../src/components/modal-panel.module.css","../../../wonder-blocks-styles/src/styles/focus-styles.css","../../src/components/one-pane-dialog.module.css","../../src/components/flexible-panel.module.css","../../src/components/flexible-dialog.module.css","../../src/components/drawer-backdrop.module.css","../../src/components/drawer-dialog.module.css"],"names":[],"mappings":"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","file":"index.css","sourcesContent":[null,"/**\n * ModalDialog styles\n *\n * Every rule is nested inside `.root` — the marker class on the outer padding\n * layer `View`, which carries no declarations of its own. Every element here\n * is a `View`, and these rules override properties `View` sets in its own\n * single-class rule in the same `@layer shared` (`flex-direction`,\n * `padding`, `position`, `z-index`, …). The bundle loads this package's CSS\n * before core's, so the compound selector makes the result depend on\n * specificity instead of load order.\n *\n * The wrapper's full-size defaults are assigned inside `:where()`, which has\n * zero specificity, so `OnePaneDialog`'s module (passed through `style`)\n * overrides them regardless of load order. `View` sets neither property.\n *\n * The small-screen overrides for elements a consumer can style live in\n * `util/small-screen-styles.ts` as plain style objects, not here: the\n * consumer's `style` goes through Aphrodite (unlayered and `!important`), so a\n * rule in `@layer shared` would lose to it even inside a media query. That\n * covers the wrapper's small-screen rules; the media blocks below only target\n * elements consumers can't style. The media queries are the modal\n * breakpoints: `midOrSmaller` (`max-width: 767px`) and `smMinOrSmallerHeight`\n * (`max-height: 500px`). The build wraps every rule in `@layer shared { … }`.\n *\n * TODO [WB-2137]: standardize media query breakpoint tokens\n */\n\n.root {\n /* Pad outside of the shadow layer so the background color stays\n * aligned. */\n &.paddingLayer {\n align-items: center;\n block-size: 100%;\n justify-content: center;\n inline-size: 100%;\n }\n\n & .wrapper {\n align-items: stretch;\n border-radius: var(--wb-c-modal-root-border-radius);\n box-shadow: var(--wb-c-modal-dialog-shadow-default);\n\n /* Allows propagating the text color to all the children. */\n color: var(--wb-semanticColor-core-foreground-neutral-strong);\n flex-direction: row;\n position: relative;\n }\n\n /* Ensures the dialog container uses the container size */\n & .dialog {\n inline-size: 100%;\n block-size: 100%;\n border-radius: var(--wb-c-modal-root-border-radius);\n overflow: hidden;\n }\n\n & .above {\n pointer-events: none;\n position: absolute;\n inset: 0;\n z-index: 1;\n }\n\n & .below {\n pointer-events: none;\n position: absolute;\n inset: 0;\n z-index: -1;\n }\n\n @media screen and (height <= 500px) {\n & .dialog {\n overflow: auto;\n }\n }\n\n /* stylelint-disable-next-line media-feature-name-disallowed-list -- Modal's small-screen breakpoint (767px) has no breakpoint token; switching to one would change the layout. TODO(WB-2137): move Modal (CSS and modalMediaQuery) to a standard breakpoint together */\n @media screen and (width <= 767px) {\n &.paddingLayer {\n padding: var(--wb-c-modal-dialog-layout-padding);\n }\n }\n}\n\n:where(.wrapper) {\n block-size: 100%;\n inline-size: 100%;\n}\n","/**\n * ModalFooter styles\n *\n * The footer is a `View`, and this rule overrides properties `View` sets in\n * its own single-class rule in the same `@layer shared` (`flex-direction`,\n * `padding`, `margin`, …). The bundle loads this package's CSS before core's,\n * so the rule is nested under the `.root` marker class (`.root.footer`) to\n * win on specificity rather than load order. The build wraps every rule in\n * `@layer shared { … }`.\n */\n\n.root {\n &.footer {\n flex: 0 0 auto;\n box-sizing: border-box;\n\n /* ensure footer stays at the bottom of modal content with scrolling */\n margin-block-start: auto;\n min-block-size: var(--wb-sizing-size_640);\n padding-inline: var(--wb-c-modal-footer-layout-padding-inline);\n padding-block: var(--wb-c-modal-footer-layout-padding-block);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n box-shadow: 0 -1px 0 var(--wb-semanticColor-core-border-neutral-subtle);\n }\n}\n","/**\n * ModalHeader styles\n *\n * Every rule is nested inside `.root` — the marker class on the header\n * `View`, which carries no declarations of its own. The header and\n * breadcrumbs are `View`s and the title/subtitle are `Heading`/`BodyText`;\n * these rules override properties those components set in single-class rules\n * in the same `@layer shared` (`padding`, `margin`, `min-block-size`, …). The\n * bundle loads this package's CSS before theirs, so the compound selector\n * makes the result depend on specificity instead of load order.\n *\n * Base declarations come first and the media blocks after them, the order\n * Aphrodite emitted them in. The media queries are the modal breakpoints:\n * `midOrSmaller` (`max-width: 767px`) and `smMinOrSmallerHeight`\n * (`max-height: 500px`). The build wraps every rule in `@layer shared { … }`.\n *\n * TODO [WB-2137]: standardize media query breakpoint tokens\n */\n\n.root {\n &.header {\n box-shadow: 0 1px 0 var(--wb-semanticColor-core-border-neutral-subtle);\n display: flex;\n flex-direction: column;\n min-block-size: 66px;\n padding-block: var(--wb-c-modal-header-layout-padding-block);\n padding-inline: var(--wb-c-modal-header-layout-padding-inline-default);\n position: relative;\n inline-size: 100%;\n }\n\n & .breadcrumbs {\n color: var(--wb-semanticColor-core-foreground-neutral-default);\n margin-block-end: var(--wb-c-modal-header-layout-gap-default);\n }\n\n & .title {\n /* Prevent title from overlapping the close button */\n padding-inline-end: var(--wb-c-modal-header-layout-gap-title-default);\n }\n\n & .subtitle {\n color: var(--wb-semanticColor-core-foreground-neutral-default);\n margin-block-start: var(--wb-c-modal-header-layout-gap-default);\n }\n\n /* stylelint-disable-next-line media-feature-name-disallowed-list -- Modal's small-screen breakpoint (767px) has no breakpoint token; switching to one would change the layout. TODO(WB-2137): move Modal (CSS and modalMediaQuery) to a standard breakpoint together */\n @media screen and (width <= 767px) {\n &.header {\n padding-inline: var(--wb-c-modal-header-layout-padding-inline-small);\n }\n\n & .title {\n padding-inline-end: var(--wb-c-modal-header-layout-gap-title-small);\n }\n }\n\n @media screen and (height <= 500px) {\n &.header {\n min-block-size: unset;\n }\n }\n}\n","/**\n * ModalBackdrop styles\n *\n * The positioner is a `View`, and this component overrides properties `View`\n * sets in its own single-class rule in the same `@layer shared` (`position`,\n * `align-items`). The bundle loads this package's CSS before core's, so the\n * rule is nested under the `.root` marker class (`.root.modalPositioner`) to\n * win on specificity rather than load order.\n *\n * The consumer's `styles.backdrop` (via `ModalLauncher`) still goes through\n * Aphrodite (unlayered and `!important`), so it wins over this module as it\n * did before. The build wraps every rule in `@layer shared { … }`.\n */\n\n.root {\n &.modalPositioner {\n position: fixed;\n inset-inline-start: 0;\n inset-block-start: 0;\n inline-size: 100%;\n block-size: 100%;\n align-items: center;\n justify-content: center;\n\n /* If the modal ends up being too big for the viewport (e.g., the min\n * height is triggered), add another scrollbar specifically for\n * scrolling modal content. */\n overflow: auto;\n background: var(--wb-semanticColor-core-background-overlay-default);\n }\n}\n","/**\n * ModalLauncher styles\n *\n * The container is `FocusTrap`'s root `View`, and `z-index` overrides the\n * `z-index: 0` `View` sets in its own single-class rule in the same\n * `@layer shared`. The bundle loads this package's CSS before core's, so the\n * rule is nested under the `.root` marker class (`.root.container`) to win on\n * specificity rather than load order. The build wraps every rule in\n * `@layer shared { … }`.\n */\n\n.root {\n &.container {\n /* This z-index is copied from the Khan Academy webapp.\n *\n * TODO(mdr): Should we keep this in a constants file somewhere? Or\n * not hardcode it at all, and provide it to Wonder Blocks via\n * configuration? */\n z-index: 1080;\n }\n}\n","/**\n * ModalContent styles\n *\n * Every rule is nested inside `.root` — the marker class on the outer\n * wrapper `View`, which carries no declarations of its own. Both elements are\n * `View`s, and these rules override properties `View` sets in its own\n * single-class rule in the same `@layer shared` (`display`, `padding`,\n * `min-block-size`). The bundle loads this package's CSS before core's, so\n * the compound selector makes the result depend on specificity instead.\n *\n * The small-screen overrides for elements a consumer can style live in\n * `util/small-screen-styles.ts` as plain style objects, not here: the\n * consumer's `style` goes through Aphrodite (unlayered and `!important`), so a\n * rule in `@layer shared` would lose to it even inside a media query. That\n * covers `.content`'s small-screen rules.\n * `.wrapperSmallHeight` stays here because consumers can't style the outer\n * wrapper; it only carries a media query (`max-height: 500px`) and is applied\n * unless `applySmallHeightStyles` is false (`FlexibleDialog` /\n * `DrawerDialog`). The build wraps every rule in `@layer shared { … }`.\n *\n * TODO [WB-2137]: standardize media query breakpoint tokens\n */\n\n.root {\n &.wrapper {\n flex: 1;\n\n /* This helps to ensure that the paddingBottom is preserved when the\n * contents start to overflow, this goes away on display: flex */\n display: block;\n }\n\n &.scrollOverflow {\n overflow: auto;\n }\n\n & .content {\n flex: 1;\n min-block-size: 100%;\n padding: var(--wb-c-modal-panel-layout-gap-default);\n box-sizing: border-box;\n }\n\n @media screen and (height <= 500px) {\n &.wrapperSmallHeight {\n flex: unset;\n min-block-size: unset;\n overflow: unset;\n }\n }\n}\n","/**\n * ModalPanel styles\n *\n * Every rule is nested inside `.root` — the marker class on the panel's\n * `View`, which carries no declarations of its own. The panel overrides\n * properties `View` sets (`flex-direction`), and the close button overrides\n * `IconButton`'s own rules; both packages ship single-class rules in the same\n * `@layer shared`, and the bundle loads this package's CSS before theirs, so\n * the compound selector makes the result depend on specificity instead of\n * load order.\n *\n * The close button's `:focus` ring (0,3,0) outranks every `IconButton` state\n * rule (`.button:hover` / `:active`, (0,2,0)), so it shows whenever the\n * button is focused, as the unlayered Aphrodite rule did.\n *\n * `.hasFooter` is passed into `ModalContent`'s `style`, so it lands on the\n * same element as `ModalContent`'s `.content` (0,2,0). Nesting it under\n * `.root.wrapper` (0,3,0) makes it win regardless of load order.\n *\n * The consumer's `style` still goes through Aphrodite (unlayered and\n * `!important`), so it wins over this module. The wrapper's small-height\n * `overflow` rule lives in `util/small-screen-styles.ts` so it keeps beating\n * the consumer's base `overflow`. The build wraps every rule in\n * `@layer shared { … }`.\n *\n * TODO [WB-2137]: standardize media query breakpoint tokens\n */\n\n@import \"@khanacademy/wonder-blocks-styles/focus-styles.css\";\n\n.root {\n &.wrapper {\n flex: 1 1 auto;\n flex-direction: column;\n background: var(--wb-semanticColor-core-background-base-default);\n box-sizing: border-box;\n overflow: hidden;\n block-size: 100%;\n inline-size: 100%;\n\n /* The space between the content and the footer */\n & .hasFooter {\n padding-block-end: var(--wb-c-modal-panel-layout-gap-default);\n }\n }\n\n & .closeButton {\n position: absolute;\n\n /* insetInlineEnd supports both RTL and LTR layouts */\n inset-inline-end: var(--wb-c-modal-closeButton-layout-gapRight);\n inset-block-start: var(--wb-c-modal-closeButton-layout-gapTop);\n\n /* This is to allow the button to be tab-ordered before the modal\n * content but still be above the header and content. */\n z-index: 1;\n\n /* NOTE: IconButton uses :focus-visible, which is not supported for\n * programmatic focus. This is a workaround to make sure the focus\n * outline is visible when this control is focused. */\n &:focus {\n @apply --wb-focus-visible;\n }\n }\n}\n","/*\n * Cross-package focus-visible mixin.\n *\n * Authors include the mixin via:\n *\n * @import \"@khanacademy/wonder-blocks-styles/focus-styles.css\";\n *\n * .my-component:focus-visible {\n * @apply --wb-focus-visible;\n * }\n *\n * postcss-import resolves the @import through the workspace and\n * @csstools/postcss-mixins expands the @apply at build time\n * (CSS Mixins Level 1 syntax — note the leading `--` on the name).\n */\n@mixin --wb-focus-visible() {\n box-shadow: 0 0 0 var(--wb-border-width-medium)\n var(--wb-semanticColor-focus-inner);\n outline: var(--wb-border-width-medium) solid\n var(--wb-semanticColor-focus-outer);\n outline-offset: var(--wb-border-width-medium);\n}\n","/**\n * OnePaneDialog styles\n *\n * `OnePaneDialog` passes `.onePaneDialog` into `ModalDialog`'s `style`, which\n * lands on the same element as `ModalDialog`'s `.wrapper`. That rule assigns\n * its full-size defaults (`inline-size` / `block-size: 100%`) inside\n * `:where()`, which has zero specificity, so this single-class rule wins\n * regardless of stylesheet load order. `View` sets none of these properties.\n *\n * The small-screen overrides live in `util/small-screen-styles.ts` as plain\n * style objects, so they keep beating the consumer's `style` (Aphrodite,\n * unlayered and `!important`). The build wraps every rule in\n * `@layer shared { … }`.\n */\n\n.onePaneDialog {\n max-inline-size: 576px;\n inline-size: 93.75%;\n block-size: 81.25%;\n max-block-size: 624px;\n}\n","/**\n * FlexiblePanel styles\n *\n * Every rule is nested inside `.root` — the marker class on the panel's\n * `View`, which carries no declarations of its own. The panel overrides\n * properties `View` sets (`flex-direction`), and the close button overrides\n * `IconButton`'s own rules; both packages ship single-class rules in the same\n * `@layer shared`, and the bundle loads this package's CSS before theirs, so\n * the compound selector makes the result depend on specificity instead of\n * load order.\n *\n * The close button's `:focus` ring (0,3,0) outranks every `IconButton` state\n * rule (`.button:hover` / `:active`, (0,2,0)), so it shows whenever the\n * button is focused, as the unlayered Aphrodite rule did.\n *\n * The default background and the consumer's `styles.panel` /\n * `styles.closeButton` still go through Aphrodite (unlayered and\n * `!important`), so they win over this module. The build wraps every rule in\n * `@layer shared { … }`.\n */\n\n@import \"@khanacademy/wonder-blocks-styles/focus-styles.css\";\n\n.root {\n &.wrapper {\n flex: 1 1 auto;\n flex-direction: column;\n box-sizing: border-box;\n overflow: hidden;\n block-size: 100%;\n inline-size: 100%;\n }\n\n & .closeButton {\n position: absolute;\n\n /* insetInlineEnd supports both RTL and LTR layouts */\n inset-inline-end: var(--wb-c-modal-closeButton-layout-gapRight);\n inset-block-start: var(--wb-c-modal-closeButton-layout-gapTop);\n\n /* This is to allow the button to be tab-ordered before the modal\n * content but still be above the header and content. */\n z-index: 1;\n\n /* NOTE: IconButton uses :focus-visible, which is not supported for\n * programmatic focus. This is a workaround to make sure the focus\n * outline is visible when this control is focused. */\n &:focus {\n @apply --wb-focus-visible;\n }\n }\n}\n","/**\n * FlexibleDialog styles\n *\n * The root rule is nested inside `.root` — the marker class on the dialog's\n * outer `View`, which carries no declarations of its own. It overrides a\n * property `View` sets in its own single-class rule in the same\n * `@layer shared` (`position`), and the bundle loads this package's CSS\n * before core's, so the compound selector makes the result depend on\n * specificity instead of load order.\n *\n * The default sizes are assigned inside `:where()`, which has zero\n * specificity, so `DrawerDialog`'s own module (passed through `styles.root`)\n * overrides them regardless of load order. `View` sets none of them.\n *\n * The consumer's `styles.*` are Aphrodite styles, which `processStyleList`\n * merges after every class here (unlayered and `!important`), so they win\n * over this module as they did before. The build wraps every rule in\n * `@layer shared { … }`.\n */\n\n.root {\n &.flexibleRoot {\n box-shadow: var(--wb-c-modal-dialog-shadow-default);\n\n /* Allows propagating the text color to all the children. */\n color: var(--wb-semanticColor-core-foreground-neutral-strong);\n overflow: auto; /* Prevent dialog from scrolling with background */\n position: relative;\n will-change: transform, opacity;\n }\n}\n\n/* Default widths/heights for FlexibleDialog alone */\n:where(.flexibleRoot) {\n block-size: auto;\n max-block-size: 100vh;\n max-inline-size: 576px;\n inline-size: 93.75%;\n}\n","/**\n * DrawerBackdrop styles\n *\n * The positioner is a `View`, and these rules override properties `View`\n * sets in its own single-class rule in the same `@layer shared` (`position`,\n * `align-items`). The bundle loads this package's CSS before core's, so the\n * rules are nested under the `.root` marker class to win on specificity\n * rather than load order.\n *\n * The fade classes are only applied when `animated` is true. The durations\n * mirror `DRAWER_ENTER_DURATION_MS` / `DRAWER_EXIT_DURATION_MS` in\n * `util/drawer-animation.ts`; a `timingDuration` override and the consumer's\n * `style` are plain style objects that still go through Aphrodite (unlayered\n * and `!important`), so they win over this module. The build wraps every\n * rule in `@layer shared { … }`.\n */\n\n.root {\n &.drawerPositioner {\n position: fixed;\n inset-inline-start: 0;\n inset-block-start: 0;\n inline-size: 100%;\n block-size: 100%;\n display: flex;\n overflow: hidden;\n background: var(--wb-semanticColor-core-background-overlay-default);\n }\n\n &.inlineStart {\n align-items: flex-start;\n justify-content: flex-start;\n }\n\n &.inlineEnd {\n align-items: flex-end;\n justify-content: flex-start;\n }\n\n &.blockEnd {\n align-items: center;\n justify-content: flex-end;\n }\n\n /* The backdrop's fade. Shares the panel's durations by default, so the\n * two finish together. */\n &.fadeIn {\n animation-name: backdrop-fade-in;\n animation-duration: 300ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n }\n\n &.fadeOut {\n animation-name: backdrop-fade-out;\n animation-duration: 150ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n }\n}\n\n@keyframes backdrop-fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes backdrop-fade-out {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n}\n","/**\n * DrawerDialog styles\n *\n * Every rule is nested inside `.root` — the marker class `DrawerDialog`\n * passes into `FlexibleDialog`'s `styles.root`, which carries no declarations\n * of its own. The root and dialog rules override properties `View` sets in\n * its own single-class rule in the same `@layer shared` (`min-block-size`,\n * `min-inline-size`); the bundle loads this package's CSS before core's, so\n * the compound selector makes the result depend on specificity instead of\n * load order.\n *\n * `FlexibleDialog` assigns its default sizes inside `:where()` (zero\n * specificity), so these rules override them regardless of load order.\n * Within this file, source order reproduces the old Aphrodite merge:\n * `.drawerRoot` → `.blockEnd`.\n *\n * The drawer's small-screen rules (`breakpoint.mediaQuery.smOrSmaller`) live\n * in `util/small-screen-styles.ts`, because the consumer's `styles.root`\n * would otherwise beat them. The slide/fade animation and the consumer's\n * `styles.*` are plain style objects / Aphrodite styles, which\n * `processStyleList` merges after every class here (unlayered and\n * `!important`), so they win over this module as they did before. The build\n * wraps every rule in `@layer shared { … }`.\n */\n\n.root {\n &.drawerRoot {\n /* Override FlexibleDialog defaults for drawer usage */\n block-size: 100%;\n min-block-size: 100vh;\n\n /* Use common widths for mininum/maximum */\n min-inline-size: var(--wb-breakpoint-width-xsMax);\n max-inline-size: var(--wb-breakpoint-width-smMax);\n inline-size: 100%;\n }\n\n &.blockEnd {\n block-size: auto;\n min-block-size: unset;\n max-inline-size: unset;\n }\n\n /* Override the minBlockSize and minInlineSize on View, and allow blockEnd\n * content to provide its own height. */\n & .dialogDefault {\n min-block-size: 100vh;\n min-inline-size: unset;\n }\n\n & .dialogBlockEnd {\n min-block-size: unset;\n min-inline-size: unset;\n }\n}\n"]}