@vialiq/flux-ui 0.20.0 → 0.22.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.
package/README.md CHANGED
@@ -380,6 +380,28 @@ Works with any JavaScript framework:
380
380
  - ✅ Focus states built-in
381
381
  - ✅ Semantic HTML patterns
382
382
  - ✅ Reduced motion support ready
383
+ - ✅ Responsive `rem` scaling based on root font size
384
+
385
+ ### Responsive Typography & Rem Scaling
386
+ Flux UI strictly uses `rem` units for typography and spacing to ensure accessibility. By default, it assumes a standard browser root font size of `16px`.
387
+
388
+ If your application uses a custom root font size (such as the `62.5%` or `10px` hack), you must configure Flux UI to scale its internal calculations accordingly:
389
+
390
+ ```scss
391
+ // In your application's main SCSS file:
392
+ @use '@vialiq/flux-ui/styles' with (
393
+ $vi-rem-base: 10px
394
+ );
395
+ ```
396
+ This ensures that a component designed to be `16px` tall will correctly output `1.6rem`, rendering exactly 16 pixels at runtime against your custom 10px root.
397
+
398
+ ### CSS Unit Guidelines
399
+ To maintain a robust, scalable, and accessible UI, Flux UI strictly adheres to the following unit rules:
400
+
401
+ - **`rem`**: Used for **Typography**, **Spacing** (margin, padding, gap), and **Interactive Form Control Sizing** (button heights, input widths, etc.). This guarantees that everything defining the core layout grid and text hierarchy scales fluidly when a user changes their browser root font size for accessibility.
402
+ - **`px`**: Reserved exclusively for rigid geometries that must never scale or blur. Used for **Borders** (`1px solid`), **Shadows** (offsets and blurs), small **Optical Adjustments** (e.g. `2px` focus outline offset), and **Visually Hidden Hacks** (e.g. `1px` clipping for screen readers).
403
+ - **`dvh` / `dvw`** (with `vh` / `vw` fallback): Used for **Viewport-Relative Layouts**, such as full-screen modal overlays, drawer max-heights, or sticky banners that must span the entire screen regardless of the parent container size. Dynamic viewport units correctly account for mobile browser UI (like address bars) expanding and contracting.
404
+ - **`%`**: Used for **Container-Relative Fluidity**, such as a button being `width: 100%` of its parent column, or grid layouts.
383
405
 
384
406
  ## Contributing
385
407
 
@@ -8,8 +8,8 @@ $accordion-border-radius: var(--vi-accordion-border-radius, tokens.$border-radiu
8
8
  $accordion-gap: var(--vi-accordion-gap, 0px);
9
9
  $accordion-animation-duration: var(--vi-accordion-animation-duration, 200ms);
10
10
 
11
- $accordion-item-header-padding: var(--vi-accordion-item-header-padding, 14px 16px);
12
- $accordion-item-body-padding: var(--vi-accordion-item-body-padding, 0 16px 16px);
11
+ $accordion-item-header-padding: var(--vi-accordion-item-header-padding, #{tokens.$spacing-sm} #{tokens.$spacing-md});
12
+ $accordion-item-body-padding: var(--vi-accordion-item-body-padding, 0 #{tokens.$spacing-md} #{tokens.$spacing-md});
13
13
  $accordion-item-header-bg: var(--vi-accordion-item-header-bg, transparent);
14
14
  $accordion-item-header-bg-hover: var(--vi-accordion-item-header-bg-hover, tokens.$layer-hover-01);
15
15
  $accordion-item-header-bg-open: var(--vi-accordion-item-header-bg-open, transparent);
@@ -43,8 +43,8 @@ $accordion-item-chevron-color: var(--vi-accordion-item-chevron-color, tokens.$te
43
43
  padding: $accordion-item-header-padding;
44
44
  background-color: $accordion-item-header-bg;
45
45
  color: $accordion-item-label-color;
46
- font-family: tokens.$font-family-base;
47
- font-size: var(--vi-accordion-item-header-font-size, tokens.$font-size-base);
46
+ font-family: var(--vi-accordion-font-family, #{tokens.$font-family-base});
47
+ font-size: var(--vi-accordion-item-header-font-size, #{tokens.$font-size-base});
48
48
  font-weight: $accordion-item-label-font-weight;
49
49
  text-align: left;
50
50
  border: none;
@@ -91,8 +91,8 @@ $accordion-item-chevron-color: var(--vi-accordion-item-chevron-color, tokens.$te
91
91
  margin-inline-start: tokens.$spacing-xs;
92
92
 
93
93
  svg {
94
- width: 16px;
95
- height: 16px;
94
+ width: #{tokens.$spacing-md};
95
+ height: #{tokens.$spacing-md};
96
96
  fill: none;
97
97
  stroke: currentColor;
98
98
  stroke-width: 2;
@@ -112,9 +112,9 @@ $accordion-item-chevron-color: var(--vi-accordion-item-chevron-color, tokens.$te
112
112
 
113
113
  .accordion-panel-inner {
114
114
  padding: $accordion-item-body-padding;
115
- font-family: tokens.$font-family-base;
116
- font-size: tokens.$font-size-sm;
117
- color: tokens.$text-secondary;
115
+ font-family: var(--vi-accordion-font-family, #{tokens.$font-family-base});
116
+ font-size: #{tokens.$font-size-sm};
117
+ color: #{tokens.$text-secondary};
118
118
  box-sizing: border-box;
119
119
  }
120
120
 
@@ -168,8 +168,8 @@ $accordion-item-chevron-color: var(--vi-accordion-item-chevron-color, tokens.$te
168
168
 
169
169
  .accordion--sm,
170
170
  .accordion-item--sm {
171
- --vi-accordion-item-header-padding: 10px 12px;
172
- --vi-accordion-item-body-padding: 0 12px 12px;
171
+ --vi-accordion-item-header-padding: #{tokens.$spacing-xs} #{tokens.$spacing-sm};
172
+ --vi-accordion-item-body-padding: 0 #{tokens.$spacing-sm} #{tokens.$spacing-sm};
173
173
  --vi-accordion-item-header-font-size: #{tokens.$font-size-sm};
174
174
  }
175
175
 
@@ -182,8 +182,8 @@ $accordion-item-chevron-color: var(--vi-accordion-item-chevron-color, tokens.$te
182
182
 
183
183
  .accordion--lg,
184
184
  .accordion-item--lg {
185
- --vi-accordion-item-header-padding: 18px 20px;
186
- --vi-accordion-item-body-padding: 0 20px 20px;
185
+ --vi-accordion-item-header-padding: #{tokens.$spacing-lg} #{tokens.$spacing-xl};
186
+ --vi-accordion-item-body-padding: 0 #{tokens.$spacing-xl} #{tokens.$spacing-xl};
187
187
  --vi-accordion-item-header-font-size: #{tokens.$font-size-lg};
188
188
  }
189
189
 
@@ -15,15 +15,15 @@
15
15
  box-sizing: border-box;
16
16
  width: 100%;
17
17
 
18
- border-radius: var(--vi-alert-border-radius, 6px);
19
- padding: var(--vi-alert-padding, 12px 16px);
20
- gap: var(--vi-alert-gap, 12px);
18
+ border-radius: var(--vi-alert-border-radius, #{tokens.$border-radius-lg});
19
+ padding: var(--vi-alert-padding, #{tokens.$spacing-xs} #{tokens.$spacing-md});
20
+ gap: var(--vi-alert-gap, #{tokens.$spacing-sm});
21
21
  border-width: var(--vi-alert-border-width, 1px);
22
22
  border-style: solid;
23
23
 
24
- font-family: tokens.$font-family-base;
25
- font-size: tokens.$font-size-sm;
26
- line-height: tokens.$line-height-normal;
24
+ font-family: var(--vi-alert-font-family, #{tokens.$font-family-base});
25
+ font-size: #{tokens.$font-size-sm};
26
+ line-height: #{tokens.$line-height-normal};
27
27
  }
28
28
 
29
29
  .alert-icon {
@@ -45,7 +45,7 @@
45
45
 
46
46
  .alert-title {
47
47
  font-weight: tokens.$font-weight-semibold;
48
- margin-bottom: 4px;
48
+ margin-bottom: #{tokens.$spacing-unit};
49
49
  display: block;
50
50
  }
51
51
 
@@ -25,7 +25,7 @@
25
25
  --vi-animation-easing-exit: cubic-bezier(0.4, 0, 1, 1);
26
26
  --vi-animation-easing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
27
27
 
28
- --vi-animation-expand-max-height: 100vh;
28
+ --vi-animation-expand-max-height: 100dvh;
29
29
  --vi-animation-expand-max-width: 100vw;
30
30
  }
31
31
 
@@ -186,11 +186,11 @@
186
186
  // Expand & Collapse Keyframes
187
187
  @keyframes vi-expand-vertical {
188
188
  from { max-height: 0; opacity: 0; }
189
- to { max-height: var(--vi-animation-expand-max-height, 100vh); opacity: 1; }
189
+ to { max-height: var(--vi-animation-expand-max-height, 100dvh); opacity: 1; }
190
190
  }
191
191
 
192
192
  @keyframes vi-collapse-vertical {
193
- from { max-height: var(--vi-animation-expand-max-height, 100vh); opacity: 1; }
193
+ from { max-height: var(--vi-animation-expand-max-height, 100dvh); opacity: 1; }
194
194
  to { max-height: 0; opacity: 0; }
195
195
  }
196
196
 
@@ -245,3 +245,8 @@
245
245
  0% { background-position: -200% 0; }
246
246
  100% { background-position: 200% 0; }
247
247
  }
248
+
249
+ @keyframes vi-pulse {
250
+ 0%, 100% { opacity: 1; }
251
+ 50% { opacity: 0.4; }
252
+ }
@@ -16,19 +16,21 @@
16
16
  white-space: nowrap;
17
17
  box-sizing: border-box;
18
18
 
19
- font-size: var(--vi-badge-font-size, 11px);
19
+ // 20px = standard badge height (not on the spacing scale); kept explicit
20
+ height: var(--vi-badge-height, 20px);
21
+ font-size: var(--vi-badge-font-size, #{tokens.$font-size-xs});
20
22
  font-weight: var(--vi-badge-font-weight, #{tokens.$font-weight-semibold});
21
- padding: var(--vi-badge-padding, 2px 8px);
22
- border-radius: var(--vi-badge-border-radius, 9999px);
23
- gap: var(--vi-badge-gap, 4px);
23
+ padding: var(--vi-badge-padding, 0 #{tokens.$spacing-xs});
24
+ border-radius: var(--vi-badge-border-radius, #{tokens.$border-radius-full});
25
+ gap: var(--vi-badge-gap, #{tokens.$spacing-unit});
24
26
 
25
27
  border: #{tokens.$border-width-thin} solid transparent;
26
28
  }
27
29
 
28
30
  .dot {
29
31
  display: inline-block;
30
- width: var(--vi-badge-dot-size, 8px);
31
- height: var(--vi-badge-dot-size, 8px);
32
+ width: var(--vi-badge-dot-size, #{tokens.$spacing-xs});
33
+ height: var(--vi-badge-dot-size, #{tokens.$spacing-xs});
32
34
  border-radius: 50%;
33
35
  background-color: currentColor;
34
36
  flex-shrink: 0;
@@ -0,0 +1,180 @@
1
+ @use '../styles/variables' as tokens;
2
+ @use '../styles/functions' as func;
3
+
4
+ @layer components {
5
+ :host {
6
+ display: block;
7
+ width: 100%;
8
+ }
9
+
10
+ .vi-card {
11
+ display: flex;
12
+ flex-direction: column;
13
+ position: relative;
14
+ box-sizing: border-box;
15
+ width: 100%;
16
+
17
+ background-color: var(--vi-card-bg, #{tokens.$layer-01});
18
+ border: #{tokens.$border-width-thin} solid var(--vi-card-border-color, #{tokens.$border-02});
19
+ border-radius: var(--vi-card-border-radius, #{tokens.$border-radius-lg});
20
+ color: var(--vi-card-color, #{tokens.$text-primary});
21
+ // Refined premium transitions
22
+ transition: box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
23
+ border-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
24
+ transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
25
+
26
+ // Subtle glassy inner highlight for 3D machined edge + faint ambient shadow
27
+ box-shadow: var(--vi-card-shadow, #{tokens.$shadow-sm}, #{tokens.$shadow-inner-light});
28
+
29
+ // Default padding (can be overridden by size classes)
30
+ --vi-card-padding: #{func.to-rem(24px)};
31
+ }
32
+
33
+ /* Size Overrides */
34
+ .vi-card--size-sm { --vi-card-padding: #{func.to-rem(12px)}; }
35
+ .vi-card--size-md { --vi-card-padding: #{func.to-rem(16px)}; }
36
+ .vi-card--size-lg { --vi-card-padding: #{func.to-rem(24px)}; }
37
+
38
+ .vi-card--hoverable:hover {
39
+ // Multi-layered diffuse shadow + maintaining the inner inset highlight
40
+ box-shadow: var(--vi-card-hover-shadow, #{tokens.$shadow-md}, #{tokens.$shadow-inner-light});
41
+ border-color: var(--vi-card-hover-border-color, #{tokens.$border-03});
42
+ // Physical lift micro-interaction
43
+ transform: translateY(-2px);
44
+ cursor: pointer;
45
+ }
46
+
47
+ // Subtle tactile press effect
48
+ .vi-card--hoverable:active {
49
+ transform: translateY(0) scale(0.995);
50
+ box-shadow: var(--vi-card-active-shadow, #{tokens.$shadow-sm}, #{tokens.$shadow-inner-light});
51
+ }
52
+
53
+ /* Structural Slots */
54
+
55
+ .vi-card-cover {
56
+ display: flex;
57
+ overflow: hidden;
58
+ border-top-left-radius: var(--vi-card-border-radius, #{tokens.$border-radius-lg});
59
+ border-top-right-radius: var(--vi-card-border-radius, #{tokens.$border-radius-lg});
60
+ margin-top: -1px;
61
+ margin-left: -1px;
62
+ margin-right: -1px;
63
+
64
+ ::slotted(*) {
65
+ width: 100%;
66
+ display: block;
67
+ object-fit: cover;
68
+ }
69
+ }
70
+ .vi-card-header {
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ padding: var(--vi-card-padding);
75
+ border-bottom: #{tokens.$border-width-thin} solid transparent;
76
+ }
77
+
78
+ .vi-card--bordered .vi-card-header {
79
+ border-bottom-color: var(--vi-card-border-color, #{tokens.$border-02});
80
+ }
81
+
82
+ .vi-card-title {
83
+ margin: 0;
84
+ font-family: #{tokens.$font-family-base};
85
+ font-weight: #{tokens.$font-weight-semibold};
86
+ /* Premium tracking for dense, modern typography */
87
+ letter-spacing: -0.01em;
88
+
89
+ /* Fluid typography fallback using vw instead of cqi */
90
+ font-size: var(--vi-card-title-font-size, clamp(#{func.to-rem(16px)}, #{func.to-rem(14px)} + 1vw, #{func.to-rem(20px)}));
91
+ line-height: #{tokens.$line-height-tight};
92
+ color: var(--vi-card-title-color, #{tokens.$text-primary});
93
+ }
94
+
95
+ .vi-card-extra {
96
+ display: flex;
97
+ align-items: center;
98
+ gap: #{func.to-rem(8px)};
99
+ }
100
+
101
+ .vi-card-body {
102
+ padding: var(--vi-card-padding);
103
+ flex: 1 1 auto;
104
+ font-size: var(--vi-card-body-font-size, #{tokens.$font-size-base});
105
+ line-height: #{tokens.$line-height-normal};
106
+ color: var(--vi-card-body-color, #{tokens.$text-secondary});
107
+ }
108
+
109
+ .vi-card-footer {
110
+ display: flex;
111
+ align-items: center;
112
+ padding: var(--vi-card-padding);
113
+ border-top: #{tokens.$border-width-thin} solid transparent;
114
+ }
115
+
116
+ .vi-card--bordered .vi-card-footer {
117
+ border-top-color: var(--vi-card-border-color, #{tokens.$border-02});
118
+ }
119
+
120
+ .vi-card-actions {
121
+ display: flex;
122
+ // Visually anchor actions with faint background
123
+ background: var(--vi-card-actions-bg, #{tokens.$layer-dimmed});
124
+ border-top: #{tokens.$border-width-thin} solid transparent;
125
+ }
126
+
127
+ .vi-card--bordered .vi-card-actions {
128
+ border-top-color: var(--vi-card-border-color, #{tokens.$border-02});
129
+ }
130
+
131
+ .vi-card-actions ::slotted(*) {
132
+ flex: 1;
133
+ display: flex;
134
+ justify-content: center;
135
+ align-items: center;
136
+ padding: #{func.to-rem(12px)} 0;
137
+ margin: 0;
138
+ border-right: #{tokens.$border-width-thin} solid transparent;
139
+ color: var(--vi-card-action-color, #{tokens.$text-secondary});
140
+ transition: color 0.3s ease;
141
+ cursor: pointer;
142
+ }
143
+
144
+ .vi-card--bordered .vi-card-actions ::slotted(*) {
145
+ border-right-color: var(--vi-card-border-color, #{tokens.$border-02});
146
+ }
147
+
148
+ .vi-card-actions ::slotted(*:hover) {
149
+ color: var(--vi-card-action-hover-color, #{tokens.$text-primary});
150
+ }
151
+
152
+ .vi-card-actions ::slotted(*:last-child) {
153
+ border-right: none;
154
+ }
155
+
156
+
157
+ .vi-card-skeleton {
158
+ display: flex;
159
+ gap: #{func.to-rem(16px)};
160
+ width: 100%;
161
+ }
162
+
163
+ .vi-card-skeleton-content {
164
+ display: flex;
165
+ flex-direction: column;
166
+ flex: 1 1 auto;
167
+ gap: #{func.to-rem(16px)};
168
+ }
169
+
170
+ .vi-card-skeleton-title {
171
+ width: 38%;
172
+ margin-top: #{func.to-rem(8px)};
173
+ margin-bottom: #{func.to-rem(4px)};
174
+ }
175
+
176
+ .vi-card-skeleton-short {
177
+ width: 61%;
178
+ }
179
+
180
+ }
@@ -7,12 +7,13 @@
7
7
  */
8
8
 
9
9
  @use '../styles/variables' as tokens;
10
+ @use '../styles/functions' as func;
10
11
 
11
12
  @layer components {
12
13
  .checkbox-wrapper {
13
14
  display: inline-flex;
14
15
  align-items: flex-start;
15
- gap: var(--vi-checkbox-label-gap, 8px);
16
+ gap: var(--vi-checkbox-label-gap, #{tokens.$spacing-xs});
16
17
  cursor: pointer;
17
18
  font-family: #{tokens.$font-family-base};
18
19
  font-size: var(--vi-checkbox-label-font-size, #{tokens.$font-size-base});
@@ -41,10 +42,10 @@
41
42
  display: inline-flex;
42
43
  align-items: center;
43
44
  justify-content: center;
44
- width: var(--vi-checkbox-size, 18px);
45
- height: var(--vi-checkbox-size, 18px);
45
+ width: var(--vi-checkbox-size, #{tokens.$spacing-md});
46
+ height: var(--vi-checkbox-size, #{tokens.$spacing-md});
46
47
  border: #{tokens.$border-width-base} solid var(--vi-checkbox-border-color, #{tokens.$outline});
47
- border-radius: var(--vi-checkbox-border-radius, 3px);
48
+ border-radius: var(--vi-checkbox-border-radius, #{func.to-rem(4px)});
48
49
  background-color: var(--vi-checkbox-background-color, #{tokens.$color-background});
49
50
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
50
51
  flex-shrink: 0;
@@ -95,7 +96,7 @@
95
96
  .checkbox-input:focus-visible ~ .checkbox-box {
96
97
  outline: #{tokens.$border-width-base} solid var(--vi-checkbox-focus-ring-color, #{tokens.$focus});
97
98
  outline-offset: 2px;
98
- box-shadow: 0 0 0 3px var(--vi-checkbox-focus-ring-glow, #{tokens.$color-blue-200});
99
+ box-shadow: #{tokens.$focus-ring-shadow};
99
100
  }
100
101
 
101
102
  // Hover state (only on non-disabled)
@@ -12,13 +12,13 @@
12
12
  border-style: solid;
13
13
 
14
14
  // Tokens mapped directly from docs
15
- height: var(--vi-chip-height, var(--vi-chip-height-md, 32px));
15
+ height: var(--vi-chip-height, var(--vi-chip-height-md, #{tokens.$spacing-xl}));
16
16
  padding: var(--vi-chip-padding, 0 10px);
17
- border-radius: var(--vi-chip-border-radius, 999px);
17
+ border-radius: var(--vi-chip-border-radius, #{tokens.$border-radius-full});
18
18
  border-width: var(--vi-chip-border-width, 1px);
19
19
  gap: var(--vi-chip-gap, 6px);
20
- font-size: var(--vi-chip-font-size, var(--vi-font-size-sm));
21
- font-weight: var(--vi-chip-font-weight, var(--vi-font-weight-medium));
20
+ font-size: var(--vi-chip-font-size, #{tokens.$font-size-sm});
21
+ font-weight: var(--vi-chip-font-weight, #{tokens.$font-weight-medium});
22
22
  transition: all var(--vi-chip-transition, 100ms ease);
23
23
 
24
24
  // Color tokens to be overridden by vi-chip variant
@@ -31,7 +31,7 @@
31
31
  .chip:focus-visible {
32
32
  outline: #{tokens.$border-width-base} solid var(--vi-chip-focus-ring-color, #{tokens.$focus});
33
33
  outline-offset: 0;
34
- box-shadow: 0 0 0 3px var(--vi-chip-focus-ring-glow, #{tokens.$color-blue-200});
34
+ box-shadow: #{tokens.$focus-ring-shadow};
35
35
  }
36
36
 
37
37
  // Disabled state structure
@@ -52,7 +52,7 @@
52
52
  border-color: var(--vi-combobox-border-color-focus, #{tokens.$focus});
53
53
  outline: var(--vi-combobox-border-width-focus, #{tokens.$border-width-base}) solid var(--vi-combobox-focus-ring-color, #{tokens.$focus});
54
54
  outline-offset: 0;
55
- box-shadow: 0 0 0 3px var(--vi-combobox-focus-ring-glow, #{tokens.$color-blue-200});
55
+ box-shadow: #{tokens.$focus-ring-shadow};
56
56
  }
57
57
 
58
58
  &.is-disabled {
@@ -22,3 +22,5 @@
22
22
  @forward 'tabs';
23
23
  @forward 'tab';
24
24
  @forward 'tab-panel';
25
+ @forward 'spin';
26
+ @use './skeleton';
@@ -54,7 +54,7 @@
54
54
  &:focus {
55
55
  outline: #{tokens.$border-width-base} solid var(--vi-input-focus-ring-color, #{tokens.$focus});
56
56
  outline-offset: 0;
57
- box-shadow: 0 0 0 3px var(--vi-input-focus-ring-glow, #{tokens.$color-blue-200});
57
+ box-shadow: #{tokens.$focus-ring-shadow};
58
58
  }
59
59
 
60
60
  &::placeholder {
@@ -14,8 +14,8 @@
14
14
  --vi-label-required-color: var(--vi-color-error, #{tokens.$color-error});
15
15
  // --vi-label-optional-color: var(--vi-text-helper)
16
16
  --vi-label-optional-color: var(--vi-text-helper, #{tokens.$text-helper});
17
- // --vi-label-gap: 4px
18
- --vi-label-gap: 4px;
17
+ // --vi-label-gap: $spacing-unit (4px)
18
+ --vi-label-gap: #{tokens.$spacing-unit};
19
19
  }
20
20
 
21
21
  .vi-label {
@@ -25,7 +25,7 @@
25
25
  font-size: var(--vi-label-font-size);
26
26
  font-weight: var(--vi-label-font-weight);
27
27
  color: var(--vi-label-color);
28
- line-height: 1.5;
28
+ line-height: #{tokens.$line-height-normal};
29
29
  margin: 0;
30
30
 
31
31
  &.size-sm {
@@ -25,14 +25,15 @@
25
25
  margin: auto;
26
26
  width: 100%;
27
27
  max-width: tokens.$modal-max-width-md;
28
- max-height: 90vh; // Fallback max-height
28
+ max-height: 90vh;
29
+ max-height: 90dvh;
29
30
 
30
31
  z-index: tokens.$modal-z-index;
31
32
 
32
- font-family: tokens.$font-family-base;
33
- font-size: tokens.$font-size-base;
34
- line-height: tokens.$line-height-normal;
35
- color: tokens.$text-primary;
33
+ font-family: var(--vi-modal-font-family, #{tokens.$font-family-base});
34
+ font-size: var(--vi-modal-font-size, #{tokens.$font-size-base});
35
+ line-height: var(--vi-modal-line-height, #{tokens.$line-height-normal});
36
+ color: #{tokens.$text-primary};
36
37
 
37
38
  &[open] {
38
39
  display: flex;
@@ -230,6 +231,7 @@
230
231
  width: 100vw !important;
231
232
  width: 100dvw !important;
232
233
  max-height: 100vh !important;
234
+ max-height: 100dvh !important;
233
235
  height: 100vh !important;
234
236
  height: 100dvh !important;
235
237
  border-radius: 0 !important;