@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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/package.json +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +113 -89
- package/src/tag/tag.tokens.json +11 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/message/message.css
CHANGED
|
@@ -11,1443 +11,1496 @@
|
|
|
11
11
|
* The side is asked once, on the row. The bubble, its reactions and the
|
|
12
12
|
* header follow `data-align`; the surveyed shadcn examples pass `align` to
|
|
13
13
|
* both `Message` and `Bubble`, and two answers to one question can disagree
|
|
14
|
-
|
|
14
|
+
*.
|
|
15
|
+
*
|
|
16
|
+
* Every rule is scoped to the family and stops at the parts of any other
|
|
17
|
+
* family nested in a message: a card or an alert in the body keeps its own
|
|
18
|
+
* `header`, `footer`, `content` and `actions`. The family's own nested roots
|
|
19
|
+
* (a bubble in a row, a row in a group) stay inside the scope.
|
|
15
20
|
*/
|
|
16
|
-
[data-ui
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
--
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
@scope ([data-ui-message]) to (:scope [data-ui]:not([data-ui-message]) > *) {
|
|
22
|
+
:scope[data-part-root] {
|
|
23
|
+
/**
|
|
24
|
+
* The avatar column is the small avatar step, which the theme restates per
|
|
25
|
+
* density; ReUI's 32 has no step there (dossier §3), and a row that follows
|
|
26
|
+
* the density of the page around it is worth four pixels.
|
|
27
|
+
*/
|
|
28
|
+
--_avatar-size: var(--slotted-message-avatar-size, var(--slotted-avatar-size-sm, 28px));
|
|
29
|
+
--_column-gap: var(--slotted-message-column-gap, var(--slotted-space-4, 0.5rem));
|
|
30
|
+
--_stack-gap: var(--slotted-message-stack-gap, var(--slotted-space-2, 0.25rem));
|
|
31
|
+
--_meta-size: var(--slotted-font-size-xs, 0.75rem);
|
|
32
|
+
--_meta-leading: round(up, calc(var(--_meta-size) * var(--slotted-line-height-xs, 1.4)), 1px);
|
|
33
|
+
/**
|
|
34
|
+
* The inset of the words inside a bubble, which the header and the footer
|
|
35
|
+
* repeat so a name stands over the first letter it names. Eight and twelve
|
|
36
|
+
* at comfortable, ReUI's measure (`c-bubble-2`), falling with the control
|
|
37
|
+
* gap the theme restates per density.
|
|
38
|
+
*/
|
|
39
|
+
--_pad-block: var(--slotted-message-bubble-padding-block, var(--slotted-control-gap-md, 8px));
|
|
40
|
+
--_pad-inline: var(
|
|
41
|
+
--slotted-message-bubble-padding-inline,
|
|
42
|
+
calc(var(--slotted-control-gap-md, 8px) + var(--slotted-space-2, 0.25rem))
|
|
43
|
+
);
|
|
44
|
+
/**
|
|
45
|
+
* The inner controls of a row — the version pager — at the R2 size: the
|
|
46
|
+
* glyph plus a step of air on each side, never under the WCAG 2.2 target.
|
|
47
|
+
*/
|
|
48
|
+
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
49
|
+
--_inner-size: max(
|
|
50
|
+
var(--slotted-target-min, 24px),
|
|
51
|
+
calc(var(--_glyph-size) + 2 * var(--slotted-space-2, 0.25rem))
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-areas: 'body';
|
|
56
|
+
grid-template-columns: minmax(0, 1fr);
|
|
57
|
+
column-gap: var(--_column-gap);
|
|
58
|
+
position: relative;
|
|
59
|
+
min-inline-size: 0;
|
|
60
|
+
color: var(--slotted-text);
|
|
61
|
+
font-family: var(--slotted-font-family-sans, sans-serif);
|
|
62
|
+
}
|
|
63
|
+
|
|
38
64
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
65
|
+
* A row with an avatar, and every row of a run that holds one anywhere,
|
|
66
|
+
* gives the avatar a column. The earlier rows of a run carry no avatar and
|
|
67
|
+
* still stand on the spine the last one sits on — shadcn asks for an empty
|
|
68
|
+
* `MessageAvatar` in each of them (`c-message-6`); the column is read here
|
|
69
|
+
* from the DOM instead.
|
|
41
70
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
display: grid;
|
|
49
|
-
grid-template-areas: 'body';
|
|
50
|
-
grid-template-columns: minmax(0, 1fr);
|
|
51
|
-
column-gap: var(--_column-gap);
|
|
52
|
-
position: relative;
|
|
53
|
-
min-inline-size: 0;
|
|
54
|
-
color: var(--slotted-text);
|
|
55
|
-
font-family: var(--slotted-font-family-sans, sans-serif);
|
|
56
|
-
}
|
|
71
|
+
:scope[data-part-root]:has(> [data-part-avatar]),
|
|
72
|
+
:scope[data-part-group]:has([data-part-avatar]) > [data-ui-message][data-part-root] {
|
|
73
|
+
grid-template-areas: 'avatar body';
|
|
74
|
+
grid-template-columns: var(--_avatar-size) minmax(0, 1fr);
|
|
75
|
+
}
|
|
57
76
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
[data-ui='message'][data-part='root']:has(> [data-part='avatar']),
|
|
66
|
-
[data-ui='message'][data-part='group']:has([data-part='avatar'])
|
|
67
|
-
> [data-ui='message'][data-part='root'] {
|
|
68
|
-
grid-template-areas: 'avatar body';
|
|
69
|
-
grid-template-columns: var(--_avatar-size) minmax(0, 1fr);
|
|
70
|
-
}
|
|
77
|
+
:scope[data-part-root][data-align='end']:has(> [data-part-avatar]),
|
|
78
|
+
:scope[data-part-group]:has([data-part-avatar])
|
|
79
|
+
> [data-ui-message][data-part-root][data-align='end'] {
|
|
80
|
+
grid-template-areas: 'body avatar';
|
|
81
|
+
grid-template-columns: minmax(0, 1fr) var(--_avatar-size);
|
|
82
|
+
}
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
/**
|
|
85
|
+
* The avatar sits at the foot of the row, on the line of the last bubble
|
|
86
|
+
* rather than of the footer under it: in a run it marks where the run ends,
|
|
87
|
+
* which is where the reader's eye arrives.
|
|
88
|
+
*/
|
|
89
|
+
:scope[data-part-root] > [data-part-avatar] {
|
|
90
|
+
grid-area: avatar;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-self: end;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
inline-size: var(--_avatar-size);
|
|
95
|
+
min-block-size: var(--_avatar-size);
|
|
96
|
+
}
|
|
78
97
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* which is where the reader's eye arrives.
|
|
83
|
-
*/
|
|
84
|
-
[data-ui='message'][data-part='root'] > [data-part='avatar'] {
|
|
85
|
-
grid-area: avatar;
|
|
86
|
-
display: flex;
|
|
87
|
-
align-self: end;
|
|
88
|
-
justify-content: center;
|
|
89
|
-
inline-size: var(--_avatar-size);
|
|
90
|
-
min-block-size: var(--_avatar-size);
|
|
91
|
-
}
|
|
98
|
+
:scope[data-part-root]:has(> [data-part-body] > [data-part-footer]) > [data-part-avatar] {
|
|
99
|
+
margin-block-end: calc(var(--_meta-leading) + var(--_stack-gap));
|
|
100
|
+
}
|
|
92
101
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
:scope[data-part-root] > [data-part-body] {
|
|
103
|
+
grid-area: body;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
align-items: flex-start;
|
|
107
|
+
gap: var(--_stack-gap);
|
|
108
|
+
min-inline-size: 0;
|
|
109
|
+
}
|
|
97
110
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
align-items: flex-start;
|
|
103
|
-
gap: var(--_stack-gap);
|
|
104
|
-
min-inline-size: 0;
|
|
105
|
-
}
|
|
111
|
+
:scope[data-part-root][data-align='end'] > [data-part-body] {
|
|
112
|
+
align-items: flex-end;
|
|
113
|
+
}
|
|
106
114
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
/**
|
|
116
|
+
* ── A run from one sender ──────────────────────────────────────────────
|
|
117
|
+
*
|
|
118
|
+
* Two pixels between the rows of a run, where ReUI puts eight (`c-bubble-3`).
|
|
119
|
+
* At eight the run read as four messages; at two, with the corners on the
|
|
120
|
+
* sender's side drawn in, it reads as one speaker holding the floor. The
|
|
121
|
+
* gap between runs belongs to whatever stacks them — the scroller gives it.
|
|
122
|
+
*/
|
|
123
|
+
:scope[data-part-group] {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: var(--slotted-message-run-gap, var(--slotted-space-1, 0.125rem));
|
|
127
|
+
min-inline-size: 0;
|
|
128
|
+
}
|
|
110
129
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
/* ── Header and footer ──────────────────────────────────────────────── */
|
|
131
|
+
|
|
132
|
+
:scope[data-part-root] :is([data-part-header], [data-part-footer]) {
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-wrap: wrap;
|
|
135
|
+
align-items: center;
|
|
136
|
+
column-gap: var(--slotted-space-3, 0.375rem);
|
|
137
|
+
max-inline-size: 100%;
|
|
138
|
+
min-inline-size: 0;
|
|
139
|
+
padding-inline: var(--_pad-inline);
|
|
140
|
+
color: var(--slotted-text-muted);
|
|
141
|
+
font-size: var(--_meta-size);
|
|
142
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
143
|
+
line-height: var(--_meta-leading);
|
|
144
|
+
}
|
|
125
145
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
display: flex;
|
|
130
|
-
flex-wrap: wrap;
|
|
131
|
-
align-items: center;
|
|
132
|
-
column-gap: var(--slotted-space-3, 0.375rem);
|
|
133
|
-
max-inline-size: 100%;
|
|
134
|
-
min-inline-size: 0;
|
|
135
|
-
padding-inline: var(--_pad-inline);
|
|
136
|
-
color: var(--slotted-text-muted);
|
|
137
|
-
font-size: var(--_meta-size);
|
|
138
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
139
|
-
line-height: var(--_meta-leading);
|
|
140
|
-
}
|
|
146
|
+
:scope[data-part-root][data-align='end'] :is([data-part-header], [data-part-footer]) {
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
}
|
|
141
149
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
150
|
+
/**
|
|
151
|
+
* The name and the hour are two facts, and the dot between them is drawn by
|
|
152
|
+
* the stylesheet rather than written into the text: a character would be
|
|
153
|
+
* read aloud, copied with the name and wrapped onto a line of its own.
|
|
154
|
+
* ReUI asks the consumer to write the dot (`c-message-3`).
|
|
155
|
+
*/
|
|
156
|
+
:scope[data-part-root] [data-part-header] > * + [data-part-time]::before {
|
|
157
|
+
content: '';
|
|
158
|
+
display: inline-block;
|
|
159
|
+
inline-size: var(--slotted-space-2, 0.25rem);
|
|
160
|
+
block-size: var(--slotted-space-2, 0.25rem);
|
|
161
|
+
margin-inline-end: var(--slotted-space-3, 0.375rem);
|
|
162
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
163
|
+
background-color: currentColor;
|
|
164
|
+
opacity: 0.5;
|
|
165
|
+
vertical-align: middle;
|
|
166
|
+
}
|
|
146
167
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
[data-ui='message'][data-part='root'] [data-part='header'] > * + [data-part='time']::before {
|
|
154
|
-
content: '';
|
|
155
|
-
display: inline-block;
|
|
156
|
-
inline-size: var(--slotted-space-2, 0.25rem);
|
|
157
|
-
block-size: var(--slotted-space-2, 0.25rem);
|
|
158
|
-
margin-inline-end: var(--slotted-space-3, 0.375rem);
|
|
159
|
-
border-radius: var(--slotted-radius-full, 9999px);
|
|
160
|
-
background-color: currentColor;
|
|
161
|
-
opacity: 0.5;
|
|
162
|
-
vertical-align: middle;
|
|
163
|
-
}
|
|
168
|
+
:scope[data-part-root] [data-part-author] {
|
|
169
|
+
min-inline-size: 0;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
white-space: nowrap;
|
|
173
|
+
}
|
|
164
174
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
white-space: nowrap;
|
|
170
|
-
}
|
|
175
|
+
:scope[data-part-root] [data-part-time] {
|
|
176
|
+
font-variant-numeric: tabular-nums;
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
}
|
|
171
179
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
/* ── Receipt ──────────────────────────────────────────────────────────
|
|
181
|
+
*
|
|
182
|
+
* Where a message is in its delivery is said inside the bubble, in `meta`
|
|
183
|
+
* (below), as a mark beside the hour — the convention WhatsApp and Telegram
|
|
184
|
+
* taught. Outside a bubble — an unframed reply, a thread — the receipt is a
|
|
185
|
+
* word in the footer, set in the meta type, with no mark: a glyph beside a
|
|
186
|
+
* word of twelve pixels is two voices saying one thing, and the two never
|
|
187
|
+
* shared a center line.
|
|
188
|
+
*/
|
|
189
|
+
:scope[data-part-root] [data-part-footer] > [data-part-receipt] {
|
|
190
|
+
white-space: nowrap;
|
|
191
|
+
}
|
|
176
192
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
* (below), as a mark beside the hour — the convention WhatsApp and Telegram
|
|
181
|
-
* taught. Outside a bubble — an unframed reply, a thread — the receipt is a
|
|
182
|
-
* word in the footer, set in the meta type, with no mark: a glyph beside a
|
|
183
|
-
* word of twelve pixels is two voices saying one thing, and the two never
|
|
184
|
-
* shared a centre line.
|
|
185
|
-
*/
|
|
186
|
-
[data-ui='message'][data-part='root'] [data-part='footer'] > [data-part='receipt'] {
|
|
187
|
-
white-space: nowrap;
|
|
188
|
-
}
|
|
193
|
+
:scope[data-part-root] [data-part-footer] > [data-part-receipt] > [data-ui-icon] {
|
|
194
|
+
display: none;
|
|
195
|
+
}
|
|
189
196
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
/**
|
|
198
|
+
* A message that did not go says so in a word under its surface, in the
|
|
199
|
+
* danger ink, lined up with the surface's own edge on the sender's side —
|
|
200
|
+
* not with the words inside it — so the note reads as the bubble's caption.
|
|
201
|
+
* The control that sends it again stands beside the surface (`retry`).
|
|
202
|
+
*/
|
|
203
|
+
:scope[data-part-root][data-invalid] > [data-part-body] > [data-part-footer] {
|
|
204
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
205
|
+
color: var(--slotted-tone-danger-text);
|
|
206
|
+
}
|
|
196
207
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
208
|
+
/* ── Actions ────────────────────────────────────────────────────────────
|
|
209
|
+
*
|
|
210
|
+
* The actions keep their room at rest, so a revealed toolbar moves nothing.
|
|
211
|
+
* `hover` reveals them on the pointer, on focus anywhere in the row, and
|
|
212
|
+
* always on a screen that cannot hover: a reveal by hover alone would hide
|
|
213
|
+
* them from the keyboard and from a finger.
|
|
214
|
+
*/
|
|
215
|
+
:scope[data-part-root] [data-part-actions] {
|
|
216
|
+
display: inline-flex;
|
|
217
|
+
align-items: center;
|
|
218
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
219
|
+
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit, ease-in);
|
|
220
|
+
}
|
|
207
221
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
* always on a screen that cannot hover: a reveal by hover alone would hide
|
|
213
|
-
* them from the keyboard and from a finger.
|
|
214
|
-
*/
|
|
215
|
-
[data-ui='message'][data-part='root'] [data-part='actions'] {
|
|
216
|
-
display: inline-flex;
|
|
217
|
-
align-items: center;
|
|
218
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
219
|
-
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit, ease-in);
|
|
220
|
-
}
|
|
222
|
+
@media (hover: hover) {
|
|
223
|
+
:scope[data-part-root][data-actions='hover'] [data-part-actions] {
|
|
224
|
+
opacity: 0;
|
|
225
|
+
}
|
|
221
226
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
:scope[data-part-root][data-actions='hover']:is(:hover:not([data-disabled]), :focus-within)
|
|
228
|
+
[data-part-actions] {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
transition-timing-function: var(--slotted-easing-enter, ease-out);
|
|
231
|
+
}
|
|
225
232
|
}
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
/* ── Versions ───────────────────────────────────────────────────────────
|
|
235
|
+
*
|
|
236
|
+
* `2 de 3` between two inner controls. The chevron is one glyph turned for
|
|
237
|
+
* the previous control, and a right-to-left document turns both.
|
|
238
|
+
*/
|
|
239
|
+
:scope[data-part-root] [data-part-versions] {
|
|
240
|
+
display: inline-flex;
|
|
241
|
+
align-items: center;
|
|
242
|
+
color: var(--slotted-text-muted);
|
|
234
243
|
}
|
|
235
|
-
}
|
|
236
244
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
* and a band of light that travels across its words. A single step is the
|
|
243
|
-
* same card with one line. ReUI's `c-message-7` draws one muted line that
|
|
244
|
-
* pulses; the log says what has been done, not only that something is.
|
|
245
|
-
*
|
|
246
|
-
* The band is the one place the family paints text with a gradient, which
|
|
247
|
-
* the polish lens refuses as decoration: here it is the wait itself, it
|
|
248
|
-
* moves only while the step is current, and under reduced motion the words
|
|
249
|
-
* stand in the plain ink.
|
|
250
|
-
*/
|
|
251
|
-
[data-ui='message'][data-part='root'] [data-part='activity'] {
|
|
252
|
-
display: inline-flex;
|
|
253
|
-
flex-direction: column;
|
|
254
|
-
gap: var(--slotted-space-3, 0.375rem);
|
|
255
|
-
box-sizing: border-box;
|
|
256
|
-
max-inline-size: 100%;
|
|
257
|
-
padding-block: var(--_pad-block);
|
|
258
|
-
padding-inline: var(--_pad-inline) calc(var(--_pad-inline) + var(--slotted-space-2, 0.25rem));
|
|
259
|
-
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
260
|
-
border-radius: calc(var(--_pad-block) * 2);
|
|
261
|
-
background-color: var(--slotted-surface-raised);
|
|
262
|
-
box-shadow: var(--slotted-shadow-xs);
|
|
263
|
-
color: var(--slotted-text-muted);
|
|
264
|
-
font-size: var(--slotted-control-font-size-md, 13px);
|
|
265
|
-
line-height: round(up, calc(1em * var(--slotted-line-height-md, 1.5)), 1px);
|
|
266
|
-
}
|
|
245
|
+
:scope[data-part-root] [data-part-version-label] {
|
|
246
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
247
|
+
font-variant-numeric: tabular-nums;
|
|
248
|
+
white-space: nowrap;
|
|
249
|
+
}
|
|
267
250
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
251
|
+
:scope[data-part-root] :is([data-part-version-previous], [data-part-version-next]) {
|
|
252
|
+
display: inline-grid;
|
|
253
|
+
place-items: center;
|
|
254
|
+
inline-size: var(--_inner-size);
|
|
255
|
+
block-size: var(--_inner-size);
|
|
256
|
+
margin: 0;
|
|
257
|
+
padding: 0;
|
|
258
|
+
border: 0;
|
|
259
|
+
border-radius: var(--slotted-control-radius, 4px);
|
|
260
|
+
background-color: transparent;
|
|
261
|
+
color: inherit;
|
|
262
|
+
font: inherit;
|
|
263
|
+
transition:
|
|
264
|
+
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
265
|
+
color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
281
266
|
}
|
|
282
|
-
}
|
|
283
267
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
268
|
+
:scope[data-part-root]
|
|
269
|
+
:is([data-part-version-previous], [data-part-version-next])
|
|
270
|
+
> [data-ui-icon] {
|
|
271
|
+
--slotted-icon-size: var(--_glyph-size);
|
|
272
|
+
}
|
|
288
273
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
inline-size: var(--_glyph-size);
|
|
293
|
-
block-size: var(--_glyph-size);
|
|
294
|
-
}
|
|
274
|
+
:scope[data-part-root] [data-part-version-previous] > [data-ui-icon] {
|
|
275
|
+
scale: -1 1;
|
|
276
|
+
}
|
|
295
277
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
278
|
+
:scope[data-part-root]:dir(rtl)
|
|
279
|
+
:is([data-part-version-previous], [data-part-version-next])
|
|
280
|
+
> [data-ui-icon] {
|
|
281
|
+
scale: -1 1;
|
|
282
|
+
}
|
|
299
283
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
284
|
+
:scope[data-part-root]:dir(rtl) [data-part-version-previous] > [data-ui-icon] {
|
|
285
|
+
scale: 1 1;
|
|
286
|
+
}
|
|
303
287
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
288
|
+
:scope[data-part-root]
|
|
289
|
+
:is([data-part-version-previous], [data-part-version-next]):hover:not(:disabled) {
|
|
290
|
+
background-color: var(--slotted-tone-secondary-subtle-hover);
|
|
291
|
+
color: var(--slotted-text);
|
|
292
|
+
}
|
|
307
293
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
var(--_base) 0%,
|
|
314
|
-
var(--_base) 38%,
|
|
315
|
-
var(--slotted-text-muted) 50%,
|
|
316
|
-
var(--_base) 62%,
|
|
317
|
-
var(--_base) 100%
|
|
318
|
-
);
|
|
319
|
-
background-size: 220% 100%;
|
|
320
|
-
background-clip: text;
|
|
321
|
-
color: transparent;
|
|
322
|
-
animation: slotted-message-sweep var(--slotted-duration-loop-slow) linear infinite;
|
|
323
|
-
}
|
|
294
|
+
:scope[data-part-root]
|
|
295
|
+
:is([data-part-version-previous], [data-part-version-next]):active:not(:disabled) {
|
|
296
|
+
background-color: var(--slotted-tone-secondary-subtle-active);
|
|
297
|
+
color: var(--slotted-text);
|
|
298
|
+
}
|
|
324
299
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
background-position: 100% 0;
|
|
300
|
+
:scope[data-part-root] :is([data-part-version-previous], [data-part-version-next]):disabled {
|
|
301
|
+
color: var(--slotted-disabled-foreground);
|
|
328
302
|
}
|
|
329
303
|
|
|
330
|
-
|
|
331
|
-
|
|
304
|
+
:scope[data-part-root]
|
|
305
|
+
:is([data-part-version-previous], [data-part-version-next]):focus-visible {
|
|
306
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
307
|
+
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
332
308
|
}
|
|
333
|
-
}
|
|
334
309
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
310
|
+
/* ── A message that did not go ─────────────────────────────────────────
|
|
311
|
+
*
|
|
312
|
+
* The words stay as they were written, on their own surface. A red rim round
|
|
313
|
+
* a blue bubble said "error" twice and read as a second, clashing bubble,
|
|
314
|
+
* and a faded fill dropped white words on the accent under 4.5:1 (4.2 at
|
|
315
|
+
* 85%). What says it is a round control beside the surface, in the danger
|
|
316
|
+
* tone, which is also the way to send it again (`bubble` › `retry`,
|
|
317
|
+
* iMessage's placement), and the receipt under it, in words.
|
|
318
|
+
*/
|
|
345
319
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
320
|
+
/* ── Layout: thread ─────────────────────────────────────────────────────
|
|
321
|
+
*
|
|
322
|
+
* The comment thread (Slack, ReUI `sheet-5`): every row at the start, the
|
|
323
|
+
* avatar at the top beside the name, the words unframed under it, and a
|
|
324
|
+
* band under the pointer that says which message the actions belong to.
|
|
325
|
+
*/
|
|
326
|
+
:scope[data-part-root][data-layout='thread'] {
|
|
327
|
+
--_avatar-size: var(
|
|
328
|
+
--slotted-message-thread-avatar-size,
|
|
329
|
+
var(--slotted-avatar-size-md, 36px)
|
|
330
|
+
);
|
|
331
|
+
--_pad-inline: 0px;
|
|
332
|
+
|
|
333
|
+
padding-block: var(--slotted-space-3, 0.375rem);
|
|
334
|
+
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
335
|
+
border-radius: var(--slotted-radius-md, 6px);
|
|
336
|
+
transition: background-color var(--slotted-duration-short)
|
|
337
|
+
var(--slotted-easing-standard, ease);
|
|
338
|
+
}
|
|
351
339
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
inline-size: var(--_inner-size);
|
|
357
|
-
block-size: var(--_inner-size);
|
|
358
|
-
margin: 0;
|
|
359
|
-
padding: 0;
|
|
360
|
-
border: 0;
|
|
361
|
-
border-radius: var(--slotted-control-radius, 4px);
|
|
362
|
-
background-color: transparent;
|
|
363
|
-
color: inherit;
|
|
364
|
-
font: inherit;
|
|
365
|
-
transition:
|
|
366
|
-
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
367
|
-
color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
368
|
-
}
|
|
340
|
+
:scope[data-part-root][data-layout='thread'] > [data-part-avatar] {
|
|
341
|
+
align-self: start;
|
|
342
|
+
margin-block-end: 0;
|
|
343
|
+
}
|
|
369
344
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
345
|
+
:scope[data-part-root][data-layout='thread'] [data-part-author] {
|
|
346
|
+
color: var(--slotted-text);
|
|
347
|
+
font-size: var(--slotted-control-font-size-md, 13px);
|
|
348
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
349
|
+
}
|
|
375
350
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
351
|
+
:scope[data-part-root][data-layout='thread']:hover:not([data-disabled]) {
|
|
352
|
+
background-color: var(--slotted-tone-secondary-subtle-hover);
|
|
353
|
+
}
|
|
379
354
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
355
|
+
/**
|
|
356
|
+
* In a thread the actions stand in the flow under the words, on the words'
|
|
357
|
+
* column. Where the pointer can hover and the row reveals them, they float
|
|
358
|
+
* instead at the row's top end over the band, the way every comment surface
|
|
359
|
+
* places them — a toolbar that appears only under the pointer takes no room.
|
|
360
|
+
* A plate that is always painted, on a touch screen or with `always`, floated
|
|
361
|
+
* over the words and covered them at 360 pixels.
|
|
362
|
+
*/
|
|
363
|
+
:scope[data-part-root][data-layout='thread'] > [data-part-actions] {
|
|
364
|
+
grid-column: body;
|
|
365
|
+
justify-self: start;
|
|
366
|
+
}
|
|
385
367
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
368
|
+
@media (hover: hover) {
|
|
369
|
+
:scope[data-part-root][data-layout='thread'][data-actions='hover'] > [data-part-actions] {
|
|
370
|
+
position: absolute;
|
|
371
|
+
inset-block-start: calc(var(--slotted-space-2, 0.25rem) * -1);
|
|
372
|
+
inset-inline-end: var(--slotted-space-4, 0.5rem);
|
|
373
|
+
padding: var(--slotted-space-1, 0.125rem);
|
|
374
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
375
|
+
border-radius: var(--slotted-radius-md, 6px);
|
|
376
|
+
background-color: var(--slotted-surface-raised);
|
|
377
|
+
box-shadow: var(--slotted-shadow-sm);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
389
380
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
381
|
+
/* ══ The bubble ════════════════════════════════════════════════════════ */
|
|
382
|
+
|
|
383
|
+
:scope[data-part-bubble] {
|
|
384
|
+
/**
|
|
385
|
+
* The five tones, read into the roles a painting needs. `soft` writes in
|
|
386
|
+
* the page's ink on the accent and secondary grounds — a paragraph set in
|
|
387
|
+
* blue is a link — and in the tone's own ink on the three status tones,
|
|
388
|
+
* where the color of the words is the point.
|
|
389
|
+
*/
|
|
390
|
+
--_solid: var(--slotted-tone-secondary-solid);
|
|
391
|
+
--_on-solid: var(--slotted-tone-secondary-on-solid);
|
|
392
|
+
--_surface: var(--slotted-tone-secondary-surface);
|
|
393
|
+
--_border: var(--slotted-border-subtle);
|
|
394
|
+
--_soft-ink: var(--slotted-text);
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Twice the block inset: sixteen at comfortable, where ReUI draws fourteen
|
|
398
|
+
* (no step), falling to twelve and eight with the density. A one-line
|
|
399
|
+
* bubble is 39, 34 and 28 pixels tall at the three densities, so the
|
|
400
|
+
* corner never meets its twin and a bubble stays a bubble rather than a
|
|
401
|
+
* pill; a stated sixteen made the dense bubble a capsule.
|
|
402
|
+
*/
|
|
403
|
+
--_radius: var(--slotted-message-bubble-radius, calc(var(--_pad-block) * 2));
|
|
404
|
+
--_radius-joined: var(--slotted-message-bubble-radius-joined, var(--slotted-radius-sm, 4px));
|
|
405
|
+
/* The row's inset, restated so a bubble outside a row keeps the density. */
|
|
406
|
+
--_pad-block: var(--slotted-message-bubble-padding-block, var(--slotted-control-gap-md, 8px));
|
|
407
|
+
--_pad-inline: var(
|
|
408
|
+
--slotted-message-bubble-padding-inline,
|
|
409
|
+
calc(var(--slotted-control-gap-md, 8px) + var(--slotted-space-2, 0.25rem))
|
|
410
|
+
);
|
|
411
|
+
--_top-side: var(--_radius);
|
|
412
|
+
--_bottom-side: var(--_radius);
|
|
413
|
+
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
414
|
+
/**
|
|
415
|
+
* The line rounded up to a whole pixel: fourteen at 1.5 is 21, and a
|
|
416
|
+
* one-line bubble stands at 21 + 2 × 8 + 2 × 1 = 39. ReUI's 1.625 put it at
|
|
417
|
+
* 40.75, with every edge below the first line between two device pixels
|
|
418
|
+
* (dossier §3).
|
|
419
|
+
*/
|
|
420
|
+
--_leading: round(up, calc(var(--_font-size) * var(--slotted-line-height-md, 1.5)), 1px);
|
|
421
|
+
--_reactions-size: max(
|
|
422
|
+
var(--slotted-target-min, 24px),
|
|
423
|
+
var(--slotted-control-inner-size-md, 24px)
|
|
424
|
+
);
|
|
425
|
+
|
|
426
|
+
display: flex;
|
|
427
|
+
flex-direction: column;
|
|
428
|
+
align-items: flex-start;
|
|
429
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
430
|
+
position: relative;
|
|
431
|
+
inline-size: fit-content;
|
|
432
|
+
min-inline-size: 0;
|
|
433
|
+
/**
|
|
434
|
+
* A bubble never reaches the far side of its row, so the side it hangs
|
|
435
|
+
* from stays readable: ReUI's 80%. It is a share of the row, not a measure
|
|
436
|
+
* of the text — the measure belongs to `container`.
|
|
437
|
+
*/
|
|
438
|
+
max-inline-size: var(--slotted-message-bubble-share, 80%);
|
|
439
|
+
}
|
|
395
440
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
441
|
+
:scope[data-part-bubble][data-tone='accent'] {
|
|
442
|
+
--_solid: var(--slotted-tone-accent-solid);
|
|
443
|
+
--_on-solid: var(--slotted-tone-accent-on-solid);
|
|
444
|
+
--_surface: var(--slotted-tone-accent-surface);
|
|
445
|
+
--_border: var(--slotted-tone-accent-border);
|
|
446
|
+
}
|
|
401
447
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
448
|
+
:scope[data-part-bubble][data-tone='success'] {
|
|
449
|
+
--_solid: var(--slotted-tone-success-solid);
|
|
450
|
+
--_on-solid: var(--slotted-tone-success-on-solid);
|
|
451
|
+
--_surface: var(--slotted-tone-success-surface);
|
|
452
|
+
--_border: var(--slotted-tone-success-border);
|
|
453
|
+
--_soft-ink: var(--slotted-tone-success-text);
|
|
454
|
+
}
|
|
406
455
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
456
|
+
:scope[data-part-bubble][data-tone='info'] {
|
|
457
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
458
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
459
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
460
|
+
--_border: var(--slotted-tone-info-border);
|
|
461
|
+
--_soft-ink: var(--slotted-tone-info-text);
|
|
462
|
+
}
|
|
412
463
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
* iMessage's placement), and the receipt under it, in words.
|
|
421
|
-
*/
|
|
464
|
+
:scope[data-part-bubble][data-tone='warning'] {
|
|
465
|
+
--_solid: var(--slotted-tone-warning-solid);
|
|
466
|
+
--_on-solid: var(--slotted-tone-warning-on-solid);
|
|
467
|
+
--_surface: var(--slotted-tone-warning-surface);
|
|
468
|
+
--_border: var(--slotted-tone-warning-border);
|
|
469
|
+
--_soft-ink: var(--slotted-tone-warning-text);
|
|
470
|
+
}
|
|
422
471
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
--_avatar-size: var(--slotted-message-thread-avatar-size, var(--slotted-avatar-size-md, 36px));
|
|
431
|
-
--_pad-inline: 0px;
|
|
432
|
-
|
|
433
|
-
padding-block: var(--slotted-space-3, 0.375rem);
|
|
434
|
-
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
435
|
-
border-radius: var(--slotted-radius-md, 6px);
|
|
436
|
-
transition: background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
437
|
-
}
|
|
472
|
+
:scope[data-part-bubble][data-tone='danger'] {
|
|
473
|
+
--_solid: var(--slotted-tone-danger-solid);
|
|
474
|
+
--_on-solid: var(--slotted-tone-danger-on-solid);
|
|
475
|
+
--_surface: var(--slotted-tone-danger-surface);
|
|
476
|
+
--_border: var(--slotted-tone-danger-border);
|
|
477
|
+
--_soft-ink: var(--slotted-tone-danger-text);
|
|
478
|
+
}
|
|
438
479
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
480
|
+
/**
|
|
481
|
+
* ── Variant: four paintings ────────────────────────────────────────────
|
|
482
|
+
*
|
|
483
|
+
* `solid` is the tone's fill with its own ink and no rim. `soft` is the
|
|
484
|
+
* tone's tinted ground; its rim is that ground mixed half-way to the subtle
|
|
485
|
+
* rule, which is next to invisible in `light` and `dark` and a grey line in
|
|
486
|
+
* `high-contrast`, where every tone surface is the page's white and a bubble
|
|
487
|
+
* without an edge is a paragraph. `outline` is the tone's edge around the
|
|
488
|
+
* page's ground, `plain` no box at all — the unframed assistant answer that
|
|
489
|
+
* takes the whole row.
|
|
490
|
+
*/
|
|
491
|
+
:scope[data-part-bubble] > [data-part-content] {
|
|
492
|
+
--_ground: var(--_surface);
|
|
493
|
+
--_ink: var(--_soft-ink);
|
|
494
|
+
--_edge: color-mix(in oklab, var(--_surface), var(--slotted-border-subtle));
|
|
495
|
+
|
|
496
|
+
display: block;
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
min-inline-size: 0;
|
|
499
|
+
max-inline-size: 100%;
|
|
500
|
+
margin: 0;
|
|
501
|
+
padding-block: var(--_pad-block, 8px);
|
|
502
|
+
padding-inline: var(--_pad-inline, 12px);
|
|
503
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--_edge);
|
|
504
|
+
border-start-start-radius: var(--_top-side);
|
|
505
|
+
border-start-end-radius: var(--_radius);
|
|
506
|
+
border-end-start-radius: var(--_bottom-side);
|
|
507
|
+
border-end-end-radius: var(--_radius);
|
|
508
|
+
background-color: var(--_ground);
|
|
509
|
+
color: var(--_ink);
|
|
510
|
+
font-family: inherit;
|
|
511
|
+
font-size: var(--_font-size);
|
|
512
|
+
font-weight: var(--slotted-font-weight-regular, 400);
|
|
513
|
+
line-height: var(--_leading);
|
|
514
|
+
text-align: start;
|
|
515
|
+
text-decoration: none;
|
|
516
|
+
/**
|
|
517
|
+
* A URL or a hash of three hundred characters breaks where it must rather
|
|
518
|
+
* than pushing the bubble past its share, and each paragraph takes the
|
|
519
|
+
* direction of its own first strong letter: Arabic in an English thread
|
|
520
|
+
* reads from its own side.
|
|
521
|
+
*/
|
|
522
|
+
overflow-wrap: anywhere;
|
|
523
|
+
unicode-bidi: plaintext;
|
|
524
|
+
}
|
|
443
525
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
526
|
+
:scope[data-part-bubble][data-variant='solid'] > [data-part-content] {
|
|
527
|
+
--_ground: var(--_solid);
|
|
528
|
+
--_ink: var(--_on-solid);
|
|
529
|
+
--_edge: var(--_solid);
|
|
530
|
+
}
|
|
449
531
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
532
|
+
:scope[data-part-bubble][data-variant='outline'] > [data-part-content] {
|
|
533
|
+
--_ground: var(--slotted-surface);
|
|
534
|
+
--_ink: var(--slotted-text);
|
|
535
|
+
--_edge: var(--_border);
|
|
536
|
+
}
|
|
453
537
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
* column. Where the pointer can hover and the row reveals them, they float
|
|
457
|
-
* instead at the row's top end over the band, the way every comment surface
|
|
458
|
-
* places them — a toolbar that appears only under the pointer takes no room.
|
|
459
|
-
* A plate that is always painted, on a touch screen or with `always`, floated
|
|
460
|
-
* over the words and covered them at 360 pixels.
|
|
461
|
-
*/
|
|
462
|
-
[data-ui='message'][data-part='root'][data-layout='thread'] > [data-part='actions'] {
|
|
463
|
-
grid-column: body;
|
|
464
|
-
justify-self: start;
|
|
465
|
-
}
|
|
538
|
+
:scope[data-part-bubble][data-variant='plain'] {
|
|
539
|
+
--_pad-inline: 0px;
|
|
466
540
|
|
|
467
|
-
|
|
468
|
-
[data-ui='message'][data-part='root'][data-layout='thread'][data-actions='hover']
|
|
469
|
-
> [data-part='actions'] {
|
|
470
|
-
position: absolute;
|
|
471
|
-
inset-block-start: calc(var(--slotted-space-2, 0.25rem) * -1);
|
|
472
|
-
inset-inline-end: var(--slotted-space-4, 0.5rem);
|
|
473
|
-
padding: var(--slotted-space-1, 0.125rem);
|
|
474
|
-
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
475
|
-
border-radius: var(--slotted-radius-md, 6px);
|
|
476
|
-
background-color: var(--slotted-surface-raised);
|
|
477
|
-
box-shadow: var(--slotted-shadow-sm);
|
|
541
|
+
max-inline-size: 100%;
|
|
478
542
|
}
|
|
479
|
-
}
|
|
480
543
|
|
|
481
|
-
|
|
544
|
+
:scope[data-part-bubble][data-variant='plain'] > [data-part-content] {
|
|
545
|
+
--_ground: transparent;
|
|
546
|
+
--_ink: var(--slotted-text);
|
|
547
|
+
--_edge: transparent;
|
|
482
548
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
* blue is a link — and in the tone's own ink on the three status tones,
|
|
488
|
-
* where the colour of the words is the point.
|
|
489
|
-
*/
|
|
490
|
-
--_solid: var(--slotted-tone-secondary-solid);
|
|
491
|
-
--_on-solid: var(--slotted-tone-secondary-on-solid);
|
|
492
|
-
--_surface: var(--slotted-tone-secondary-surface);
|
|
493
|
-
--_border: var(--slotted-border-subtle);
|
|
494
|
-
--_soft-ink: var(--slotted-text);
|
|
549
|
+
padding: 0;
|
|
550
|
+
border-width: 0;
|
|
551
|
+
border-radius: 0;
|
|
552
|
+
}
|
|
495
553
|
|
|
496
554
|
/**
|
|
497
|
-
*
|
|
498
|
-
*
|
|
499
|
-
* bubble is 39, 34 and 28 pixels tall at the three densities, so the
|
|
500
|
-
* corner never meets its twin and a bubble stays a bubble rather than a
|
|
501
|
-
* pill; a stated sixteen made the dense bubble a capsule.
|
|
555
|
+
* The bubble sits on the sender's side, and so does everything it carries:
|
|
556
|
+
* the corners that join a run are the ones that face the avatar.
|
|
502
557
|
*/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* The line rounded up to a whole pixel: fourteen at 1.5 is 21, and a
|
|
516
|
-
* one-line bubble stands at 21 + 2 × 8 + 2 × 1 = 39. ReUI's 1.625 put it at
|
|
517
|
-
* 40.75, with every edge below the first line between two device pixels
|
|
518
|
-
* (dossier §3).
|
|
519
|
-
*/
|
|
520
|
-
--_leading: round(up, calc(var(--_font-size) * var(--slotted-line-height-md, 1.5)), 1px);
|
|
521
|
-
--_reactions-size: max(
|
|
522
|
-
var(--slotted-target-min, 24px),
|
|
523
|
-
var(--slotted-control-inner-size-md, 24px)
|
|
524
|
-
);
|
|
525
|
-
|
|
526
|
-
display: flex;
|
|
527
|
-
flex-direction: column;
|
|
528
|
-
align-items: flex-start;
|
|
529
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
530
|
-
position: relative;
|
|
531
|
-
inline-size: fit-content;
|
|
532
|
-
min-inline-size: 0;
|
|
558
|
+
:scope[data-part-root][data-align='end'] [data-part-bubble] {
|
|
559
|
+
align-items: flex-end;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
:scope[data-part-root][data-align='end'] [data-part-bubble] > [data-part-content] {
|
|
563
|
+
border-start-start-radius: var(--_radius);
|
|
564
|
+
border-start-end-radius: var(--_top-side);
|
|
565
|
+
border-end-start-radius: var(--_radius);
|
|
566
|
+
border-end-end-radius: var(--_bottom-side);
|
|
567
|
+
}
|
|
568
|
+
|
|
533
569
|
/**
|
|
534
|
-
* A bubble
|
|
535
|
-
*
|
|
536
|
-
*
|
|
570
|
+
* ── A bubble that is a control ─────────────────────────────────────────
|
|
571
|
+
*
|
|
572
|
+
* A quick reply is the content itself as a `button`, a way out of the
|
|
573
|
+
* thread the content as an `a`. The pointer's answer is the ink laid over
|
|
574
|
+
* the ground — six and twelve per cent — which answers every painting and
|
|
575
|
+
* every tone with one rule: 0.03 OKLab lightness over the accent fill in
|
|
576
|
+
* `light`, 0.044 under the secondary ground, over the 0.02 step
|
|
577
|
+
* `theme-conformance` asks of a hover, and the press twice that.
|
|
537
578
|
*/
|
|
538
|
-
|
|
539
|
-
|
|
579
|
+
:scope[data-part-bubble] > [data-part-content]:is(button, a) {
|
|
580
|
+
--_ground-hover: color-mix(
|
|
581
|
+
in oklab,
|
|
582
|
+
var(--_ink) var(--slotted-message-state-layer-hover, 6%),
|
|
583
|
+
var(--_ground)
|
|
584
|
+
);
|
|
585
|
+
--_ground-active: color-mix(
|
|
586
|
+
in oklab,
|
|
587
|
+
var(--_ink) var(--slotted-message-state-layer-active, 12%),
|
|
588
|
+
var(--_ground)
|
|
589
|
+
);
|
|
590
|
+
|
|
591
|
+
appearance: none;
|
|
592
|
+
cursor: pointer;
|
|
593
|
+
transition:
|
|
594
|
+
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
595
|
+
border-color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
596
|
+
}
|
|
540
597
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
598
|
+
:scope[data-part-bubble][data-variant='plain'] > [data-part-content]:is(button, a) {
|
|
599
|
+
padding-block: var(--slotted-space-1, 0.125rem);
|
|
600
|
+
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
601
|
+
margin-inline: calc(var(--slotted-space-2, 0.25rem) * -1);
|
|
602
|
+
border-radius: var(--slotted-radius-sm, 4px);
|
|
603
|
+
}
|
|
547
604
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
--_border: var(--slotted-tone-success-border);
|
|
553
|
-
--_soft-ink: var(--slotted-tone-success-text);
|
|
554
|
-
}
|
|
605
|
+
:scope[data-part-bubble]
|
|
606
|
+
> [data-part-content]:is(button, a):hover:not(:disabled):not([data-disabled]) {
|
|
607
|
+
background-color: var(--_ground-hover);
|
|
608
|
+
}
|
|
555
609
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
--_border: var(--slotted-tone-warning-border);
|
|
561
|
-
--_soft-ink: var(--slotted-tone-warning-text);
|
|
562
|
-
}
|
|
610
|
+
:scope[data-part-bubble]
|
|
611
|
+
> [data-part-content]:is(button, a):active:not(:disabled):not([data-disabled]) {
|
|
612
|
+
background-color: var(--_ground-active);
|
|
613
|
+
}
|
|
563
614
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
--_border: var(--slotted-tone-danger-border);
|
|
569
|
-
--_soft-ink: var(--slotted-tone-danger-text);
|
|
570
|
-
}
|
|
615
|
+
:scope[data-part-bubble] > [data-part-content]:is(button, a):focus-visible {
|
|
616
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
617
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
618
|
+
}
|
|
571
619
|
|
|
572
|
-
/**
|
|
573
|
-
* ── Variant: four paintings ────────────────────────────────────────────
|
|
574
|
-
*
|
|
575
|
-
* `solid` is the tone's fill with its own ink and no rim. `soft` is the
|
|
576
|
-
* tone's tinted ground; its rim is that ground mixed half-way to the subtle
|
|
577
|
-
* rule, which is next to invisible in `light` and `dark` and a grey line in
|
|
578
|
-
* `high-contrast`, where every tone surface is the page's white and a bubble
|
|
579
|
-
* without an edge is a paragraph. `outline` is the tone's edge around the
|
|
580
|
-
* page's ground, `plain` no box at all — the unframed assistant answer that
|
|
581
|
-
* takes the whole row.
|
|
582
|
-
*/
|
|
583
|
-
[data-ui='message'][data-part='bubble'] > [data-part='content'] {
|
|
584
|
-
--_ground: var(--_surface);
|
|
585
|
-
--_ink: var(--_soft-ink);
|
|
586
|
-
--_edge: color-mix(in oklab, var(--_surface), var(--slotted-border-subtle));
|
|
587
|
-
|
|
588
|
-
display: block;
|
|
589
|
-
box-sizing: border-box;
|
|
590
|
-
min-inline-size: 0;
|
|
591
|
-
max-inline-size: 100%;
|
|
592
|
-
margin: 0;
|
|
593
|
-
padding-block: var(--_pad-block, 8px);
|
|
594
|
-
padding-inline: var(--_pad-inline, 12px);
|
|
595
|
-
border: var(--slotted-border-width-thin, 1px) solid var(--_edge);
|
|
596
|
-
border-start-start-radius: var(--_top-side);
|
|
597
|
-
border-start-end-radius: var(--_radius);
|
|
598
|
-
border-end-start-radius: var(--_bottom-side);
|
|
599
|
-
border-end-end-radius: var(--_radius);
|
|
600
|
-
background-color: var(--_ground);
|
|
601
|
-
color: var(--_ink);
|
|
602
|
-
font-family: inherit;
|
|
603
|
-
font-size: var(--_font-size);
|
|
604
|
-
font-weight: var(--slotted-font-weight-regular, 400);
|
|
605
|
-
line-height: var(--_leading);
|
|
606
|
-
text-align: start;
|
|
607
|
-
text-decoration: none;
|
|
608
620
|
/**
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
621
|
+
* ── Meta: the hour and the ticks inside the bubble ────────────────────
|
|
622
|
+
*
|
|
623
|
+
* The hour and the delivery mark ride at the end of the last line, inside
|
|
624
|
+
* the surface, in the bubble's own ink a step back: a float at the end of
|
|
625
|
+
* the words, so it shares the last line when there is room and takes a line
|
|
626
|
+
* of its own, still at the end, when there is not. The bubble never grows a
|
|
627
|
+
* caption under itself for a fact this small.
|
|
628
|
+
*
|
|
629
|
+
* The box is the height of the words' line and its contents stand on that
|
|
630
|
+
* line's center, a pixel down, where the twelve-pixel digits share the
|
|
631
|
+
* fourteen-pixel words' baseline to within a pixel and the mark sits on the
|
|
632
|
+
* same axis as the digits. WhatsApp hangs its meta below the baseline; set
|
|
633
|
+
* beside a line of text, the hanging meta read as misaligned. Read is the one state that changes the ink: full strength on a
|
|
634
|
+
* solid fill, the accent on a tinted one; the other marks differ by shape.
|
|
613
635
|
*/
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
636
|
+
:scope[data-part-bubble] [data-part-meta] {
|
|
637
|
+
/*
|
|
638
|
+
* Ninety per cent of the bubble's ink: the lowest share at which the hour
|
|
639
|
+
* keeps 4.5:1 on every fill — 4.50 on the accent in `dark`, 5.74 in
|
|
640
|
+
* `light`, 8.39 in `high-contrast` against its 7:1 — measured in sRGB.
|
|
641
|
+
* Two thirds, the first choice, left it at 3.24 on the dark accent.
|
|
642
|
+
*/
|
|
643
|
+
--_meta-ink: color-mix(in srgb, currentColor 90%, transparent);
|
|
644
|
+
--_read-ink: var(--slotted-tone-accent-text);
|
|
645
|
+
|
|
646
|
+
display: inline-flex;
|
|
647
|
+
float: inline-end;
|
|
648
|
+
align-items: center;
|
|
649
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
650
|
+
/* The line rounded down to an even length, so a fourteen-pixel mark and a fourteen-pixel line of digits center on whole pixels. */
|
|
651
|
+
block-size: round(down, var(--_leading), 2px);
|
|
652
|
+
margin-inline-start: var(--slotted-space-4, 0.5rem);
|
|
653
|
+
color: var(--_meta-ink);
|
|
654
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
655
|
+
font-weight: var(--slotted-font-weight-regular, 400);
|
|
656
|
+
line-height: var(--slotted-control-icon-size-sm, 14px);
|
|
657
|
+
font-variant-numeric: tabular-nums;
|
|
658
|
+
white-space: nowrap;
|
|
659
|
+
translate: 0 1px;
|
|
660
|
+
}
|
|
617
661
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
--_edge: var(--_solid);
|
|
622
|
-
}
|
|
662
|
+
:scope[data-part-bubble][data-variant='solid'] [data-part-meta] {
|
|
663
|
+
--_read-ink: var(--_on-solid);
|
|
664
|
+
}
|
|
623
665
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}
|
|
666
|
+
:scope[data-part-bubble] [data-part-meta] [data-part-receipt] {
|
|
667
|
+
display: inline-grid;
|
|
668
|
+
place-items: center;
|
|
669
|
+
}
|
|
629
670
|
|
|
630
|
-
|
|
631
|
-
|
|
671
|
+
/**
|
|
672
|
+
* The mark is the small control glyph, the height of the digits' line, so
|
|
673
|
+
* the two share one box and one center; two ticks at twelve pixels were two
|
|
674
|
+
* scratches.
|
|
675
|
+
*/
|
|
676
|
+
:scope[data-part-bubble] [data-part-meta] [data-part-receipt] > [data-ui-icon] {
|
|
677
|
+
--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
678
|
+
}
|
|
632
679
|
|
|
633
|
-
|
|
634
|
-
|
|
680
|
+
:scope[data-part-bubble] [data-part-meta] [data-part-receipt] > span:not([data-ui]) {
|
|
681
|
+
position: absolute;
|
|
682
|
+
inline-size: 1px;
|
|
683
|
+
block-size: 1px;
|
|
684
|
+
overflow: hidden;
|
|
685
|
+
clip-path: inset(50%);
|
|
686
|
+
white-space: nowrap;
|
|
687
|
+
}
|
|
635
688
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
--_edge: transparent;
|
|
689
|
+
:scope[data-part-bubble] [data-part-meta] [data-part-receipt][data-status='read'] {
|
|
690
|
+
color: var(--_read-ink);
|
|
691
|
+
}
|
|
640
692
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
693
|
+
/** A clock that breathes while the message is on its way. */
|
|
694
|
+
:scope[data-part-bubble]
|
|
695
|
+
[data-part-meta]
|
|
696
|
+
[data-part-receipt][data-status='sending']
|
|
697
|
+
> [data-ui-icon] {
|
|
698
|
+
animation: slotted-message-pending var(--slotted-duration-loop-slow)
|
|
699
|
+
var(--slotted-easing-standard, ease) infinite alternate;
|
|
700
|
+
}
|
|
645
701
|
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
[data-ui='message'][data-part='root'][data-align='end'] [data-part='bubble'] {
|
|
651
|
-
align-items: flex-end;
|
|
652
|
-
}
|
|
702
|
+
/** The meta of an unframed reply has no surface to ride in; it is the footer's. */
|
|
703
|
+
:scope[data-part-bubble][data-variant='plain'] [data-part-meta] {
|
|
704
|
+
display: none;
|
|
705
|
+
}
|
|
653
706
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
707
|
+
/* ── Clamp ──────────────────────────────────────────────────────────────
|
|
708
|
+
*
|
|
709
|
+
* A long bubble shows its first lines and the rest stays in the DOM — for
|
|
710
|
+
* copying, for finding in the page and for a screen reader — behind a line
|
|
711
|
+
* clamp. `more` shows it whole; the binding draws `more` only while the
|
|
712
|
+
* text overflows.
|
|
713
|
+
*
|
|
714
|
+
* The reveal snaps. A line clamp is not an interpolable length, and the
|
|
715
|
+
* alternative — a measured height transitioned through script — makes the
|
|
716
|
+
* text jump twice when a reply streaming above it reflows the column. The
|
|
717
|
+
* chevron turning is the motion that answers the press.
|
|
718
|
+
*/
|
|
719
|
+
:scope[data-part-bubble][data-clamped]:not([data-revealed]) > [data-part-content] {
|
|
720
|
+
display: -webkit-box;
|
|
721
|
+
-webkit-box-orient: vertical;
|
|
722
|
+
-webkit-line-clamp: var(--slotted-message-max-lines, 6);
|
|
723
|
+
/**
|
|
724
|
+
* The clamp stops painting after the last line it keeps, but a box clips
|
|
725
|
+
* its overflow at the padding edge, and the inset under that line painted
|
|
726
|
+
* the top of the next one. Clipping at the content edge keeps the inset
|
|
727
|
+
* clean; the ellipsis is still the clamp's.
|
|
728
|
+
*/
|
|
729
|
+
overflow: clip;
|
|
730
|
+
overflow-clip-margin: content-box;
|
|
731
|
+
}
|
|
662
732
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
733
|
+
:scope[data-part-bubble] > [data-part-more] {
|
|
734
|
+
display: inline-flex;
|
|
735
|
+
align-items: center;
|
|
736
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
737
|
+
min-block-size: var(--slotted-target-min, 24px);
|
|
738
|
+
margin: 0;
|
|
739
|
+
padding-block: 0;
|
|
740
|
+
padding-inline: var(--_pad-inline, 12px);
|
|
741
|
+
border: 0;
|
|
742
|
+
border-radius: var(--slotted-control-radius, 4px);
|
|
743
|
+
background-color: transparent;
|
|
744
|
+
color: var(--slotted-text-muted);
|
|
745
|
+
font: inherit;
|
|
746
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
747
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
748
|
+
transition: color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
749
|
+
}
|
|
678
750
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
> [data-ui='message'][data-part='root']:not(:first-child)
|
|
682
|
-
> [data-part='body']
|
|
683
|
-
> [data-part='bubble']:not([data-part='bubble'] ~ [data-part='bubble']) {
|
|
684
|
-
--_top-side: var(--_radius-joined);
|
|
685
|
-
}
|
|
751
|
+
:scope[data-part-bubble] > [data-part-more] > [data-ui-icon] {
|
|
752
|
+
--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
686
753
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
*
|
|
690
|
-
* A quick reply is the content itself as a `button`, a way out of the
|
|
691
|
-
* thread the content as an `a`. The pointer's answer is the ink laid over
|
|
692
|
-
* the ground — six and twelve per cent — which answers every painting and
|
|
693
|
-
* every tone with one rule: 0.03 OKLab lightness over the accent fill in
|
|
694
|
-
* `light`, 0.044 under the secondary ground, over the 0.02 step
|
|
695
|
-
* `theme-conformance` asks of a hover, and the press twice that.
|
|
696
|
-
*/
|
|
697
|
-
[data-ui='message'][data-part='bubble'] > [data-part='content']:is(button, a) {
|
|
698
|
-
--_ground-hover: color-mix(
|
|
699
|
-
in oklab,
|
|
700
|
-
var(--_ink) var(--slotted-message-state-layer-hover, 6%),
|
|
701
|
-
var(--_ground)
|
|
702
|
-
);
|
|
703
|
-
--_ground-active: color-mix(
|
|
704
|
-
in oklab,
|
|
705
|
-
var(--_ink) var(--slotted-message-state-layer-active, 12%),
|
|
706
|
-
var(--_ground)
|
|
707
|
-
);
|
|
708
|
-
|
|
709
|
-
appearance: none;
|
|
710
|
-
cursor: pointer;
|
|
711
|
-
transition:
|
|
712
|
-
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
713
|
-
border-color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
714
|
-
}
|
|
754
|
+
transition: rotate var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
|
|
755
|
+
}
|
|
715
756
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
padding-inline: var(--slotted-space-2, 0.25rem);
|
|
720
|
-
margin-inline: calc(var(--slotted-space-2, 0.25rem) * -1);
|
|
721
|
-
border-radius: var(--slotted-radius-sm, 4px);
|
|
722
|
-
}
|
|
757
|
+
:scope[data-part-bubble][data-revealed] > [data-part-more] > [data-ui-icon] {
|
|
758
|
+
rotate: 180deg;
|
|
759
|
+
}
|
|
723
760
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}
|
|
761
|
+
:scope[data-part-bubble] > [data-part-more]:hover:not(:disabled) {
|
|
762
|
+
color: var(--slotted-text);
|
|
763
|
+
}
|
|
728
764
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
}
|
|
765
|
+
:scope[data-part-bubble] > [data-part-more]:active:not(:disabled) {
|
|
766
|
+
color: var(--slotted-tone-accent-text);
|
|
767
|
+
}
|
|
733
768
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
769
|
+
:scope[data-part-bubble] > [data-part-more]:focus-visible {
|
|
770
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
771
|
+
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
772
|
+
}
|
|
738
773
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
* caption under itself for a fact this small.
|
|
747
|
-
*
|
|
748
|
-
* The box is the height of the words' line and its contents stand on that
|
|
749
|
-
* line's centre, a pixel down, where the twelve-pixel digits share the
|
|
750
|
-
* fourteen-pixel words' baseline to within a pixel and the mark sits on the
|
|
751
|
-
* same axis as the digits. WhatsApp hangs its meta below the baseline; set
|
|
752
|
-
* beside a line of text, the hanging meta read as misaligned. Read is the one state that changes the ink: full strength on a
|
|
753
|
-
* solid fill, the accent on a tinted one; the other marks differ by shape.
|
|
754
|
-
*/
|
|
755
|
-
[data-ui='message'][data-part='bubble'] [data-part='meta'] {
|
|
756
|
-
/*
|
|
757
|
-
* Ninety per cent of the bubble's ink: the lowest share at which the hour
|
|
758
|
-
* keeps 4.5:1 on every fill — 4.50 on the accent in `dark`, 5.74 in
|
|
759
|
-
* `light`, 8.39 in `high-contrast` against its 7:1 — measured in sRGB.
|
|
760
|
-
* Two thirds, the first choice, left it at 3.24 on the dark accent.
|
|
774
|
+
/* ── Quote ──────────────────────────────────────────────────────────────
|
|
775
|
+
*
|
|
776
|
+
* The message a reply answers, at the head of the surface: a block tinted
|
|
777
|
+
* with the surface's own ink, the author over two lines of the words. No
|
|
778
|
+
* rail on its start edge — a tinted block reads as quoted in every painting,
|
|
779
|
+
* the accent fill included, where a rail in the ink would be the only
|
|
780
|
+
* saturated stroke in the thread.
|
|
761
781
|
*/
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
782
|
+
:scope[data-part-bubble] [data-part-quote] {
|
|
783
|
+
display: block;
|
|
784
|
+
box-sizing: border-box;
|
|
785
|
+
inline-size: 100%;
|
|
786
|
+
margin: 0;
|
|
787
|
+
margin-block-end: var(--slotted-space-3, 0.375rem);
|
|
788
|
+
padding-block: var(--slotted-space-2, 0.25rem);
|
|
789
|
+
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
790
|
+
border: 0;
|
|
791
|
+
border-radius: calc(var(--_radius) - var(--_pad-block, 8px));
|
|
792
|
+
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
793
|
+
color: inherit;
|
|
794
|
+
font: inherit;
|
|
795
|
+
font-size: var(--slotted-control-font-size-md, 13px);
|
|
796
|
+
line-height: round(up, calc(1em * var(--slotted-line-height-md, 1.5)), 1px);
|
|
797
|
+
text-align: start;
|
|
798
|
+
unicode-bidi: plaintext;
|
|
799
|
+
overflow: hidden;
|
|
800
|
+
display: -webkit-box;
|
|
801
|
+
-webkit-box-orient: vertical;
|
|
802
|
+
-webkit-line-clamp: 3;
|
|
803
|
+
}
|
|
780
804
|
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
805
|
+
:scope[data-part-bubble] [data-part-quote-author] {
|
|
806
|
+
display: block;
|
|
807
|
+
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
808
|
+
}
|
|
784
809
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
810
|
+
:scope[data-part-bubble] button[data-part-quote] {
|
|
811
|
+
cursor: pointer;
|
|
812
|
+
transition: background-color var(--slotted-duration-short)
|
|
813
|
+
var(--slotted-easing-standard, ease);
|
|
814
|
+
}
|
|
789
815
|
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
* scratches.
|
|
794
|
-
*/
|
|
795
|
-
[data-ui='message'][data-part='bubble']
|
|
796
|
-
[data-part='meta']
|
|
797
|
-
[data-part='receipt']
|
|
798
|
-
> [data-ui='icon'] {
|
|
799
|
-
--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
800
|
-
}
|
|
816
|
+
:scope[data-part-bubble] button[data-part-quote]:hover:not(:disabled) {
|
|
817
|
+
background-color: color-mix(in oklab, currentColor 13%, transparent);
|
|
818
|
+
}
|
|
801
819
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
> span:not([data-ui]) {
|
|
806
|
-
position: absolute;
|
|
807
|
-
inline-size: 1px;
|
|
808
|
-
block-size: 1px;
|
|
809
|
-
overflow: hidden;
|
|
810
|
-
clip-path: inset(50%);
|
|
811
|
-
white-space: nowrap;
|
|
812
|
-
}
|
|
820
|
+
:scope[data-part-bubble] button[data-part-quote]:active:not(:disabled) {
|
|
821
|
+
background-color: color-mix(in oklab, currentColor 18%, transparent);
|
|
822
|
+
}
|
|
813
823
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
824
|
+
:scope[data-part-bubble] button[data-part-quote]:focus-visible {
|
|
825
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
826
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
827
|
+
}
|
|
819
828
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
829
|
+
/* ── Streaming text, caret and typing ──────────────────────────────────
|
|
830
|
+
*
|
|
831
|
+
* A streamed reply enters word by word. `stream` holds the settled words as
|
|
832
|
+
* plain text and each word still entering as a `stream-chunk`, whose delay
|
|
833
|
+
* the binding writes from `@slotted/core/text-stream`: a burst of forty
|
|
834
|
+
* words enters as a wave of at most 320 ms instead of landing as a block.
|
|
835
|
+
* A word comes out of a blur of a sixth of its own size, at nothing, and
|
|
836
|
+
* the ink and the edge arrive together: a word that is opaque while still
|
|
837
|
+
* blurred reads as a smudge, and five of them in a row as a smeared line.
|
|
838
|
+
*
|
|
839
|
+
* The caret is a dot after the last word, centerd on the middle of the
|
|
840
|
+
* x-height, breathing between full and 72 % while the reply is open. A bar
|
|
841
|
+
* blinking in two steps read as a text field waiting for input; the reply is
|
|
842
|
+
* not waiting for the reader, it is still being written. While words are
|
|
843
|
+
* entering, the wave is the leading edge and the dot steps aside: a word
|
|
844
|
+
* still invisible already holds its place in the line, and a dot after it
|
|
845
|
+
* would stand apart from the last word painted. It returns once the wave has
|
|
846
|
+
* landed and the transport has been quiet for a long transition.
|
|
847
|
+
*
|
|
848
|
+
* Under reduced motion the binding settles every word on arrival, the caret
|
|
849
|
+
* stands lit and the typing dots stand at three strengths, so the state is
|
|
850
|
+
* still drawn.
|
|
851
|
+
*/
|
|
852
|
+
:scope[data-part-bubble] [data-part-stream] {
|
|
853
|
+
white-space: pre-wrap;
|
|
854
|
+
}
|
|
828
855
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
856
|
+
:scope[data-part-bubble] [data-part-stream-chunk] {
|
|
857
|
+
animation: slotted-message-word var(--slotted-duration-long) var(--slotted-easing-standard)
|
|
858
|
+
both;
|
|
832
859
|
}
|
|
833
860
|
|
|
834
|
-
|
|
835
|
-
|
|
861
|
+
:scope[data-part-bubble] [data-part-caret] {
|
|
862
|
+
--_dot: round(nearest, 0.6em, 2px);
|
|
863
|
+
|
|
864
|
+
display: inline-block;
|
|
865
|
+
inline-size: var(--_dot);
|
|
866
|
+
block-size: var(--_dot);
|
|
867
|
+
/* A streamed word carries its own space; the margin only parts the dot from a word cut mid-way. */
|
|
868
|
+
margin-inline-start: var(--slotted-space-1, 0.125rem);
|
|
869
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
870
|
+
background-color: currentColor;
|
|
871
|
+
vertical-align: middle;
|
|
872
|
+
transition: filter var(--slotted-duration-medium) var(--slotted-easing-enter)
|
|
873
|
+
var(--slotted-duration-long);
|
|
874
|
+
animation:
|
|
875
|
+
slotted-message-dot-in var(--slotted-duration-medium) var(--slotted-easing-enter),
|
|
876
|
+
slotted-message-breathe var(--slotted-duration-loop) var(--slotted-easing-standard)
|
|
877
|
+
var(--slotted-duration-medium) infinite alternate;
|
|
836
878
|
}
|
|
837
|
-
}
|
|
838
879
|
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
880
|
+
/* `filter`, not `opacity`: the breath animates opacity, and an animation outranks the rule. */
|
|
881
|
+
:scope[data-part-bubble]
|
|
882
|
+
[data-part-stream]:has(> [data-part-stream-chunk])
|
|
883
|
+
+ [data-part-caret] {
|
|
884
|
+
filter: opacity(0);
|
|
885
|
+
transition: filter var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
886
|
+
}
|
|
843
887
|
|
|
844
|
-
/* ── Clamp ──────────────────────────────────────────────────────────────
|
|
845
|
-
*
|
|
846
|
-
* A long bubble shows its first lines and the rest stays in the DOM — for
|
|
847
|
-
* copying, for finding in the page and for a screen reader — behind a line
|
|
848
|
-
* clamp. `more` shows it whole; the binding draws `more` only while the
|
|
849
|
-
* text overflows.
|
|
850
|
-
*
|
|
851
|
-
* The reveal snaps. A line clamp is not an interpolable length, and the
|
|
852
|
-
* alternative — a measured height transitioned through script — makes the
|
|
853
|
-
* text jump twice when a reply streaming above it reflows the column. The
|
|
854
|
-
* chevron turning is the motion that answers the press.
|
|
855
|
-
*/
|
|
856
|
-
[data-ui='message'][data-part='bubble'][data-clamped]:not([data-revealed])
|
|
857
|
-
> [data-part='content'] {
|
|
858
|
-
display: -webkit-box;
|
|
859
|
-
-webkit-box-orient: vertical;
|
|
860
|
-
-webkit-line-clamp: var(--slotted-message-max-lines, 6);
|
|
861
888
|
/**
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
* the
|
|
865
|
-
*
|
|
889
|
+
* Three dots a third of the line tall — seven pixels at comfortable — that
|
|
890
|
+
* rise and brighten in a wave, each a sixth of the loop behind the one
|
|
891
|
+
* before, in the bubble of the person writing. The wave travels half a dot:
|
|
892
|
+
* enough to read as a voice, not so much that the bubble seems to bounce.
|
|
866
893
|
*/
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
padding-block: 0;
|
|
878
|
-
padding-inline: var(--_pad-inline, 12px);
|
|
879
|
-
border: 0;
|
|
880
|
-
border-radius: var(--slotted-control-radius, 4px);
|
|
881
|
-
background-color: transparent;
|
|
882
|
-
color: var(--slotted-text-muted);
|
|
883
|
-
font: inherit;
|
|
884
|
-
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
885
|
-
font-weight: var(--slotted-font-weight-medium, 500);
|
|
886
|
-
transition: color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
887
|
-
}
|
|
894
|
+
:scope[data-part-bubble] [data-part-typing] {
|
|
895
|
+
--_dot: round(calc(var(--_leading) / 3), 1px);
|
|
896
|
+
|
|
897
|
+
display: inline-flex;
|
|
898
|
+
align-items: center;
|
|
899
|
+
gap: calc(var(--_dot) * 0.6);
|
|
900
|
+
block-size: var(--_leading);
|
|
901
|
+
padding-inline: var(--slotted-space-1, 0.125rem);
|
|
902
|
+
vertical-align: top;
|
|
903
|
+
}
|
|
888
904
|
|
|
889
|
-
|
|
890
|
-
|
|
905
|
+
/**
|
|
906
|
+
* The bubble of someone writing trails two small circles from its foot on
|
|
907
|
+
* the sender's side, the way a thought is drawn, and arrives from them: it
|
|
908
|
+
* rises and fades in on the enter curve, and its trail follows one step
|
|
909
|
+
* behind. The circles are the surface's own fill and edge, so they answer
|
|
910
|
+
* every painting and every scheme with the bubble.
|
|
911
|
+
*/
|
|
912
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing]) {
|
|
913
|
+
position: relative;
|
|
914
|
+
padding-inline: calc(var(--_pad-inline) + var(--slotted-space-1, 0.125rem));
|
|
915
|
+
transition:
|
|
916
|
+
opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
|
|
917
|
+
translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out);
|
|
918
|
+
|
|
919
|
+
@starting-style {
|
|
920
|
+
opacity: 0;
|
|
921
|
+
translate: 0 var(--slotted-space-3, 0.375rem);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
891
924
|
|
|
892
|
-
|
|
893
|
-
|
|
925
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::before,
|
|
926
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::after {
|
|
927
|
+
content: '';
|
|
928
|
+
position: absolute;
|
|
929
|
+
box-sizing: border-box;
|
|
930
|
+
border: inherit;
|
|
931
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
932
|
+
background-color: inherit;
|
|
933
|
+
animation: slotted-message-trail var(--slotted-duration-loop-slow)
|
|
934
|
+
var(--slotted-easing-standard, ease) infinite alternate;
|
|
935
|
+
}
|
|
894
936
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
937
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::before {
|
|
938
|
+
inset-block-end: calc(var(--slotted-space-1, 0.125rem) * -1);
|
|
939
|
+
inset-inline-start: calc(var(--slotted-space-1, 0.125rem) * -1);
|
|
940
|
+
inline-size: var(--slotted-space-4, 0.5rem);
|
|
941
|
+
block-size: var(--slotted-space-4, 0.5rem);
|
|
942
|
+
}
|
|
898
943
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
944
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::after {
|
|
945
|
+
inset-block-end: calc(var(--slotted-space-3, 0.375rem) * -1);
|
|
946
|
+
inset-inline-start: calc(var(--slotted-space-3, 0.375rem) * -1);
|
|
947
|
+
inline-size: var(--slotted-space-2, 0.25rem);
|
|
948
|
+
block-size: var(--slotted-space-2, 0.25rem);
|
|
949
|
+
animation-delay: calc(var(--slotted-duration-loop-slow) / -2);
|
|
950
|
+
}
|
|
902
951
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
952
|
+
/** The line under a writing bubble clears the trail. */
|
|
953
|
+
:scope[data-part-root]
|
|
954
|
+
> [data-part-body]:has(> [data-part-bubble] [data-part-typing])
|
|
955
|
+
> [data-part-footer] {
|
|
956
|
+
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
957
|
+
}
|
|
906
958
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
959
|
+
:scope[data-part-bubble] [data-part-typing] > span {
|
|
960
|
+
inline-size: var(--_dot);
|
|
961
|
+
block-size: var(--_dot);
|
|
962
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
963
|
+
background-color: currentColor;
|
|
964
|
+
opacity: 0.3;
|
|
965
|
+
animation: slotted-message-typing var(--slotted-duration-loop)
|
|
966
|
+
var(--slotted-easing-standard, ease) infinite;
|
|
967
|
+
}
|
|
911
968
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
* with the surface's own ink, the author over two lines of the words. No
|
|
916
|
-
* rail on its start edge — a tinted block reads as quoted in every painting,
|
|
917
|
-
* the accent fill included, where a rail in the ink would be the only
|
|
918
|
-
* saturated stroke in the thread.
|
|
919
|
-
*/
|
|
920
|
-
[data-ui='message'][data-part='bubble'] [data-part='quote'] {
|
|
921
|
-
display: block;
|
|
922
|
-
box-sizing: border-box;
|
|
923
|
-
inline-size: 100%;
|
|
924
|
-
margin: 0;
|
|
925
|
-
margin-block-end: var(--slotted-space-3, 0.375rem);
|
|
926
|
-
padding-block: var(--slotted-space-2, 0.25rem);
|
|
927
|
-
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
928
|
-
border: 0;
|
|
929
|
-
border-radius: calc(var(--_radius) - var(--_pad-block, 8px));
|
|
930
|
-
background-color: color-mix(in oklab, currentColor 8%, transparent);
|
|
931
|
-
color: inherit;
|
|
932
|
-
font: inherit;
|
|
933
|
-
font-size: var(--slotted-control-font-size-md, 13px);
|
|
934
|
-
line-height: round(up, calc(1em * var(--slotted-line-height-md, 1.5)), 1px);
|
|
935
|
-
text-align: start;
|
|
936
|
-
unicode-bidi: plaintext;
|
|
937
|
-
overflow: hidden;
|
|
938
|
-
display: -webkit-box;
|
|
939
|
-
-webkit-box-orient: vertical;
|
|
940
|
-
-webkit-line-clamp: 3;
|
|
941
|
-
}
|
|
969
|
+
:scope[data-part-bubble] [data-part-typing] > span:nth-child(2) {
|
|
970
|
+
animation-delay: calc(var(--slotted-duration-loop) / 6);
|
|
971
|
+
}
|
|
942
972
|
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
}
|
|
973
|
+
:scope[data-part-bubble] [data-part-typing] > span:nth-child(3) {
|
|
974
|
+
animation-delay: calc(var(--slotted-duration-loop) / 3);
|
|
975
|
+
}
|
|
947
976
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
977
|
+
/**
|
|
978
|
+
* ── Retry ──────────────────────────────────────────────────────────────
|
|
979
|
+
*
|
|
980
|
+
* A message that did not go carries a round control beside its surface, on
|
|
981
|
+
* the side away from the sender, in the danger tone, centerd on the last
|
|
982
|
+
* line. It is the way to send it again, and its arrow turns a little under
|
|
983
|
+
* the pointer toward the way it will go.
|
|
984
|
+
*/
|
|
985
|
+
:scope[data-part-bubble] > [data-part-retry] {
|
|
986
|
+
--_size: max(var(--slotted-target-min, 24px), var(--slotted-control-inner-size-md, 24px));
|
|
987
|
+
--_ground: var(--slotted-tone-danger-solid);
|
|
952
988
|
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
989
|
+
display: inline-grid;
|
|
990
|
+
place-items: center;
|
|
991
|
+
position: absolute;
|
|
992
|
+
inset-block-end: calc(
|
|
993
|
+
(
|
|
994
|
+
var(--_leading) + 2 * var(--_pad-block) + 2 * var(--slotted-border-width-thin, 1px) -
|
|
995
|
+
var(--_size)
|
|
996
|
+
) /
|
|
997
|
+
2
|
|
998
|
+
);
|
|
999
|
+
inset-inline-start: calc(100% + var(--slotted-space-4, 0.5rem));
|
|
1000
|
+
box-sizing: border-box;
|
|
1001
|
+
inline-size: var(--_size);
|
|
1002
|
+
block-size: var(--_size);
|
|
1003
|
+
margin: 0;
|
|
1004
|
+
padding: 0;
|
|
1005
|
+
border: 0;
|
|
1006
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1007
|
+
background-color: var(--_ground);
|
|
1008
|
+
color: var(--slotted-tone-danger-on-solid);
|
|
1009
|
+
cursor: pointer;
|
|
1010
|
+
transition: background-color var(--slotted-duration-short)
|
|
1011
|
+
var(--slotted-easing-standard, ease);
|
|
1012
|
+
}
|
|
956
1013
|
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1014
|
+
:scope[data-part-root][data-align='end'] [data-part-bubble] > [data-part-retry] {
|
|
1015
|
+
inset-inline: auto calc(100% + var(--slotted-space-4, 0.5rem));
|
|
1016
|
+
}
|
|
960
1017
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
964
|
-
}
|
|
1018
|
+
:scope[data-part-bubble] > [data-part-retry] > [data-ui-icon] {
|
|
1019
|
+
--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
965
1020
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
* A streamed reply enters word by word. `stream` holds the settled words as
|
|
969
|
-
* plain text and each word still entering as a `stream-chunk`, whose delay
|
|
970
|
-
* the binding writes from `@slotted/core/text-stream`: a burst of forty
|
|
971
|
-
* words enters as a wave of at most 320 ms instead of landing as a block.
|
|
972
|
-
* A word comes out of a blur of a sixth of its own size, at nothing, and
|
|
973
|
-
* the ink and the edge arrive together: a word that is opaque while still
|
|
974
|
-
* blurred reads as a smudge, and five of them in a row as a smeared line.
|
|
975
|
-
*
|
|
976
|
-
* The caret is a dot after the last word, centred on the middle of the
|
|
977
|
-
* x-height, breathing between full and 72 % while the reply is open. A bar
|
|
978
|
-
* blinking in two steps read as a text field waiting for input; the reply is
|
|
979
|
-
* not waiting for the reader, it is still being written. While words are
|
|
980
|
-
* entering, the wave is the leading edge and the dot steps aside: a word
|
|
981
|
-
* still invisible already holds its place in the line, and a dot after it
|
|
982
|
-
* would stand apart from the last word painted. It returns once the wave has
|
|
983
|
-
* landed and the transport has been quiet for a long transition.
|
|
984
|
-
*
|
|
985
|
-
* Under reduced motion the binding settles every word on arrival, the caret
|
|
986
|
-
* stands lit and the typing dots stand at three strengths, so the state is
|
|
987
|
-
* still drawn.
|
|
988
|
-
*/
|
|
989
|
-
[data-ui='message'][data-part='bubble'] [data-part='stream'] {
|
|
990
|
-
white-space: pre-wrap;
|
|
991
|
-
}
|
|
1021
|
+
transition: rotate var(--slotted-duration-medium) var(--slotted-easing-emphasized, ease);
|
|
1022
|
+
}
|
|
992
1023
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1024
|
+
/**
|
|
1025
|
+
* The tone's own hover step sits 0.01 OKLab lightness from its fill, under
|
|
1026
|
+
* the 0.02 `theme-conformance` asks; the control's ink laid over the fill at
|
|
1027
|
+
* fourteen per cent answers visibly in every scheme.
|
|
1028
|
+
*/
|
|
1029
|
+
:scope[data-part-bubble] > [data-part-retry]:hover:not(:disabled):not([data-disabled]) {
|
|
1030
|
+
background-color: color-mix(
|
|
1031
|
+
in oklab,
|
|
1032
|
+
var(--slotted-tone-danger-on-solid) var(--slotted-message-retry-state-layer, 14%),
|
|
1033
|
+
var(--_ground)
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
996
1036
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1037
|
+
:scope[data-part-bubble]
|
|
1038
|
+
> [data-part-retry]:hover:not(:disabled):not([data-disabled])
|
|
1039
|
+
> [data-ui-icon] {
|
|
1040
|
+
rotate: -45deg;
|
|
1001
1041
|
}
|
|
1002
1042
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
filter: blur(0);
|
|
1043
|
+
:scope[data-part-bubble] > [data-part-retry]:active:not(:disabled):not([data-disabled]) {
|
|
1044
|
+
background-color: var(--slotted-tone-danger-solid-active);
|
|
1006
1045
|
}
|
|
1007
|
-
}
|
|
1008
1046
|
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
inline-size: var(--_dot);
|
|
1014
|
-
block-size: var(--_dot);
|
|
1015
|
-
/* A streamed word carries its own space; the margin only parts the dot from a word cut mid-way. */
|
|
1016
|
-
margin-inline-start: var(--slotted-space-1, 0.125rem);
|
|
1017
|
-
border-radius: var(--slotted-radius-full, 9999px);
|
|
1018
|
-
background-color: currentColor;
|
|
1019
|
-
vertical-align: middle;
|
|
1020
|
-
transition: filter var(--slotted-duration-medium) var(--slotted-easing-enter)
|
|
1021
|
-
var(--slotted-duration-long);
|
|
1022
|
-
animation:
|
|
1023
|
-
slotted-message-dot-in var(--slotted-duration-medium) var(--slotted-easing-enter),
|
|
1024
|
-
slotted-message-breathe var(--slotted-duration-loop) var(--slotted-easing-standard)
|
|
1025
|
-
var(--slotted-duration-medium) infinite alternate;
|
|
1026
|
-
}
|
|
1047
|
+
:scope[data-part-bubble] > [data-part-retry]:focus-visible {
|
|
1048
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
1049
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
1050
|
+
}
|
|
1027
1051
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1052
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1053
|
+
:scope[data-part-bubble] [data-part-caret],
|
|
1054
|
+
:scope[data-part-bubble] [data-part-stream-chunk],
|
|
1055
|
+
:scope[data-part-bubble] [data-part-typing] > span,
|
|
1056
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::before,
|
|
1057
|
+
:scope[data-part-bubble] > [data-part-content]:has(> [data-part-typing])::after,
|
|
1058
|
+
:scope[data-part-bubble]
|
|
1059
|
+
[data-part-meta]
|
|
1060
|
+
[data-part-receipt][data-status='sending']
|
|
1061
|
+
> [data-ui-icon] {
|
|
1062
|
+
animation: none;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
:scope[data-part-bubble] [data-part-typing] > span:nth-child(2) {
|
|
1066
|
+
opacity: 0.55;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
:scope[data-part-bubble] [data-part-typing] > span:nth-child(3) {
|
|
1070
|
+
opacity: 0.8;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1035
1073
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1074
|
+
/* ── Reactions ──────────────────────────────────────────────────────────
|
|
1075
|
+
*
|
|
1076
|
+
* A raised pill straddling the lower edge of the surface on the side away
|
|
1077
|
+
* from the sender. It rises into the surface by half the surface's own
|
|
1078
|
+
* inset, clear of the descenders of the last line; the bubble keeps the rest as room
|
|
1079
|
+
* below itself, so the pill never lands on the next message. ReUI hangs
|
|
1080
|
+
* the row three quarters out and its example needs a 32-pixel gap to clear
|
|
1081
|
+
* it (`c-bubble-4`). The pill draws its own edge and lift rather than a
|
|
1082
|
+
* ring in the color of a card it assumes it is on.
|
|
1083
|
+
*/
|
|
1084
|
+
:scope[data-part-bubble]:has(> [data-part-reactions]) {
|
|
1085
|
+
padding-block-end: calc(var(--_reactions-size) - var(--_pad-block, 8px) / 2);
|
|
1040
1086
|
}
|
|
1041
|
-
}
|
|
1042
1087
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1088
|
+
:scope[data-part-bubble] > [data-part-reactions] {
|
|
1089
|
+
display: inline-flex;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
1092
|
+
position: absolute;
|
|
1093
|
+
inset-block-end: 0;
|
|
1094
|
+
inset-inline-end: var(--_pad-inline, 12px);
|
|
1095
|
+
padding: var(--slotted-space-1, 0.125rem);
|
|
1096
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
1097
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1098
|
+
background-color: var(--slotted-surface-raised);
|
|
1099
|
+
box-shadow: var(--slotted-shadow-xs);
|
|
1048
1100
|
}
|
|
1049
1101
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
scale: 0.72;
|
|
1102
|
+
:scope[data-part-root][data-align='end'] [data-part-bubble] > [data-part-reactions] {
|
|
1103
|
+
inset-inline: var(--_pad-inline, 12px) auto;
|
|
1053
1104
|
}
|
|
1054
|
-
}
|
|
1055
1105
|
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
--_dot: round(calc(var(--_leading) / 3), 1px);
|
|
1064
|
-
|
|
1065
|
-
display: inline-flex;
|
|
1066
|
-
align-items: center;
|
|
1067
|
-
gap: calc(var(--_dot) * 0.6);
|
|
1068
|
-
block-size: var(--_leading);
|
|
1069
|
-
padding-inline: var(--slotted-space-1, 0.125rem);
|
|
1070
|
-
vertical-align: top;
|
|
1071
|
-
}
|
|
1106
|
+
/**
|
|
1107
|
+
* In a thread there is no surface to straddle: the reactions are a row in
|
|
1108
|
+
* the flow under the words, the way Slack and GitHub set them.
|
|
1109
|
+
*/
|
|
1110
|
+
:scope[data-part-bubble][data-variant='plain']:has(> [data-part-reactions]) {
|
|
1111
|
+
padding-block-end: 0;
|
|
1112
|
+
}
|
|
1072
1113
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
[data-ui='message'][data-part='bubble'] > [data-part='content']:has(> [data-part='typing']) {
|
|
1081
|
-
position: relative;
|
|
1082
|
-
padding-inline: calc(var(--_pad-inline) + var(--slotted-space-1, 0.125rem));
|
|
1083
|
-
transition:
|
|
1084
|
-
opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
|
|
1085
|
-
translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out);
|
|
1086
|
-
|
|
1087
|
-
@starting-style {
|
|
1088
|
-
opacity: 0;
|
|
1089
|
-
translate: 0 var(--slotted-space-3, 0.375rem);
|
|
1114
|
+
:scope[data-part-bubble][data-variant='plain'] > [data-part-reactions] {
|
|
1115
|
+
position: static;
|
|
1116
|
+
padding: 0;
|
|
1117
|
+
border: 0;
|
|
1118
|
+
background-color: transparent;
|
|
1119
|
+
box-shadow: none;
|
|
1120
|
+
translate: none;
|
|
1090
1121
|
}
|
|
1091
|
-
}
|
|
1092
1122
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1123
|
+
:scope[data-part-bubble] [data-part-reaction] {
|
|
1124
|
+
display: inline-flex;
|
|
1125
|
+
align-items: center;
|
|
1126
|
+
gap: var(--slotted-space-1, 0.125rem);
|
|
1127
|
+
box-sizing: border-box;
|
|
1128
|
+
min-inline-size: var(--_reactions-size);
|
|
1129
|
+
block-size: var(--_reactions-size);
|
|
1130
|
+
margin: 0;
|
|
1131
|
+
padding-block: 0;
|
|
1132
|
+
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1133
|
+
--_reaction-ground: transparent;
|
|
1134
|
+
|
|
1135
|
+
border: var(--slotted-border-width-thin, 1px) solid transparent;
|
|
1136
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
1137
|
+
background-color: var(--_reaction-ground);
|
|
1138
|
+
color: var(--slotted-text);
|
|
1139
|
+
font: inherit;
|
|
1140
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1141
|
+
line-height: 1;
|
|
1142
|
+
transition:
|
|
1143
|
+
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
1144
|
+
border-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
1145
|
+
color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
1146
|
+
}
|
|
1106
1147
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
inset-block-end: calc(var(--slotted-space-1, 0.125rem) * -1);
|
|
1110
|
-
inset-inline-start: calc(var(--slotted-space-1, 0.125rem) * -1);
|
|
1111
|
-
inline-size: var(--slotted-space-4, 0.5rem);
|
|
1112
|
-
block-size: var(--slotted-space-4, 0.5rem);
|
|
1113
|
-
}
|
|
1148
|
+
:scope[data-part-bubble][data-variant='plain'] [data-part-reaction] {
|
|
1149
|
+
--_reaction-ground: var(--slotted-surface);
|
|
1114
1150
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
inset-block-end: calc(var(--slotted-space-3, 0.375rem) * -1);
|
|
1118
|
-
inset-inline-start: calc(var(--slotted-space-3, 0.375rem) * -1);
|
|
1119
|
-
inline-size: var(--slotted-space-2, 0.25rem);
|
|
1120
|
-
block-size: var(--slotted-space-2, 0.25rem);
|
|
1121
|
-
animation-delay: calc(var(--slotted-duration-loop-slow) / -2);
|
|
1122
|
-
}
|
|
1151
|
+
border-color: var(--slotted-border-subtle);
|
|
1152
|
+
}
|
|
1123
1153
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
}
|
|
1154
|
+
:scope[data-part-bubble] [data-part-reaction-count] {
|
|
1155
|
+
color: var(--slotted-text-muted);
|
|
1156
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
1157
|
+
font-variant-numeric: tabular-nums;
|
|
1158
|
+
}
|
|
1130
1159
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1160
|
+
/**
|
|
1161
|
+
* The pointer answers on whatever ground the reaction stands on — none, the
|
|
1162
|
+
* page, or the accent's tint when it is the reader's own — with the text's
|
|
1163
|
+
* ink laid over it at six and twelve per cent, so a pressed reaction answers
|
|
1164
|
+
* a hover and a press as clearly as a bare one and the two never match.
|
|
1165
|
+
*/
|
|
1166
|
+
:scope[data-part-bubble] [data-part-reaction]:hover:not(:disabled):not([data-disabled]) {
|
|
1167
|
+
background-color: color-mix(
|
|
1168
|
+
in oklab,
|
|
1169
|
+
var(--slotted-text) var(--slotted-message-state-layer-hover, 6%),
|
|
1170
|
+
var(--_reaction-ground)
|
|
1171
|
+
);
|
|
1134
1172
|
}
|
|
1135
1173
|
|
|
1136
|
-
|
|
1137
|
-
|
|
1174
|
+
:scope[data-part-bubble] [data-part-reaction]:active:not(:disabled):not([data-disabled]) {
|
|
1175
|
+
background-color: color-mix(
|
|
1176
|
+
in oklab,
|
|
1177
|
+
var(--slotted-text) var(--slotted-message-state-layer-active, 12%),
|
|
1178
|
+
var(--_reaction-ground)
|
|
1179
|
+
);
|
|
1138
1180
|
}
|
|
1139
|
-
}
|
|
1140
1181
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
var(--slotted-easing-standard, ease) infinite;
|
|
1149
|
-
}
|
|
1182
|
+
/**
|
|
1183
|
+
* The reader's own reaction: the accent's tinted ground inside the accent's
|
|
1184
|
+
* edge, and the count in the accent's ink. The pair carries the ratio the
|
|
1185
|
+
* ground alone cannot (`docs/token-foundation.md` › Semantic color).
|
|
1186
|
+
*/
|
|
1187
|
+
:scope[data-part-bubble] [data-part-reaction][data-pressed] {
|
|
1188
|
+
--_reaction-ground: var(--slotted-tone-accent-surface);
|
|
1150
1189
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}
|
|
1190
|
+
border-color: var(--slotted-tone-accent-border);
|
|
1191
|
+
}
|
|
1154
1192
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1193
|
+
:scope[data-part-bubble] [data-part-reaction][data-pressed] > [data-part-reaction-count] {
|
|
1194
|
+
color: var(--slotted-tone-accent-text);
|
|
1195
|
+
}
|
|
1158
1196
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
100% {
|
|
1163
|
-
opacity: 0.3;
|
|
1164
|
-
translate: 0 0;
|
|
1197
|
+
:scope[data-part-bubble] [data-part-reaction]:is(:disabled, [data-disabled]) {
|
|
1198
|
+
color: var(--slotted-disabled-foreground);
|
|
1199
|
+
cursor: default;
|
|
1165
1200
|
}
|
|
1166
1201
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1202
|
+
:scope[data-part-bubble] [data-part-reaction]:focus-visible {
|
|
1203
|
+
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
|
|
1204
|
+
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
/* ── Forced colors ─────────────────────────────────────────────────────
|
|
1208
|
+
*
|
|
1209
|
+
* The system owns the palette: every bubble is a framed box of text, the
|
|
1210
|
+
* reader's own reaction is `Highlight`, and the tints of the quote and the
|
|
1211
|
+
* pointer go, because `color-mix` over system colors is not a color the
|
|
1212
|
+
* reader chose.
|
|
1213
|
+
*/
|
|
1214
|
+
@media (forced-colors: active) {
|
|
1215
|
+
:scope[data-part-bubble] > [data-part-content] {
|
|
1216
|
+
border-color: CanvasText;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
/* A background is the system's to repaint; the dot is ink, so it keeps the text's color. */
|
|
1220
|
+
:scope[data-part-bubble] [data-part-caret] {
|
|
1221
|
+
forced-color-adjust: none;
|
|
1222
|
+
background-color: CanvasText;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
:scope[data-part-bubble][data-variant='plain'] > [data-part-content] {
|
|
1226
|
+
border-color: transparent;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
:scope[data-part-bubble] [data-part-reaction][data-pressed] {
|
|
1230
|
+
border-color: Highlight;
|
|
1231
|
+
forced-color-adjust: none;
|
|
1232
|
+
background-color: Highlight;
|
|
1233
|
+
color: HighlightText;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
:scope[data-part-bubble] [data-part-quote] {
|
|
1237
|
+
border: var(--slotted-border-width-thin, 1px) solid CanvasText;
|
|
1238
|
+
}
|
|
1170
1239
|
}
|
|
1171
1240
|
}
|
|
1172
1241
|
|
|
1173
1242
|
/**
|
|
1174
|
-
*
|
|
1175
|
-
*
|
|
1176
|
-
*
|
|
1177
|
-
*
|
|
1178
|
-
* line. It is the way to send it again, and its arrow turns a little under
|
|
1179
|
-
* the pointer toward the way it will go.
|
|
1243
|
+
* The activity is scoped to itself rather than to the message root. A body
|
|
1244
|
+
* can fold it inside another family (a `Collapsible` panel), and that
|
|
1245
|
+
* family's parts end the message scope above it. The row's custom
|
|
1246
|
+
* properties reach it by inheritance.
|
|
1180
1247
|
*/
|
|
1181
|
-
[data-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1248
|
+
@scope ([data-part-activity]) {
|
|
1249
|
+
/* ── Activity ───────────────────────────────────────────────────────────
|
|
1250
|
+
*
|
|
1251
|
+
* What a reply is doing before it has words, as a short log of steps on a
|
|
1252
|
+
* raised card: the steps already done carry a tick and step back into the
|
|
1253
|
+
* muted ink, and the step in progress carries the shared ring (`spinner`)
|
|
1254
|
+
* and a band of light that travels across its words. A single step is the
|
|
1255
|
+
* same card with one line. ReUI's `c-message-7` draws one muted line that
|
|
1256
|
+
* pulses; the log says what has been done, not only that something is.
|
|
1257
|
+
*
|
|
1258
|
+
* The band is the one place the family paints text with a gradient, which
|
|
1259
|
+
* the polish lens refuses as decoration: here it is the wait itself, it
|
|
1260
|
+
* moves only while the step is current, and under reduced motion the words
|
|
1261
|
+
* stand in the plain ink.
|
|
1262
|
+
*/
|
|
1263
|
+
:scope {
|
|
1264
|
+
--_tile-surface: var(--slotted-surface);
|
|
1265
|
+
|
|
1266
|
+
display: inline-flex;
|
|
1267
|
+
flex-direction: column;
|
|
1268
|
+
gap: var(--slotted-message-activity-gap, var(--slotted-space-3, 0.375rem));
|
|
1269
|
+
box-sizing: border-box;
|
|
1270
|
+
max-inline-size: 100%;
|
|
1271
|
+
padding-block: var(--_pad-block);
|
|
1272
|
+
padding-inline: var(--_pad-inline) calc(var(--_pad-inline) + var(--slotted-space-2, 0.25rem));
|
|
1273
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
1274
|
+
border-radius: calc(var(--_pad-block) * 2);
|
|
1275
|
+
background-color: var(--slotted-surface-raised);
|
|
1276
|
+
box-shadow: var(--slotted-shadow-xs);
|
|
1277
|
+
color: var(--slotted-text-muted);
|
|
1278
|
+
font-size: var(--slotted-control-font-size-md, 13px);
|
|
1279
|
+
line-height: round(up, calc(1em * var(--slotted-line-height-md, 1.5)), 1px);
|
|
1280
|
+
}
|
|
1208
1281
|
|
|
1209
|
-
|
|
1210
|
-
[data-
|
|
1211
|
-
|
|
1212
|
-
inset-inline: auto calc(100% + var(--slotted-space-4, 0.5rem));
|
|
1213
|
-
}
|
|
1282
|
+
/* On a rail, with no bubbles, a frame is a block floating in the turn. */
|
|
1283
|
+
:scope[data-variant='plain'] {
|
|
1284
|
+
--_tile-surface: var(--slotted-surface-raised);
|
|
1214
1285
|
|
|
1215
|
-
|
|
1216
|
-
|
|
1286
|
+
padding: 0;
|
|
1287
|
+
border: 0;
|
|
1288
|
+
border-radius: 0;
|
|
1289
|
+
background-color: transparent;
|
|
1290
|
+
box-shadow: none;
|
|
1291
|
+
}
|
|
1217
1292
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1293
|
+
[data-part-activity-step] {
|
|
1294
|
+
display: flex;
|
|
1295
|
+
align-items: center;
|
|
1296
|
+
gap: var(--slotted-message-activity-step-gap, var(--slotted-space-4, 0.5rem));
|
|
1297
|
+
min-inline-size: 0;
|
|
1298
|
+
transition:
|
|
1299
|
+
opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
|
|
1300
|
+
translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
|
|
1301
|
+
color var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
|
|
1302
|
+
|
|
1303
|
+
@starting-style {
|
|
1304
|
+
opacity: 0;
|
|
1305
|
+
translate: 0 var(--slotted-message-activity-rise, var(--slotted-space-2, 0.25rem));
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1220
1308
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
*/
|
|
1226
|
-
[data-ui='message'][data-part='bubble']
|
|
1227
|
-
> [data-part='retry']:hover:not(:disabled):not([data-disabled]) {
|
|
1228
|
-
background-color: color-mix(
|
|
1229
|
-
in oklab,
|
|
1230
|
-
var(--slotted-tone-danger-on-solid) var(--slotted-message-retry-state-layer, 14%),
|
|
1231
|
-
var(--_ground)
|
|
1232
|
-
);
|
|
1233
|
-
}
|
|
1309
|
+
/** The mark column: a tick, or the ring, in one box so the words line up. */
|
|
1310
|
+
[data-part-activity-step] > :first-child {
|
|
1311
|
+
--slotted-icon-size: var(--_glyph-size);
|
|
1312
|
+
--slotted-spinner-size: var(--_glyph-size);
|
|
1234
1313
|
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1314
|
+
display: inline-grid;
|
|
1315
|
+
flex: none;
|
|
1316
|
+
place-items: center;
|
|
1317
|
+
inline-size: var(--_glyph-size);
|
|
1318
|
+
block-size: var(--_glyph-size);
|
|
1319
|
+
}
|
|
1240
1320
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1321
|
+
[data-part-activity-step][data-complete] > :first-child {
|
|
1322
|
+
color: var(--slotted-message-activity-color-complete, var(--slotted-tone-success-text));
|
|
1323
|
+
}
|
|
1245
1324
|
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1325
|
+
/**
|
|
1326
|
+
* The source of a step, in a tile: the icon of what the step consulted,
|
|
1327
|
+
* and the tick in its place once the step is complete. The tile is edged
|
|
1328
|
+
* in the accent while the step is current, which is the state the ring
|
|
1329
|
+
* says where no icon is given. Its ground is a step away from what it
|
|
1330
|
+
* stands on: the surface inside the raised frame, the raised surface where
|
|
1331
|
+
* there is no frame.
|
|
1332
|
+
*/
|
|
1333
|
+
[data-part-activity-step] > [data-part-activity-step-icon] {
|
|
1334
|
+
--_tile-glyph: var(--slotted-message-activity-icon-glyph-size, 0.75rem);
|
|
1335
|
+
--slotted-icon-size: var(--_tile-glyph);
|
|
1250
1336
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
> [data-part='content']:has(> [data-part='typing'])::after,
|
|
1259
|
-
[data-ui='message'][data-part='bubble']
|
|
1260
|
-
[data-part='meta']
|
|
1261
|
-
[data-part='receipt'][data-status='sending']
|
|
1262
|
-
> [data-ui='icon'] {
|
|
1263
|
-
animation: none;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
[data-ui='message'][data-part='root'] [data-part='activity-step'][data-current] > :last-child {
|
|
1267
|
-
animation: none;
|
|
1268
|
-
background-image: none;
|
|
1269
|
-
color: inherit;
|
|
1337
|
+
inline-size: var(--slotted-message-activity-icon-size, 1.375rem);
|
|
1338
|
+
block-size: var(--slotted-message-activity-icon-size, 1.375rem);
|
|
1339
|
+
box-sizing: border-box;
|
|
1340
|
+
border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
|
|
1341
|
+
border-radius: var(--slotted-message-activity-icon-radius, var(--slotted-radius-md, 6px));
|
|
1342
|
+
background-color: var(--slotted-message-activity-icon-surface, var(--_tile-surface));
|
|
1343
|
+
transition: border-color var(--slotted-duration-medium) var(--slotted-easing-standard, ease);
|
|
1270
1344
|
}
|
|
1271
1345
|
|
|
1272
|
-
[data-
|
|
1273
|
-
|
|
1346
|
+
[data-part-activity-step-icon] > svg {
|
|
1347
|
+
inline-size: var(--_tile-glyph);
|
|
1348
|
+
block-size: var(--_tile-glyph);
|
|
1274
1349
|
}
|
|
1275
1350
|
|
|
1276
|
-
[data-
|
|
1277
|
-
|
|
1351
|
+
[data-part-activity-step][data-current] > [data-part-activity-step-icon] {
|
|
1352
|
+
border-color: var(
|
|
1353
|
+
--slotted-message-activity-icon-border-color-current,
|
|
1354
|
+
var(--slotted-tone-accent-border)
|
|
1355
|
+
);
|
|
1278
1356
|
}
|
|
1279
|
-
}
|
|
1280
1357
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
* from the sender. It rises into the surface by half the surface's own
|
|
1285
|
-
* inset, clear of the descenders of the last line; the bubble keeps the rest as room
|
|
1286
|
-
* below itself, so the pill never lands on the next message. ReUI hangs
|
|
1287
|
-
* the row three quarters out and its example needs a 32-pixel gap to clear
|
|
1288
|
-
* it (`c-bubble-4`). The pill draws its own edge and lift rather than a
|
|
1289
|
-
* ring in the colour of a card it assumes it is on.
|
|
1290
|
-
*/
|
|
1291
|
-
[data-ui='message'][data-part='bubble']:has(> [data-part='reactions']) {
|
|
1292
|
-
padding-block-end: calc(var(--_reactions-size) - var(--_pad-block, 8px) / 2);
|
|
1293
|
-
}
|
|
1358
|
+
[data-part-activity-step][data-current] {
|
|
1359
|
+
color: var(--slotted-text);
|
|
1360
|
+
}
|
|
1294
1361
|
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1362
|
+
[data-part-activity-step][data-current] > :first-child {
|
|
1363
|
+
color: var(--slotted-tone-accent-text);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
:scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
|
|
1367
|
+
--_base: color-mix(in oklab, var(--slotted-text) 72%, var(--slotted-text-muted));
|
|
1368
|
+
|
|
1369
|
+
background-image: linear-gradient(
|
|
1370
|
+
90deg,
|
|
1371
|
+
var(--_base) 0%,
|
|
1372
|
+
var(--_base) 38%,
|
|
1373
|
+
var(--slotted-text-muted) 50%,
|
|
1374
|
+
var(--_base) 62%,
|
|
1375
|
+
var(--_base) 100%
|
|
1376
|
+
);
|
|
1377
|
+
background-size: 220% 100%;
|
|
1378
|
+
background-clip: text;
|
|
1379
|
+
color: transparent;
|
|
1380
|
+
animation: slotted-message-sweep var(--slotted-duration-loop-slow) linear infinite;
|
|
1381
|
+
}
|
|
1308
1382
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1383
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1384
|
+
:scope[data-shimmer] [data-part-activity-step][data-current] > :last-child {
|
|
1385
|
+
animation: none;
|
|
1386
|
+
background-image: none;
|
|
1387
|
+
color: inherit;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1313
1390
|
}
|
|
1314
1391
|
|
|
1315
1392
|
/**
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1393
|
+
* ── The corners of a run ───────────────────────────────────────────────
|
|
1394
|
+
*
|
|
1395
|
+
* Bubbles that follow one another from one sender draw in the corners that
|
|
1396
|
+
* face each other on the sender's side, inside one row and across the rows
|
|
1397
|
+
* of a group. A run reads as one speaker by its shape, with no position
|
|
1398
|
+
* prop on each message (Chatscope asks for `first`, `normal`, `last`).
|
|
1399
|
+
*
|
|
1400
|
+
* A bubble that follows a bubble is its sibling, outside the scope the
|
|
1401
|
+
* first bubble roots, so these rules stand outside the family's `@scope`.
|
|
1318
1402
|
*/
|
|
1319
|
-
[data-ui
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
padding: 0;
|
|
1326
|
-
border: 0;
|
|
1327
|
-
background-color: transparent;
|
|
1328
|
-
box-shadow: none;
|
|
1329
|
-
translate: none;
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
[data-ui='message'][data-part='bubble'] [data-part='reaction'] {
|
|
1333
|
-
display: inline-flex;
|
|
1334
|
-
align-items: center;
|
|
1335
|
-
gap: var(--slotted-space-1, 0.125rem);
|
|
1336
|
-
box-sizing: border-box;
|
|
1337
|
-
min-inline-size: var(--_reactions-size);
|
|
1338
|
-
block-size: var(--_reactions-size);
|
|
1339
|
-
margin: 0;
|
|
1340
|
-
padding-block: 0;
|
|
1341
|
-
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
1342
|
-
--_reaction-ground: transparent;
|
|
1343
|
-
|
|
1344
|
-
border: var(--slotted-border-width-thin, 1px) solid transparent;
|
|
1345
|
-
border-radius: var(--slotted-radius-full, 9999px);
|
|
1346
|
-
background-color: var(--_reaction-ground);
|
|
1347
|
-
color: var(--slotted-text);
|
|
1348
|
-
font: inherit;
|
|
1349
|
-
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
1350
|
-
line-height: 1;
|
|
1351
|
-
transition:
|
|
1352
|
-
background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
1353
|
-
border-color var(--slotted-duration-short) var(--slotted-easing-standard, ease),
|
|
1354
|
-
color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
[data-ui='message'][data-part='bubble'][data-variant='plain'] [data-part='reaction'] {
|
|
1358
|
-
--_reaction-ground: var(--slotted-surface);
|
|
1359
|
-
|
|
1360
|
-
border-color: var(--slotted-border-subtle);
|
|
1403
|
+
[data-ui-message][data-part-bubble]:has(~ [data-part-bubble]),
|
|
1404
|
+
[data-ui-message][data-part-group]
|
|
1405
|
+
> [data-ui-message][data-part-root]:not(:last-child)
|
|
1406
|
+
> [data-part-body]
|
|
1407
|
+
> [data-part-bubble]:not(:has(~ [data-part-bubble])) {
|
|
1408
|
+
--_bottom-side: var(--_radius-joined);
|
|
1361
1409
|
}
|
|
1362
1410
|
|
|
1363
|
-
[data-ui
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1411
|
+
[data-ui-message][data-part-bubble] ~ [data-part-bubble],
|
|
1412
|
+
[data-ui-message][data-part-group]
|
|
1413
|
+
> [data-ui-message][data-part-root]:not(:first-child)
|
|
1414
|
+
> [data-part-body]
|
|
1415
|
+
> [data-part-bubble]:not([data-part-bubble] ~ [data-part-bubble]) {
|
|
1416
|
+
--_top-side: var(--_radius-joined);
|
|
1367
1417
|
}
|
|
1368
1418
|
|
|
1369
1419
|
/**
|
|
1370
|
-
*
|
|
1371
|
-
*
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1420
|
+
* A bubble is as wide as its words. Prose — markdown's typography — is a size
|
|
1421
|
+
* container for its narrow-column rules, and a size container contributes no
|
|
1422
|
+
* width, so the bubble shrank to its padding. Inside a bubble prose sizes to
|
|
1423
|
+
* its text and its narrow-column rules do not apply. Prose sits inside the
|
|
1424
|
+
* markdown family, past the limit of the scope above, so the rule stands
|
|
1425
|
+
* outside it.
|
|
1374
1426
|
*/
|
|
1375
|
-
[data-ui
|
|
1376
|
-
|
|
1377
|
-
background-color: color-mix(
|
|
1378
|
-
in oklab,
|
|
1379
|
-
var(--slotted-text) var(--slotted-message-state-layer-hover, 6%),
|
|
1380
|
-
var(--_reaction-ground)
|
|
1381
|
-
);
|
|
1427
|
+
[data-ui-message][data-part-bubble] > [data-part-content] [data-ui-prose] {
|
|
1428
|
+
container-type: normal;
|
|
1382
1429
|
}
|
|
1383
1430
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1431
|
+
@keyframes slotted-message-sweep {
|
|
1432
|
+
from {
|
|
1433
|
+
background-position: 100% 0;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
to {
|
|
1437
|
+
background-position: 0% 0;
|
|
1438
|
+
}
|
|
1391
1439
|
}
|
|
1392
1440
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
*/
|
|
1398
|
-
[data-ui='message'][data-part='bubble'] [data-part='reaction'][data-pressed] {
|
|
1399
|
-
--_reaction-ground: var(--slotted-tone-accent-surface);
|
|
1441
|
+
@keyframes slotted-message-pending {
|
|
1442
|
+
from {
|
|
1443
|
+
opacity: 1;
|
|
1444
|
+
}
|
|
1400
1445
|
|
|
1401
|
-
|
|
1446
|
+
to {
|
|
1447
|
+
opacity: 0.4;
|
|
1448
|
+
}
|
|
1402
1449
|
}
|
|
1403
1450
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1451
|
+
@keyframes slotted-message-word {
|
|
1452
|
+
from {
|
|
1453
|
+
opacity: 0;
|
|
1454
|
+
filter: blur(0.16em);
|
|
1455
|
+
}
|
|
1409
1456
|
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1457
|
+
to {
|
|
1458
|
+
opacity: 1;
|
|
1459
|
+
filter: blur(0);
|
|
1460
|
+
}
|
|
1413
1461
|
}
|
|
1414
1462
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1463
|
+
@keyframes slotted-message-dot-in {
|
|
1464
|
+
from {
|
|
1465
|
+
opacity: 0;
|
|
1466
|
+
scale: 0;
|
|
1467
|
+
}
|
|
1418
1468
|
}
|
|
1419
1469
|
|
|
1420
|
-
/*
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
* reader chose.
|
|
1426
|
-
*/
|
|
1427
|
-
@media (forced-colors: active) {
|
|
1428
|
-
[data-ui='message'][data-part='bubble'] > [data-part='content'] {
|
|
1429
|
-
border-color: CanvasText;
|
|
1470
|
+
/* 0.72 of 8 px is 5.76: the breath is seen, and the dot never shrinks to a full stop's 2 px. */
|
|
1471
|
+
@keyframes slotted-message-breathe {
|
|
1472
|
+
from {
|
|
1473
|
+
opacity: 1;
|
|
1474
|
+
scale: 1;
|
|
1430
1475
|
}
|
|
1431
1476
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
background-color: CanvasText;
|
|
1477
|
+
to {
|
|
1478
|
+
opacity: 0.5;
|
|
1479
|
+
scale: 0.72;
|
|
1436
1480
|
}
|
|
1481
|
+
}
|
|
1437
1482
|
|
|
1438
|
-
|
|
1439
|
-
|
|
1483
|
+
@keyframes slotted-message-trail {
|
|
1484
|
+
from {
|
|
1485
|
+
opacity: 1;
|
|
1440
1486
|
}
|
|
1441
1487
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1488
|
+
to {
|
|
1489
|
+
opacity: 0.55;
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
@keyframes slotted-message-typing {
|
|
1494
|
+
0%,
|
|
1495
|
+
55%,
|
|
1496
|
+
100% {
|
|
1497
|
+
opacity: 0.3;
|
|
1498
|
+
translate: 0 0;
|
|
1447
1499
|
}
|
|
1448
1500
|
|
|
1449
|
-
|
|
1450
|
-
|
|
1501
|
+
25% {
|
|
1502
|
+
opacity: 0.85;
|
|
1503
|
+
translate: 0 calc(var(--_dot) * -0.5);
|
|
1451
1504
|
}
|
|
1452
1505
|
}
|
|
1453
1506
|
}
|