@plexui/styles 0.3.1 → 0.3.3
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.
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
sits on `::before`: on the bar itself a blur would hold the bar's children inside its own backdrop.
|
|
125
125
|
The first column keeps the place of a sidebar's menu button. */@media (max-width: 767.98px) {
|
|
126
126
|
.Page {
|
|
127
|
-
--page-top: var(--page-toolbar-height, var(--page-header-height, calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--page-bar-height-phone) + 10px)));
|
|
127
|
+
--page-top: var(--page-toolbar-height, var(--page-header-height, calc(max(var(--page-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) + var(--page-bar-height-phone) + 10px)));
|
|
128
128
|
--page-bottom: var(--page-toolbar-bottom-height, var(--page-footer-height, 0px));
|
|
129
129
|
--mobile-surface-primary: var(--mobile-surface-plain-primary, var(--color-surface));
|
|
130
130
|
--mobile-surface-secondary: var(--mobile-surface-plain-secondary, var(--color-background-secondary-soft-alpha));
|
|
@@ -163,7 +163,8 @@
|
|
|
163
163
|
position: absolute;
|
|
164
164
|
z-index: 5;
|
|
165
165
|
inset: 0 0 auto;
|
|
166
|
-
|
|
166
|
+
/* Under the status bar, or the gutter from the window's top without one, as a top Toolbar */
|
|
167
|
+
padding-block: max(var(--page-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 10px;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
/* Soft: the canvas covers content under the bar and fades out past it, as the soft edge of a top
|
|
@@ -423,7 +424,7 @@
|
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
426
|
:where([data-plex-layout="phone"]) .Page {
|
|
426
|
-
--page-top: var(--page-toolbar-height, var(--page-header-height, calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--page-bar-height-phone) + 10px)));
|
|
427
|
+
--page-top: var(--page-toolbar-height, var(--page-header-height, calc(max(var(--page-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) + var(--page-bar-height-phone) + 10px)));
|
|
427
428
|
--page-bottom: var(--page-toolbar-bottom-height, var(--page-footer-height, 0px));
|
|
428
429
|
--mobile-surface-primary: var(--mobile-surface-plain-primary, var(--color-surface));
|
|
429
430
|
--mobile-surface-secondary: var(--mobile-surface-plain-secondary, var(--color-background-secondary-soft-alpha));
|
|
@@ -462,7 +463,8 @@
|
|
|
462
463
|
position: absolute;
|
|
463
464
|
z-index: 5;
|
|
464
465
|
inset: 0 0 auto;
|
|
465
|
-
|
|
466
|
+
/* Under the status bar, or the gutter from the window's top without one, as a top Toolbar */
|
|
467
|
+
padding-block: max(var(--page-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px))) 10px;
|
|
466
468
|
}
|
|
467
469
|
|
|
468
470
|
/* Soft: the canvas covers content under the bar and fades out past it, as the soft edge of a top
|
|
@@ -97,10 +97,17 @@
|
|
|
97
97
|
.ActionButton:hover:where(:not(:root[data-input="touch"] *)) {
|
|
98
98
|
background: var(--color-background-primary-solid-hover) !important;
|
|
99
99
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
100
|
+
}/* A soft secondary Button: the kit's quiet companion of a solid action */.CancelButton {
|
|
101
|
+
background: var(--color-background-secondary-soft-alpha) !important;
|
|
102
|
+
color: var(--color-text-secondary-soft) !important;
|
|
102
103
|
font-weight: var(--font-weight-medium);
|
|
103
|
-
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media (hover: hover) and (pointer: fine) {
|
|
107
|
+
.CancelButton:hover:where(:not(:root[data-input="touch"] *)) {
|
|
108
|
+
background: var(--color-background-secondary-soft-alpha-hover) !important;
|
|
109
|
+
}
|
|
110
|
+
}/* The close face: 20 across at the toast's trailing end (below), its X in the text color and a
|
|
104
111
|
ring an outline Button draws, which shows on the dark surface too (Sonner's
|
|
105
112
|
dark ring takes --normal-border, transparent here). An invisible 4px rim
|
|
106
113
|
around its 18px inner box makes the target 26, past the 24 of WCAG 2.5.8.
|
|
@@ -135,6 +142,155 @@
|
|
|
135
142
|
}.Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
|
|
136
143
|
right: auto !important;
|
|
137
144
|
left: 12px !important;
|
|
145
|
+
}/* =============================================
|
|
146
|
+
Desktop: one row, or the buttons under a description
|
|
147
|
+
============================================= *//* On a desktop a toast sets its message and its controls as one row of the kit (owner 13.11: «собрано по уродски»:
|
|
148
|
+
the buttons stood 8px from the text and 16 apart, and the close button was a ringed circle of another family). The
|
|
149
|
+
controls stand 16 after the message and 8 apart, a group set off from the text, all one small kit Button: 28px,
|
|
150
|
+
6px corners, a 14px medium label; the action solid, the cancel soft, the close button the same 28px button, plain
|
|
151
|
+
(ghost), last in the row. A description makes the message a block of its own: its buttons go under it at the end,
|
|
152
|
+
12 below, as Material's snackbar and Geist's toast set a longer message, and the close button stays on the title's
|
|
153
|
+
line. The row starts 16 before the message and ends 10 after the last control, whose own padding (or glyph) keeps
|
|
154
|
+
its ink as far from the edge; with nothing after the message it ends 16 after it too. */@media (min-width: 768px) and (pointer: fine) {
|
|
155
|
+
.Toast[data-styled="true"]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
156
|
+
--toast-control-size: var(--control-size-sm);
|
|
157
|
+
--toast-icon-room: 0px;
|
|
158
|
+
--toast-close-room: 0px;
|
|
159
|
+
align-items: center;
|
|
160
|
+
gap: 0 !important;
|
|
161
|
+
padding: 10px 10px 10px 16px !important;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.Toast[data-styled="true"]:has(> .Icon):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
165
|
+
--toast-icon-room: 30px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.Toast[data-styled="true"]:has(> [data-close-button]):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
169
|
+
--toast-close-room: calc(var(--toast-control-size) + 8px);
|
|
170
|
+
padding-inline-end: 10px !important;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.Toast[data-styled="true"]:not(:has(> .Content ~ *, > [data-close-button])):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
174
|
+
padding-inline-end: 16px !important;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* The icon, the message, its buttons, then the close button (Sonner puts the close button first) */
|
|
178
|
+
.Toast[data-styled="true"] > .Icon:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
179
|
+
order: 1;
|
|
180
|
+
width: 20px !important;
|
|
181
|
+
height: 20px !important;
|
|
182
|
+
margin-inline: 0 10px !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.Toast[data-styled="true"] > .Content:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
186
|
+
order: 2;
|
|
187
|
+
flex: 1 1 auto;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
min-width: 0;
|
|
190
|
+
/* A line of text alone is as tall as a row of buttons */
|
|
191
|
+
min-height: var(--toast-control-size);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.Toast[data-styled="true"] > .Content ~ *:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
195
|
+
order: 3;
|
|
196
|
+
margin-inline: 8px 0 !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.Toast[data-styled="true"] > .Content + *:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
200
|
+
margin-inline-start: 16px !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.Toast[data-styled="true"] > :is(.ActionButton, .CancelButton):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
204
|
+
height: var(--toast-control-size) !important;
|
|
205
|
+
padding: 0 var(--control-gutter-sm) !important;
|
|
206
|
+
border-radius: var(--control-radius-sm) !important;
|
|
207
|
+
font-size: var(--control-font-size-md) !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.Toast[data-styled="true"] > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
211
|
+
position: relative !important;
|
|
212
|
+
top: auto !important;
|
|
213
|
+
right: auto !important;
|
|
214
|
+
bottom: auto !important;
|
|
215
|
+
left: auto !important;
|
|
216
|
+
flex: none;
|
|
217
|
+
order: 4;
|
|
218
|
+
width: var(--toast-control-size) !important;
|
|
219
|
+
height: var(--toast-control-size) !important;
|
|
220
|
+
margin-inline-start: 16px;
|
|
221
|
+
border: 0 !important;
|
|
222
|
+
border-radius: var(--control-radius-sm) !important;
|
|
223
|
+
transform: none !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.Toast[data-styled="true"] > [data-close-button] > svg:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
227
|
+
width: 16px;
|
|
228
|
+
height: 16px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* The 28px button is the target */
|
|
232
|
+
.Toast[data-styled="true"] > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *))::after {
|
|
233
|
+
content: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* The right-to-left offset above would shift the button out of its place in the row */
|
|
237
|
+
.Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
238
|
+
left: auto !important;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.Toast[data-styled="true"]:has(> .Content ~ *) > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
242
|
+
margin-inline-start: 8px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
246
|
+
background: transparent !important;
|
|
247
|
+
color: var(--color-text-secondary-ghost) !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@media (hover: hover) {
|
|
251
|
+
.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button]:hover:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
252
|
+
background: var(--color-background-secondary-ghost-hover) !important;
|
|
253
|
+
color: var(--color-text-secondary-ghost-hover) !important;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.Toast[data-styled="true"]:not([data-rich-colors="true"]) > [data-close-button]:active:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
258
|
+
background: var(--color-background-secondary-ghost-active) !important;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* With a description: the icon, the message and the close button on the first row, the title's line their middle;
|
|
262
|
+
the buttons under the message at the end */
|
|
263
|
+
.Toast[data-styled="true"]:has(> .Content > .Description):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
264
|
+
/* Sonner's unlayered stylesheet centres the row. Only here does the row wrap: a long title alone wraps in its
|
|
265
|
+
own column, beside its icon and its buttons */
|
|
266
|
+
flex-wrap: wrap;
|
|
267
|
+
align-items: flex-start !important;
|
|
268
|
+
row-gap: 12px !important;
|
|
269
|
+
padding-block: 14px 12px !important;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.Toast[data-styled="true"]:has(> .Content > .Description) > .Content:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
273
|
+
flex: 1 1 0;
|
|
274
|
+
min-width: calc(100% - var(--toast-icon-room) - var(--toast-close-room));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.Toast[data-styled="true"]:has(> .Content > .Description) > [data-close-button]:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
278
|
+
order: 3;
|
|
279
|
+
margin-block-start: -4px;
|
|
280
|
+
margin-inline-start: 8px;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.Toast[data-styled="true"]:has(> .Content > .Description) > .Content ~ *:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
284
|
+
order: 4;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.Toast[data-styled="true"]:has(> .Content > .Description) > .Content + *:not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
288
|
+
margin-inline-start: auto !important;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.Toast[data-styled="true"]:has(> .Content > .Description):not(:has(> .Content ~ *)):not(:where([data-plex-layout="phone"], [data-plex-layout="phone"] *)) {
|
|
292
|
+
padding-block-end: 14px !important;
|
|
293
|
+
}
|
|
138
294
|
}.Toast :is([data-button], [data-close-button]):disabled {
|
|
139
295
|
cursor: not-allowed;
|
|
140
296
|
opacity: 0.5;
|
|
@@ -232,14 +388,14 @@
|
|
|
232
388
|
transform: none !important;
|
|
233
389
|
}
|
|
234
390
|
|
|
391
|
+
/* The face is filled as the cancel button is, a soft secondary circle, as iOS draws a close button
|
|
392
|
+
(xmark in a filled circle), not a ring of another family (owner 13.11) */
|
|
235
393
|
.Toast[data-styled="true"] > [data-close-button]::before {
|
|
236
394
|
position: absolute;
|
|
237
395
|
z-index: -1;
|
|
238
396
|
inset: 12px;
|
|
239
|
-
box-sizing: border-box;
|
|
240
|
-
border: 1px solid var(--color-border-secondary-outline);
|
|
241
397
|
border-radius: 50%;
|
|
242
|
-
background: var(--
|
|
398
|
+
background: var(--color-background-secondary-soft-alpha);
|
|
243
399
|
content: "";
|
|
244
400
|
pointer-events: none;
|
|
245
401
|
}
|
|
@@ -251,7 +407,7 @@
|
|
|
251
407
|
|
|
252
408
|
/* Only the face answers a hover: the whole target stays clear */
|
|
253
409
|
.Toast[data-styled="true"] > [data-close-button]:hover::before {
|
|
254
|
-
|
|
410
|
+
background: var(--color-background-secondary-soft-alpha-hover);
|
|
255
411
|
}
|
|
256
412
|
|
|
257
413
|
.Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
|
|
@@ -317,14 +473,14 @@
|
|
|
317
473
|
transform: none !important;
|
|
318
474
|
}
|
|
319
475
|
|
|
476
|
+
/* The face is filled as the cancel button is, a soft secondary circle, as iOS draws a close button
|
|
477
|
+
(xmark in a filled circle), not a ring of another family (owner 13.11) */
|
|
320
478
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]::before {
|
|
321
479
|
position: absolute;
|
|
322
480
|
z-index: -1;
|
|
323
481
|
inset: 12px;
|
|
324
|
-
box-sizing: border-box;
|
|
325
|
-
border: 1px solid var(--color-border-secondary-outline);
|
|
326
482
|
border-radius: 50%;
|
|
327
|
-
background: var(--
|
|
483
|
+
background: var(--color-background-secondary-soft-alpha);
|
|
328
484
|
content: "";
|
|
329
485
|
pointer-events: none;
|
|
330
486
|
}
|
|
@@ -336,7 +492,7 @@
|
|
|
336
492
|
|
|
337
493
|
/* Only the face answers a hover: the whole target stays clear */
|
|
338
494
|
:where([data-plex-layout="phone"]) .Toast[data-styled="true"] > [data-close-button]:hover::before {
|
|
339
|
-
|
|
495
|
+
background: var(--color-background-secondary-soft-alpha-hover);
|
|
340
496
|
}
|
|
341
497
|
|
|
342
498
|
:where([data-plex-layout="phone"]) .Toaster[dir="rtl"] .Toast[data-styled="true"] > [data-close-button] {
|
|
@@ -521,12 +521,14 @@
|
|
|
521
521
|
line-height: var(--toolbar-medium-title-line-height);
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
/* Hosts: a Page puts the top bar over its content under the status bar, a Sheet 16 below its top edge.
|
|
524
|
+
/* Hosts: a Page puts the top bar over its content under the status bar, a Sheet 16 below its top edge. Without a
|
|
525
|
+
status bar (a page in a browser, where the top inset is 0) the row keeps the gutter from the window's top, as
|
|
526
|
+
its sides do and as a bottom bar keeps from the bottom (owner 13.11: the buttons touched the top). iOS 27.2
|
|
525
527
|
sets a sheet's row of controls there, its centre 38 below the edge, and draws no grabber over it: a grabber
|
|
526
528
|
(60 by 4, 6 down) shows only on a sheet that changes height (prefersGrabberVisible, measures/sheets.md), and a
|
|
527
529
|
PlexUI Sheet keeps one height. */
|
|
528
530
|
.Toolbar[data-host="page"][data-placement="top"] {
|
|
529
|
-
--toolbar-padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
|
531
|
+
--toolbar-padding-top: max(var(--toolbar-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
|
|
530
532
|
position: absolute;
|
|
531
533
|
inset: 0 0 auto;
|
|
532
534
|
}
|
|
@@ -643,7 +645,7 @@
|
|
|
643
645
|
}
|
|
644
646
|
|
|
645
647
|
:where([data-mobile-placement="fullscreen"]) .Toolbar[data-host="dialog"][data-placement="top"] {
|
|
646
|
-
--toolbar-padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
|
648
|
+
--toolbar-padding-top: max(var(--toolbar-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
|
|
647
649
|
}
|
|
648
650
|
|
|
649
651
|
.Toolbar[data-host="dialog"][data-placement="bottom"] {
|
|
@@ -1167,12 +1169,14 @@
|
|
|
1167
1169
|
line-height: var(--toolbar-medium-title-line-height);
|
|
1168
1170
|
}
|
|
1169
1171
|
|
|
1170
|
-
/* Hosts: a Page puts the top bar over its content under the status bar, a Sheet 16 below its top edge.
|
|
1172
|
+
/* Hosts: a Page puts the top bar over its content under the status bar, a Sheet 16 below its top edge. Without a
|
|
1173
|
+
status bar (a page in a browser, where the top inset is 0) the row keeps the gutter from the window's top, as
|
|
1174
|
+
its sides do and as a bottom bar keeps from the bottom (owner 13.11: the buttons touched the top). iOS 27.2
|
|
1171
1175
|
sets a sheet's row of controls there, its centre 38 below the edge, and draws no grabber over it: a grabber
|
|
1172
1176
|
(60 by 4, 6 down) shows only on a sheet that changes height (prefersGrabberVisible, measures/sheets.md), and a
|
|
1173
1177
|
PlexUI Sheet keeps one height. */
|
|
1174
1178
|
:where([data-plex-layout="phone"]) .Toolbar[data-host="page"][data-placement="top"] {
|
|
1175
|
-
--toolbar-padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
|
1179
|
+
--toolbar-padding-top: max(var(--toolbar-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
|
|
1176
1180
|
position: absolute;
|
|
1177
1181
|
inset: 0 0 auto;
|
|
1178
1182
|
}
|
|
@@ -1289,7 +1293,7 @@
|
|
|
1289
1293
|
}
|
|
1290
1294
|
|
|
1291
1295
|
:where([data-plex-layout="phone"]) :where([data-mobile-placement="fullscreen"]) .Toolbar[data-host="dialog"][data-placement="top"] {
|
|
1292
|
-
--toolbar-padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
|
|
1296
|
+
--toolbar-padding-top: max(var(--toolbar-gutter), var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
|
|
1293
1297
|
}
|
|
1294
1298
|
|
|
1295
1299
|
:where([data-plex-layout="phone"]) .Toolbar[data-host="dialog"][data-placement="bottom"] {
|