|
25 | 25 |
|
26 | 26 | /* Max-height size tokens (mirror Overlay sizes) */ |
27 | 27 | &:where([data-max-height-xsmall]) { |
28 | | - max-height: 192px; |
29 | | - } |
| 28 | + max-height: min(192px, 100vh); |
30 | 29 |
|
31 | | - &:where([data-max-height-small]) { |
32 | | - max-height: 256px; |
| 30 | + @supports (height: 100dvh) { |
| 31 | + max-height: min(192px, 100dvh); |
| 32 | + } |
33 | 33 | } |
34 | 34 |
|
35 | | - &:where([data-max-height-medium]) { |
36 | | - max-height: 320px; |
37 | | - } |
| 35 | + &:where([data-max-height-small]) { |
| 36 | + max-height: min(256px, 100vh); |
38 | 37 |
|
39 | | - &:where([data-max-height-large]) { |
40 | | - max-height: 432px; |
| 38 | + @supports (height: 100dvh) { |
| 39 | + max-height: min(256px, 100dvh); |
| 40 | + } |
41 | 41 | } |
42 | 42 |
|
43 | | - &:where([data-max-height-xlarge]) { |
44 | | - max-height: 600px; |
45 | | - } |
| 43 | + &:where([data-max-height-medium]) { |
| 44 | + max-height: min(320px, 100vh); |
46 | 45 |
|
47 | | - /* Max-height size tokens clamped to viewport (enabled via feature flag) */ |
48 | | - &:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]) { |
49 | | - max-height: min(192px, 100dvh); |
| 46 | + @supports (height: 100dvh) { |
| 47 | + max-height: min(320px, 100dvh); |
| 48 | + } |
50 | 49 | } |
51 | 50 |
|
52 | | - &:where([data-max-height-clamp-to-viewport][data-max-height-small]) { |
53 | | - max-height: min(256px, 100dvh); |
54 | | - } |
| 51 | + &:where([data-max-height-large]) { |
| 52 | + max-height: min(432px, 100vh); |
55 | 53 |
|
56 | | - &:where([data-max-height-clamp-to-viewport][data-max-height-medium]) { |
57 | | - max-height: min(320px, 100dvh); |
| 54 | + @supports (height: 100dvh) { |
| 55 | + max-height: min(432px, 100dvh); |
| 56 | + } |
58 | 57 | } |
59 | 58 |
|
60 | | - &:where([data-max-height-clamp-to-viewport][data-max-height-large]) { |
61 | | - max-height: min(432px, 100dvh); |
62 | | - } |
| 59 | + &:where([data-max-height-xlarge]) { |
| 60 | + max-height: min(600px, 100vh); |
63 | 61 |
|
64 | | - &:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]) { |
65 | | - max-height: min(600px, 100dvh); |
| 62 | + @supports (height: 100dvh) { |
| 63 | + max-height: min(600px, 100dvh); |
| 64 | + } |
66 | 65 | } |
67 | 66 |
|
68 | 67 | &:where([data-max-height-fit-content]) { |
|
0 commit comments