@slotted/styles 0.0.0-stage → 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +10 -2
- package/package.json +276 -3
- package/src/accordion/accordion.css +96 -0
- package/src/accordion/accordion.tokens.json +14 -0
- package/src/action-bar/action-bar.css +455 -0
- package/src/action-bar/action-bar.tokens.json +50 -0
- package/src/action-sheet/action-sheet.css +462 -0
- package/src/action-sheet/action-sheet.tokens.json +59 -0
- package/src/alert/alert.css +764 -0
- package/src/alert/alert.tokens.json +77 -0
- package/src/app-shell/app-shell.css +1899 -0
- package/src/app-shell/app-shell.tokens.json +88 -0
- package/src/aspect-ratio/aspect-ratio.css +131 -0
- package/src/aspect-ratio/aspect-ratio.tokens.json +1 -0
- package/src/attachment/attachment.css +906 -0
- package/src/attachment/attachment.tokens.json +85 -0
- package/src/avatar/avatar.css +598 -0
- package/src/avatar/avatar.tokens.json +64 -0
- package/src/avatar-group/avatar-group.css +268 -0
- package/src/avatar-group/avatar-group.tokens.json +16 -0
- package/src/badge/badge.css +462 -0
- package/src/badge/badge.tokens.json +58 -0
- package/src/breadcrumb/breadcrumb.css +441 -0
- package/src/breadcrumb/breadcrumb.tokens.json +50 -0
- package/src/button/button.css +754 -0
- package/src/button/button.tokens.json +72 -0
- package/src/button-group/button-group.css +455 -0
- package/src/button-group/button-group.tokens.json +11 -0
- package/src/calendar/calendar.css +846 -0
- package/src/calendar/calendar.tokens.json +67 -0
- package/src/card/card.css +602 -0
- package/src/card/card.tokens.json +68 -0
- package/src/carousel/carousel.css +860 -0
- package/src/carousel/carousel.tokens.json +62 -0
- package/src/cascader/cascader.css +1320 -0
- package/src/cascader/cascader.tokens.json +103 -0
- package/src/chart/chart.css +1473 -0
- package/src/chart/chart.tokens.json +107 -0
- package/src/checkbox/checkbox.css +1011 -0
- package/src/checkbox/checkbox.tokens.json +102 -0
- package/src/checkbox-group/checkbox-group.css +70 -0
- package/src/checkbox-group/checkbox-group.tokens.json +6 -0
- package/src/code-block/code-block.css +555 -0
- package/src/code-block/code-block.tokens.json +69 -0
- package/src/collapsible/collapsible.css +546 -0
- package/src/collapsible/collapsible.tokens.json +55 -0
- package/src/color-picker/color-picker.css +607 -0
- package/src/color-picker/color-picker.tokens.json +58 -0
- package/src/column-manager/column-manager.css +452 -0
- package/src/column-manager/column-manager.tokens.json +43 -0
- package/src/combobox/combobox.css +1048 -0
- package/src/combobox/combobox.tokens.json +112 -0
- package/src/command-palette/command-palette.css +1000 -0
- package/src/command-palette/command-palette.tokens.json +75 -0
- package/src/container/container.css +198 -0
- package/src/container/container.tokens.json +18 -0
- package/src/context-menu/context-menu.css +104 -0
- package/src/context-menu/context-menu.tokens.json +11 -0
- package/src/currency-field/currency-field.css +787 -0
- package/src/currency-field/currency-field.tokens.json +80 -0
- package/src/dashboard-grid/dashboard-grid.css +748 -0
- package/src/dashboard-grid/dashboard-grid.tokens.json +67 -0
- package/src/data-grid/data-grid.css +2484 -0
- package/src/data-grid/data-grid.tokens.json +100 -0
- package/src/data-list/data-list.css +455 -0
- package/src/data-list/data-list.tokens.json +35 -0
- package/src/date-field/date-field.css +560 -0
- package/src/date-field/date-field.tokens.json +80 -0
- package/src/date-picker/date-picker.css +420 -0
- package/src/date-picker/date-picker.tokens.json +49 -0
- package/src/date-range-picker/date-range-picker.css +983 -0
- package/src/date-range-picker/date-range-picker.tokens.json +109 -0
- package/src/datetime-field/datetime-field.css +850 -0
- package/src/datetime-field/datetime-field.tokens.json +91 -0
- package/src/datetime-picker/datetime-picker.css +843 -0
- package/src/datetime-picker/datetime-picker.tokens.json +78 -0
- package/src/datetime-range-picker/datetime-range-picker.css +1375 -0
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +135 -0
- package/src/description-list/description-list.css +675 -0
- package/src/description-list/description-list.tokens.json +66 -0
- package/src/detail-panel/detail-panel.css +329 -0
- package/src/detail-panel/detail-panel.tokens.json +33 -0
- package/src/dialog/dialog.css +968 -0
- package/src/dialog/dialog.tokens.json +66 -0
- package/src/divider/divider.css +131 -0
- package/src/divider/divider.tokens.json +18 -0
- package/src/drawer/drawer.css +1303 -0
- package/src/drawer/drawer.tokens.json +75 -0
- package/src/entity-picker/entity-picker.css +1367 -0
- package/src/entity-picker/entity-picker.tokens.json +118 -0
- package/src/event-calendar/event-calendar.css +2148 -0
- package/src/event-calendar/event-calendar.tokens.json +87 -0
- package/src/field/field.css +707 -0
- package/src/field/field.tokens.json +58 -0
- package/src/field-group/field-group.css +226 -0
- package/src/field-group/field-group.tokens.json +33 -0
- package/src/filter-bar/filter-bar.css +1306 -0
- package/src/filter-bar/filter-bar.tokens.json +78 -0
- package/src/form/form.css +218 -0
- package/src/form/form.tokens.json +32 -0
- package/src/fullscreen/fullscreen.css +376 -0
- package/src/fullscreen/fullscreen.tokens.json +50 -0
- package/src/grid/grid.css +173 -0
- package/src/grid/grid.tokens.json +20 -0
- package/src/highlight/highlight.css +135 -0
- package/src/highlight/highlight.tokens.json +16 -0
- package/src/hover-card/hover-card.css +93 -0
- package/src/hover-card/hover-card.tokens.json +17 -0
- package/src/icon/icon.css +136 -0
- package/src/icon/icon.tokens.json +14 -0
- package/src/image/image.css +449 -0
- package/src/image/image.tokens.json +27 -0
- package/src/import-export-center/import-export-center.css +1175 -0
- package/src/import-export-center/import-export-center.tokens.json +84 -0
- package/src/inline/inline.css +149 -0
- package/src/inline/inline.tokens.json +14 -0
- package/src/inline-message/inline-message.css +396 -0
- package/src/inline-message/inline-message.tokens.json +19 -0
- package/src/kbd/kbd.css +490 -0
- package/src/kbd/kbd.tokens.json +40 -0
- package/src/link/link.css +237 -0
- package/src/link/link.tokens.json +25 -0
- package/src/list/list.css +240 -0
- package/src/list/list.tokens.json +42 -0
- package/src/list-item/list-item.css +937 -0
- package/src/list-item/list-item.tokens.json +114 -0
- package/src/listbox/listbox.css +674 -0
- package/src/listbox/listbox.tokens.json +72 -0
- package/src/loading-overlay/loading-overlay.css +730 -0
- package/src/loading-overlay/loading-overlay.tokens.json +48 -0
- package/src/markdown/markdown.css +168 -0
- package/src/markdown/markdown.tokens.json +18 -0
- package/src/menu/menu.css +817 -0
- package/src/menu/menu.tokens.json +78 -0
- package/src/menubar/menubar.css +170 -0
- package/src/menubar/menubar.tokens.json +32 -0
- package/src/message/message.css +1453 -0
- package/src/message/message.tokens.json +85 -0
- package/src/message-scroller/message-scroller.css +371 -0
- package/src/message-scroller/message-scroller.tokens.json +47 -0
- package/src/multi-select/multi-select.css +1427 -0
- package/src/multi-select/multi-select.tokens.json +114 -0
- package/src/navigation-menu/navigation-menu.css +1029 -0
- package/src/navigation-menu/navigation-menu.tokens.json +70 -0
- package/src/notification-center/notification-center.css +856 -0
- package/src/notification-center/notification-center.tokens.json +84 -0
- package/src/number-field/number-field.css +794 -0
- package/src/number-field/number-field.tokens.json +80 -0
- package/src/otp-input/otp-input.css +525 -0
- package/src/otp-input/otp-input.tokens.json +69 -0
- package/src/page/page.css +179 -0
- package/src/page/page.tokens.json +20 -0
- package/src/page-header/page-header.css +1181 -0
- package/src/page-header/page-header.tokens.json +71 -0
- package/src/pagination/pagination.css +500 -0
- package/src/pagination/pagination.tokens.json +56 -0
- package/src/popover/popover.css +526 -0
- package/src/popover/popover.tokens.json +60 -0
- package/src/progress-indicator/progress-indicator.css +1584 -0
- package/src/progress-indicator/progress-indicator.tokens.json +50 -0
- package/src/prompt-composer/prompt-composer.css +680 -0
- package/src/prompt-composer/prompt-composer.tokens.json +99 -0
- package/src/prose/prose.css +733 -0
- package/src/prose/prose.tokens.json +79 -0
- package/src/radio-group/radio-group.css +778 -0
- package/src/radio-group/radio-group.tokens.json +103 -0
- package/src/rating/rating.css +1071 -0
- package/src/rating/rating.tokens.json +88 -0
- package/src/result-state/result-state.css +980 -0
- package/src/result-state/result-state.tokens.json +63 -0
- package/src/runtime-properties.mjs +321 -0
- package/src/saved-views/saved-views.css +394 -0
- package/src/saved-views/saved-views.tokens.json +41 -0
- package/src/scroll-area/scroll-area.css +481 -0
- package/src/scroll-area/scroll-area.tokens.json +15 -0
- package/src/section/section.css +177 -0
- package/src/section/section.tokens.json +39 -0
- package/src/segmented-control/segmented-control.css +564 -0
- package/src/segmented-control/segmented-control.tokens.json +67 -0
- package/src/select/select.css +1593 -0
- package/src/select/select.tokens.json +110 -0
- package/src/side-navigation/side-navigation.css +1096 -0
- package/src/side-navigation/side-navigation.tokens.json +87 -0
- package/src/skeleton/skeleton.css +431 -0
- package/src/skeleton/skeleton.tokens.json +29 -0
- package/src/slider/slider.css +792 -0
- package/src/slider/slider.tokens.json +75 -0
- package/src/sparkline/sparkline.css +282 -0
- package/src/sparkline/sparkline.tokens.json +45 -0
- package/src/spinner/spinner.css +224 -0
- package/src/spinner/spinner.tokens.json +8 -0
- package/src/split-button/split-button.css +253 -0
- package/src/split-button/split-button.tokens.json +12 -0
- package/src/splitter/splitter.css +336 -0
- package/src/splitter/splitter.tokens.json +24 -0
- package/src/stack/stack.css +128 -0
- package/src/stack/stack.tokens.json +14 -0
- package/src/stat-card/stat-card.css +641 -0
- package/src/stat-card/stat-card.tokens.json +95 -0
- package/src/status-indicator/status-indicator.css +481 -0
- package/src/status-indicator/status-indicator.tokens.json +38 -0
- package/src/stepper/stepper.css +629 -0
- package/src/stepper/stepper.tokens.json +72 -0
- package/src/switch/switch.css +703 -0
- package/src/switch/switch.tokens.json +75 -0
- package/src/table/table.css +1482 -0
- package/src/table/table.tokens.json +69 -0
- package/src/table-of-contents/table-of-contents.css +533 -0
- package/src/table-of-contents/table-of-contents.tokens.json +53 -0
- package/src/tabs/tabs.css +998 -0
- package/src/tabs/tabs.tokens.json +82 -0
- package/src/tag/tag.css +768 -0
- package/src/tag/tag.tokens.json +85 -0
- package/src/tags-input/tags-input.css +757 -0
- package/src/tags-input/tags-input.tokens.json +84 -0
- package/src/text-field/text-field.css +900 -0
- package/src/text-field/text-field.tokens.json +87 -0
- package/src/textarea/textarea.css +365 -0
- package/src/textarea/textarea.tokens.json +59 -0
- package/src/time-field/time-field.css +719 -0
- package/src/time-field/time-field.tokens.json +86 -0
- package/src/time-picker/time-picker.css +665 -0
- package/src/time-picker/time-picker.tokens.json +66 -0
- package/src/time-range-picker/time-range-picker.css +1287 -0
- package/src/time-range-picker/time-range-picker.tokens.json +134 -0
- package/src/timeline/timeline.css +1596 -0
- package/src/timeline/timeline.tokens.json +96 -0
- package/src/toast/toast.css +943 -0
- package/src/toast/toast.tokens.json +90 -0
- package/src/toggle/toggle.css +290 -0
- package/src/toggle/toggle.tokens.json +54 -0
- package/src/toggle-group/toggle-group.css +463 -0
- package/src/toggle-group/toggle-group.tokens.json +54 -0
- package/src/toolbar/toolbar.css +434 -0
- package/src/toolbar/toolbar.tokens.json +49 -0
- package/src/tooltip/tooltip.css +368 -0
- package/src/tooltip/tooltip.tokens.json +39 -0
- package/src/top-navigation/top-navigation.css +1287 -0
- package/src/top-navigation/top-navigation.tokens.json +91 -0
- package/src/tour/tour.css +680 -0
- package/src/tour/tour.tokens.json +67 -0
- package/src/transfer/transfer.css +571 -0
- package/src/transfer/transfer.tokens.json +49 -0
- package/src/tree/tree.css +1000 -0
- package/src/tree/tree.tokens.json +80 -0
- package/src/typography/typography.css +211 -0
- package/src/typography/typography.tokens.json +31 -0
- package/src/upload/upload.css +1706 -0
- package/src/upload/upload.tokens.json +123 -0
- package/src/visually-hidden/visually-hidden.css +52 -0
- package/src/visually-hidden/visually-hidden.tokens.json +1 -0
- package/src/wizard/wizard.css +740 -0
- package/src/wizard/wizard.tokens.json +63 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-width-thick",
|
|
4
|
+
"--slotted-border-width-thin",
|
|
5
|
+
"--slotted-control-border-color",
|
|
6
|
+
"--slotted-control-border-width",
|
|
7
|
+
"--slotted-control-font-family",
|
|
8
|
+
"--slotted-control-font-size-lg",
|
|
9
|
+
"--slotted-control-font-size-md",
|
|
10
|
+
"--slotted-control-font-size-sm",
|
|
11
|
+
"--slotted-control-gap-lg",
|
|
12
|
+
"--slotted-control-gap-md",
|
|
13
|
+
"--slotted-control-gap-sm",
|
|
14
|
+
"--slotted-control-icon-size-lg",
|
|
15
|
+
"--slotted-control-icon-size-md",
|
|
16
|
+
"--slotted-control-icon-size-sm",
|
|
17
|
+
"--slotted-control-invalid-edge-width",
|
|
18
|
+
"--slotted-control-shadow",
|
|
19
|
+
"--slotted-control-shadow-focus-geometry",
|
|
20
|
+
"--slotted-control-transition-duration",
|
|
21
|
+
"--slotted-control-transition-easing",
|
|
22
|
+
"--slotted-disabled-background",
|
|
23
|
+
"--slotted-disabled-border",
|
|
24
|
+
"--slotted-disabled-foreground",
|
|
25
|
+
"--slotted-focus-ring-color",
|
|
26
|
+
"--slotted-focus-ring-color-invalid",
|
|
27
|
+
"--slotted-focus-ring-offset",
|
|
28
|
+
"--slotted-focus-ring-width",
|
|
29
|
+
"--slotted-font-size-xs",
|
|
30
|
+
"--slotted-font-weight-medium",
|
|
31
|
+
"--slotted-line-height-sm",
|
|
32
|
+
"--slotted-line-height-xs",
|
|
33
|
+
"--slotted-radius-full",
|
|
34
|
+
"--slotted-radius-sm",
|
|
35
|
+
"--slotted-slider-bubble-background",
|
|
36
|
+
"--slotted-slider-bubble-color",
|
|
37
|
+
"--slotted-slider-color",
|
|
38
|
+
"--slotted-slider-disabled-border-color",
|
|
39
|
+
"--slotted-slider-disabled-indicator-color",
|
|
40
|
+
"--slotted-slider-disabled-thumb-color",
|
|
41
|
+
"--slotted-slider-disabled-track-color",
|
|
42
|
+
"--slotted-slider-indicator-color",
|
|
43
|
+
"--slotted-slider-invalid-edge-width",
|
|
44
|
+
"--slotted-slider-invalid-focus-ring-color",
|
|
45
|
+
"--slotted-slider-invalid-indicator-color",
|
|
46
|
+
"--slotted-slider-invalid-thumb-border-color",
|
|
47
|
+
"--slotted-slider-length",
|
|
48
|
+
"--slotted-slider-mark-color",
|
|
49
|
+
"--slotted-slider-mark-label-color",
|
|
50
|
+
"--slotted-slider-output-color",
|
|
51
|
+
"--slotted-slider-readonly-indicator-color",
|
|
52
|
+
"--slotted-slider-readonly-thumb-border-color",
|
|
53
|
+
"--slotted-slider-thumb-border-color",
|
|
54
|
+
"--slotted-slider-thumb-color",
|
|
55
|
+
"--slotted-slider-thumb-hover-background",
|
|
56
|
+
"--slotted-slider-thumb-shadow",
|
|
57
|
+
"--slotted-slider-thumb-size",
|
|
58
|
+
"--slotted-slider-track-border-color",
|
|
59
|
+
"--slotted-slider-track-color",
|
|
60
|
+
"--slotted-slider-track-size",
|
|
61
|
+
"--slotted-space-1",
|
|
62
|
+
"--slotted-space-2",
|
|
63
|
+
"--slotted-space-3",
|
|
64
|
+
"--slotted-surface",
|
|
65
|
+
"--slotted-surface-inverse",
|
|
66
|
+
"--slotted-surface-sunken",
|
|
67
|
+
"--slotted-target-min",
|
|
68
|
+
"--slotted-text",
|
|
69
|
+
"--slotted-text-inverse",
|
|
70
|
+
"--slotted-text-muted",
|
|
71
|
+
"--slotted-tone-accent-solid",
|
|
72
|
+
"--slotted-tone-accent-surface",
|
|
73
|
+
"--slotted-tone-danger-border",
|
|
74
|
+
"--slotted-tone-danger-solid"
|
|
75
|
+
]
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* The first SVG the library draws. The geometry — where a point is, how
|
|
4
|
+
* wide a bar is — is computed in `@slotted/core/sparkline` from the box the
|
|
5
|
+
* binding measured, so this sheet decides only what the marks are made of:
|
|
6
|
+
* the colour, the stroke, the marker, the wash under a line and the height
|
|
7
|
+
* of the box.
|
|
8
|
+
*
|
|
9
|
+
* The root is inline-block and takes the whole inline size of what holds
|
|
10
|
+
* it — a card's trend region, a table cell — because a sparkline never
|
|
11
|
+
* chooses its own width: it is a thing read beside a value, and the value's
|
|
12
|
+
* container is what has the room. The height is the family's, by size step.
|
|
13
|
+
*/
|
|
14
|
+
[data-ui='sparkline'] {
|
|
15
|
+
/* The height of the box, by size. Three steps of the space scale rather
|
|
16
|
+
than of control geometry: a sparkline is content, not a control, and a
|
|
17
|
+
dense table asks for `size="sm"` rather than for a shorter `md`. */
|
|
18
|
+
--_size: var(--slotted-sparkline-block-size, var(--slotted-space-9, 2rem));
|
|
19
|
+
--_stroke: var(--slotted-sparkline-line-width, var(--slotted-border-width-thick, 2px));
|
|
20
|
+
/* A marker six pixels across — four at sm, eight at lg — with a ring in
|
|
21
|
+
the colour of the ground, so it stays legible where it crosses the
|
|
22
|
+
line. Smaller than the eight pixels a chart's hover target needs: a
|
|
23
|
+
sparkline has no hover, and a disc a third the height of a 20-pixel
|
|
24
|
+
box was the first thing the reviewer saw. */
|
|
25
|
+
--_marker: var(--slotted-sparkline-marker-size, var(--slotted-space-3, 0.375rem));
|
|
26
|
+
--_ring: var(--slotted-sparkline-ring-width, var(--slotted-border-width-thick, 2px));
|
|
27
|
+
--_ring-color: var(--slotted-sparkline-ring-color, var(--slotted-surface-raised, Canvas));
|
|
28
|
+
/* The wash under a line: the series colour fading from this share at the
|
|
29
|
+
line to nothing at the bottom edge. A number rather than a token step,
|
|
30
|
+
recorded in the token file: no scale in the foundation holds an
|
|
31
|
+
opacity for a fill that is read through, and the two that hold one for
|
|
32
|
+
a band (`highlight`, `selection`) are calibrated for text sitting on
|
|
33
|
+
them, which nothing does here. */
|
|
34
|
+
--_area-opacity: var(--slotted-sparkline-area-opacity, 0.18);
|
|
35
|
+
/* Every bar but the current one is drawn in the colour mixed at this
|
|
36
|
+
share with the line between two surfaces, so the last period reads as
|
|
37
|
+
the one the value is about. Mixed with a colour rather than faded
|
|
38
|
+
with opacity: a bar at half opacity is a tint the page cannot
|
|
39
|
+
promise a ratio for — pale blue on white in `high-contrast` — where
|
|
40
|
+
`--slotted-border-strong` holds 3:1 against every surface in every
|
|
41
|
+
scheme and lends it to the mix. */
|
|
42
|
+
--_bar-share: var(--slotted-sparkline-bar-share, 62%);
|
|
43
|
+
--_bar-dim: color-mix(
|
|
44
|
+
in oklab,
|
|
45
|
+
var(--_color) var(--_bar-share),
|
|
46
|
+
var(--slotted-border-strong, ButtonBorder)
|
|
47
|
+
);
|
|
48
|
+
--_reference-color: var(
|
|
49
|
+
--slotted-sparkline-reference-color,
|
|
50
|
+
var(--slotted-border-strong, ButtonBorder)
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The colour, resolved in one order. A tone says how the series is doing
|
|
55
|
+
* and wins; a series slot says which one it is; a sparkline that names
|
|
56
|
+
* neither reads the colour its container states — a card's trend region
|
|
57
|
+
* writes `--slotted-sparkline-color` from its own tone — or the first slot
|
|
58
|
+
* of the data scale, which is the theme's own blue.
|
|
59
|
+
*/
|
|
60
|
+
--_color: var(--slotted-sparkline-color, var(--slotted-data-1));
|
|
61
|
+
|
|
62
|
+
block-size: var(--_size);
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
inline-size: 100%;
|
|
66
|
+
/* The box is the drawing; there is no line box to leave room under. */
|
|
67
|
+
line-height: 0;
|
|
68
|
+
min-inline-size: 0;
|
|
69
|
+
vertical-align: middle;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-ui='sparkline'][data-size='sm'] {
|
|
73
|
+
--_size: var(--slotted-sparkline-block-size-sm, var(--slotted-space-7, 1.25rem));
|
|
74
|
+
--_stroke: var(--slotted-sparkline-line-width-sm, var(--slotted-border-width-medium, 1.5px));
|
|
75
|
+
--_marker: var(--slotted-sparkline-marker-size-sm, var(--slotted-space-2, 0.25rem));
|
|
76
|
+
--_ring: var(--slotted-sparkline-ring-width-sm, var(--slotted-border-width-medium, 1.5px));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-ui='sparkline'][data-size='lg'] {
|
|
80
|
+
--_size: var(--slotted-sparkline-block-size-lg, var(--slotted-space-11, 3rem));
|
|
81
|
+
--_marker: var(--slotted-sparkline-marker-size-lg, var(--slotted-space-4, 0.5rem));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ── Series: which one of eight this is ──────────────────────────────── */
|
|
85
|
+
|
|
86
|
+
[data-ui='sparkline'][data-series='1'] {
|
|
87
|
+
--_color: var(--slotted-data-1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-ui='sparkline'][data-series='2'] {
|
|
91
|
+
--_color: var(--slotted-data-2);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-ui='sparkline'][data-series='3'] {
|
|
95
|
+
--_color: var(--slotted-data-3);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-ui='sparkline'][data-series='4'] {
|
|
99
|
+
--_color: var(--slotted-data-4);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-ui='sparkline'][data-series='5'] {
|
|
103
|
+
--_color: var(--slotted-data-5);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-ui='sparkline'][data-series='6'] {
|
|
107
|
+
--_color: var(--slotted-data-6);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-ui='sparkline'][data-series='7'] {
|
|
111
|
+
--_color: var(--slotted-data-7);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-ui='sparkline'][data-series='8'] {
|
|
115
|
+
--_color: var(--slotted-data-8);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ── Tone: how the series is doing, in the tone's text role ──────────────
|
|
119
|
+
*
|
|
120
|
+
* The `text` role rather than `border` or `solid`: it is the one role every
|
|
121
|
+
* scheme holds to the reading ratio against the surface, and a two-pixel
|
|
122
|
+
* line needs more than the 3:1 a border is calibrated for to be read as a
|
|
123
|
+
* shape rather than found. `neutral` is the comparison series and the aside,
|
|
124
|
+
* in the step the page uses for one.
|
|
125
|
+
*/
|
|
126
|
+
[data-ui='sparkline'][data-tone='neutral'] {
|
|
127
|
+
--_color: var(--slotted-text-muted, GrayText);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[data-ui='sparkline'][data-tone='accent'] {
|
|
131
|
+
--_color: var(--slotted-tone-accent-text);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[data-ui='sparkline'][data-tone='secondary'] {
|
|
135
|
+
--_color: var(--slotted-tone-secondary-text);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[data-ui='sparkline'][data-tone='success'] {
|
|
139
|
+
--_color: var(--slotted-tone-success-text);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
[data-ui='sparkline'][data-tone='warning'] {
|
|
143
|
+
--_color: var(--slotted-tone-warning-text);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[data-ui='sparkline'][data-tone='danger'] {
|
|
147
|
+
--_color: var(--slotted-tone-danger-text);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* ── The drawing ───────────────────────────────────────────────────────── */
|
|
151
|
+
|
|
152
|
+
[data-ui='sparkline'] [data-part='plot'] {
|
|
153
|
+
block-size: 100%;
|
|
154
|
+
display: block;
|
|
155
|
+
inline-size: 100%;
|
|
156
|
+
/* The marker's ring may sit half a pixel past the edge at the extremes;
|
|
157
|
+
clipping it would flatten the dot. The engine insets the grid so the
|
|
158
|
+
marks stay inside, and this is the margin for rounding. */
|
|
159
|
+
overflow: visible;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The wash: the series colour, faded to nothing at the bottom by a mask
|
|
164
|
+
* rather than by a gradient element, so the `svg` needs no `id` and a page
|
|
165
|
+
* of forty sparklines does not mint forty gradients. `mask-image` applies to
|
|
166
|
+
* an SVG child from CSS in every engine that ships `@layer`.
|
|
167
|
+
*/
|
|
168
|
+
[data-ui='sparkline'] [data-part='area'] {
|
|
169
|
+
fill: var(--_color);
|
|
170
|
+
fill-opacity: var(--_area-opacity);
|
|
171
|
+
mask-image: linear-gradient(to bottom, black, transparent);
|
|
172
|
+
stroke: none;
|
|
173
|
+
transition: d var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* `vector-effect: non-scaling-stroke` is what keeps the line two pixels
|
|
178
|
+
* during the one frame before the box is measured, when the nominal grid is
|
|
179
|
+
* stretched to the box; once measured, the grid is the box and the effect
|
|
180
|
+
* changes nothing.
|
|
181
|
+
*/
|
|
182
|
+
[data-ui='sparkline'] [data-part='line'] {
|
|
183
|
+
fill: none;
|
|
184
|
+
stroke: var(--_color);
|
|
185
|
+
stroke-linecap: round;
|
|
186
|
+
stroke-linejoin: round;
|
|
187
|
+
stroke-width: var(--_stroke);
|
|
188
|
+
transition: d var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
189
|
+
vector-effect: non-scaling-stroke;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
[data-ui='sparkline'] [data-part='bar'] {
|
|
193
|
+
fill: var(--_bar-dim);
|
|
194
|
+
stroke: none;
|
|
195
|
+
transition:
|
|
196
|
+
d var(--slotted-duration-medium) var(--slotted-easing-standard),
|
|
197
|
+
fill var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* The current period is the one the value beside the chart is about. */
|
|
201
|
+
[data-ui='sparkline'] [data-part='bar'][data-current] {
|
|
202
|
+
fill: var(--_color);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* A reference is a hairline and it is dashed: it is the one line in the box
|
|
207
|
+
* that is not data, and the dash is what says so before the colour does.
|
|
208
|
+
* The dash lengths are geometry of the stroke, not a scale step.
|
|
209
|
+
*/
|
|
210
|
+
[data-ui='sparkline'] [data-part='reference'] {
|
|
211
|
+
fill: none;
|
|
212
|
+
stroke: var(--_reference-color);
|
|
213
|
+
stroke-dasharray: 2 3;
|
|
214
|
+
stroke-linecap: round;
|
|
215
|
+
stroke-width: var(--slotted-border-width-thin, 1px);
|
|
216
|
+
vector-effect: non-scaling-stroke;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The marker and its ring: two zero-length paths with round caps, one over
|
|
221
|
+
* the other, each a disc whose diameter is its stroke width. Not circles —
|
|
222
|
+
* a `circle` is scaled with the grid, and the grid is stretched to the box
|
|
223
|
+
* for the one frame before the box is measured, so a circle there is an
|
|
224
|
+
* ellipse; a stroke under `vector-effect: non-scaling-stroke` is measured
|
|
225
|
+
* on the screen and stays round whatever the grid does. The ring is drawn
|
|
226
|
+
* in the colour of the ground so the disc stays legible where it lands on
|
|
227
|
+
* the line.
|
|
228
|
+
*/
|
|
229
|
+
[data-ui='sparkline'] [data-part='ring'],
|
|
230
|
+
[data-ui='sparkline'] [data-part='marker'] {
|
|
231
|
+
fill: none;
|
|
232
|
+
stroke-linecap: round;
|
|
233
|
+
transition: d var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
234
|
+
vector-effect: non-scaling-stroke;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
[data-ui='sparkline'] [data-part='ring'] {
|
|
238
|
+
stroke: var(--_ring-color);
|
|
239
|
+
stroke-width: calc(var(--_marker) + 2 * var(--_ring));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[data-ui='sparkline'] [data-part='marker'] {
|
|
243
|
+
stroke: var(--_color);
|
|
244
|
+
stroke-width: var(--_marker);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* In a right-to-left document the series reads from the right, as the
|
|
249
|
+
* text does: the last point, the one the value is about, sits at the
|
|
250
|
+
* inline end. The grid is mirrored rather than recomputed, so both
|
|
251
|
+
* bindings hand the engine the same box and the same order.
|
|
252
|
+
*/
|
|
253
|
+
[data-ui='sparkline']:dir(rtl) [data-part='plot'] {
|
|
254
|
+
transform: scaleX(-1);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Under forced colours the theme has already mapped the data scale and the
|
|
259
|
+
* tones to `CanvasText`, so a line and a marker keep their ink. What the
|
|
260
|
+
* theme cannot do is undo the mix in the bars or the wash: a bar mixed from
|
|
261
|
+
* two system colours is a colour the mode does not have, and the wash is a
|
|
262
|
+
* tint it has no colour for. The earlier bars take `GrayText`, the current
|
|
263
|
+
* one `CanvasText`, and the wash goes.
|
|
264
|
+
*/
|
|
265
|
+
@media (forced-colors: active) {
|
|
266
|
+
[data-ui='sparkline'] [data-part='area'] {
|
|
267
|
+
display: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[data-ui='sparkline'] [data-part='bar'] {
|
|
271
|
+
fill: GrayText;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
[data-ui='sparkline'] [data-part='bar'][data-current] {
|
|
275
|
+
fill: CanvasText;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
[data-ui='sparkline'] [data-part='ring'] {
|
|
279
|
+
stroke: Canvas;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[
|
|
2
|
+
"--slotted-border-strong",
|
|
3
|
+
"--slotted-border-width-medium",
|
|
4
|
+
"--slotted-border-width-thick",
|
|
5
|
+
"--slotted-border-width-thin",
|
|
6
|
+
"--slotted-data-1",
|
|
7
|
+
"--slotted-data-2",
|
|
8
|
+
"--slotted-data-3",
|
|
9
|
+
"--slotted-data-4",
|
|
10
|
+
"--slotted-data-5",
|
|
11
|
+
"--slotted-data-6",
|
|
12
|
+
"--slotted-data-7",
|
|
13
|
+
"--slotted-data-8",
|
|
14
|
+
"--slotted-duration-medium",
|
|
15
|
+
"--slotted-duration-short",
|
|
16
|
+
"--slotted-easing-standard",
|
|
17
|
+
"--slotted-space-11",
|
|
18
|
+
"--slotted-space-2",
|
|
19
|
+
"--slotted-space-3",
|
|
20
|
+
"--slotted-space-4",
|
|
21
|
+
"--slotted-space-7",
|
|
22
|
+
"--slotted-space-9",
|
|
23
|
+
"--slotted-sparkline-area-opacity",
|
|
24
|
+
"--slotted-sparkline-bar-share",
|
|
25
|
+
"--slotted-sparkline-block-size",
|
|
26
|
+
"--slotted-sparkline-block-size-lg",
|
|
27
|
+
"--slotted-sparkline-block-size-sm",
|
|
28
|
+
"--slotted-sparkline-color",
|
|
29
|
+
"--slotted-sparkline-line-width",
|
|
30
|
+
"--slotted-sparkline-line-width-sm",
|
|
31
|
+
"--slotted-sparkline-marker-size",
|
|
32
|
+
"--slotted-sparkline-marker-size-lg",
|
|
33
|
+
"--slotted-sparkline-marker-size-sm",
|
|
34
|
+
"--slotted-sparkline-reference-color",
|
|
35
|
+
"--slotted-sparkline-ring-color",
|
|
36
|
+
"--slotted-sparkline-ring-width",
|
|
37
|
+
"--slotted-sparkline-ring-width-sm",
|
|
38
|
+
"--slotted-surface-raised",
|
|
39
|
+
"--slotted-text-muted",
|
|
40
|
+
"--slotted-tone-accent-text",
|
|
41
|
+
"--slotted-tone-danger-text",
|
|
42
|
+
"--slotted-tone-secondary-text",
|
|
43
|
+
"--slotted-tone-success-text",
|
|
44
|
+
"--slotted-tone-warning-text"
|
|
45
|
+
]
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
@layer slotted.components {
|
|
2
|
+
/**
|
|
3
|
+
* One ring, drawn once. The indeterminate wait every family shows the same
|
|
4
|
+
* way — a button that is working, a select or combobox whose options are
|
|
5
|
+
* still on their way — is drawn here, and a host names it and places it.
|
|
6
|
+
*
|
|
7
|
+
* It was a glyph before this: Lucide's `loader-circle`, a three-quarter arc
|
|
8
|
+
* with two cut ends, masked over the ink and set turning. It read as what
|
|
9
|
+
* it was, a static shape being rotated, and at the small step its stroke
|
|
10
|
+
* was heavier than anything beside it. What is drawn now is the pattern
|
|
11
|
+
* Material and the platform's own progress ring settle on: an arc that
|
|
12
|
+
* chases itself around a faint track, growing from its head and closing
|
|
13
|
+
* from its tail, so the eye reads work rather than a wheel.
|
|
14
|
+
*
|
|
15
|
+
* Three layers, one mask. The track is the whole circle in the host's ink
|
|
16
|
+
* at a fifth of its strength — the same step every family uses for a
|
|
17
|
+
* band or a rail on its own ground — and it is what stands when motion is
|
|
18
|
+
* off. The arc is a conic gradient from the tail angle to the head angle,
|
|
19
|
+
* in full ink. Two dots the width of the stroke sit at the two angles and
|
|
20
|
+
* give the arc the round caps a conic gradient cannot draw. The annulus is
|
|
21
|
+
* cut by a radial mask a pixel wide at the edge, so the stroke is drawn
|
|
22
|
+
* rather than stepped. Everything is measured from the box, so the ring is
|
|
23
|
+
* the same drawing at every step a host can ask for.
|
|
24
|
+
*
|
|
25
|
+
* Three angles move it, and none is a rotation of the box. A turning box
|
|
26
|
+
* is rasterised once and spun as a bitmap; a gradient repainted by angle is
|
|
27
|
+
* as sharp on the last frame as on the first. In the first half of a cycle
|
|
28
|
+
* the head runs ahead on an ease and the tail holds, so the arc opens from
|
|
29
|
+
* a sliver to most of the circle; in the second half the head holds and
|
|
30
|
+
* the tail runs the same distance, so the arc closes from behind. Neither
|
|
31
|
+
* end ever moves backward. A linear turn under both keeps the whole
|
|
32
|
+
* travelling through the eased ends, and it is a turn and a hundred
|
|
33
|
+
* degrees per cycle because that is what the two resets add up to: the
|
|
34
|
+
* last frame of a cycle is the first frame of the next, to the degree.
|
|
35
|
+
*
|
|
36
|
+
* `currentColor` is what lets the ring take whatever ink its host is
|
|
37
|
+
* already writing with — the label's colour on a filled button, the tone
|
|
38
|
+
* on a bare one, the muted text of a field — and answer every scheme
|
|
39
|
+
* without a colour of its own.
|
|
40
|
+
*
|
|
41
|
+
* The box is the host's glyph box, read through `--slotted-spinner-size`:
|
|
42
|
+
* a host that sizes its icons sizes the ring the same way, so the ring
|
|
43
|
+
* that stands in for a glyph is the size of the glyph it replaces. Left
|
|
44
|
+
* alone it is the medium control icon. The icon set keeps two units of
|
|
45
|
+
* twenty-four clear inside that box, and the ring keeps the same inset, so
|
|
46
|
+
* the swap is between two shapes of one measure.
|
|
47
|
+
*/
|
|
48
|
+
[data-ui='spinner'] {
|
|
49
|
+
--_size: var(--slotted-spinner-size, var(--slotted-control-icon-size-md, 16px));
|
|
50
|
+
--_ring: calc(var(--_size) * 5 / 6);
|
|
51
|
+
/**
|
|
52
|
+
* The stroke of the icon set at this size — two units of twenty-four —
|
|
53
|
+
* and never thinner than the medium hairline, which is where a 12px
|
|
54
|
+
* ring would otherwise fall below a pixel.
|
|
55
|
+
*/
|
|
56
|
+
--_stroke: max(var(--slotted-border-width-medium, 1.5px), calc(var(--_size) / 12));
|
|
57
|
+
/** The radius the stroke is centred on: where the caps sit. */
|
|
58
|
+
--_radius: calc((var(--_ring) - var(--_stroke)) / 2);
|
|
59
|
+
--_track: color-mix(in oklab, currentColor 20%, transparent);
|
|
60
|
+
--_start: calc(var(--_turn) + var(--_tail));
|
|
61
|
+
--_end: calc(var(--_turn) + var(--_head));
|
|
62
|
+
--_cap: calc(var(--_stroke) / 2);
|
|
63
|
+
|
|
64
|
+
animation:
|
|
65
|
+
slotted-spinner-turn var(--slotted-duration-loop-slow) linear infinite,
|
|
66
|
+
slotted-spinner-head var(--slotted-duration-loop-slow) linear infinite,
|
|
67
|
+
slotted-spinner-tail var(--slotted-duration-loop-slow) linear infinite;
|
|
68
|
+
background-image:
|
|
69
|
+
radial-gradient(
|
|
70
|
+
circle at calc(50% + var(--_radius) * sin(var(--_end)))
|
|
71
|
+
calc(50% - var(--_radius) * cos(var(--_end))),
|
|
72
|
+
currentColor calc(var(--_cap) - 0.5px),
|
|
73
|
+
transparent calc(var(--_cap) + 0.5px)
|
|
74
|
+
),
|
|
75
|
+
radial-gradient(
|
|
76
|
+
circle at calc(50% + var(--_radius) * sin(var(--_start)))
|
|
77
|
+
calc(50% - var(--_radius) * cos(var(--_start))),
|
|
78
|
+
currentColor calc(var(--_cap) - 0.5px),
|
|
79
|
+
transparent calc(var(--_cap) + 0.5px)
|
|
80
|
+
),
|
|
81
|
+
conic-gradient(
|
|
82
|
+
from var(--_start),
|
|
83
|
+
currentColor 0deg,
|
|
84
|
+
currentColor calc(var(--_head) - var(--_tail)),
|
|
85
|
+
transparent calc(var(--_head) - var(--_tail))
|
|
86
|
+
),
|
|
87
|
+
conic-gradient(var(--_track) 0 100%);
|
|
88
|
+
background-origin: content-box;
|
|
89
|
+
background-clip: content-box;
|
|
90
|
+
block-size: var(--_size);
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
display: inline-block;
|
|
93
|
+
/* A ring that shrinks is not a ring: it keeps its size in a flex row. */
|
|
94
|
+
flex: none;
|
|
95
|
+
inline-size: var(--_size);
|
|
96
|
+
/*
|
|
97
|
+
* Cut in lengths rather than in percentages of the ray: Chrome paints
|
|
98
|
+
* `calc(100% - 2px)` as a stop in a radial gradient as a ramp several
|
|
99
|
+
* pixels wide, and the ring came out as a soft donut. Two lengths a pixel
|
|
100
|
+
* apart are a stroke with an anti-aliased edge.
|
|
101
|
+
*/
|
|
102
|
+
mask-image: radial-gradient(
|
|
103
|
+
circle,
|
|
104
|
+
transparent calc(var(--_ring) / 2 - var(--_stroke) - 0.5px),
|
|
105
|
+
#000 calc(var(--_ring) / 2 - var(--_stroke) + 0.5px),
|
|
106
|
+
#000 calc(var(--_ring) / 2 - 0.5px),
|
|
107
|
+
transparent calc(var(--_ring) / 2 + 0.5px)
|
|
108
|
+
);
|
|
109
|
+
opacity: 1;
|
|
110
|
+
/* The inset the icon set keeps, so the ring is drawn where a glyph is. */
|
|
111
|
+
padding: calc((var(--_size) - var(--_ring)) / 2);
|
|
112
|
+
scale: 1;
|
|
113
|
+
/**
|
|
114
|
+
* A ring arrives rather than appears. A host inserts it on the frame the
|
|
115
|
+
* wait begins, and the first frame is the start of a fade rather than a
|
|
116
|
+
* cut, in the control's own transition step.
|
|
117
|
+
*/
|
|
118
|
+
transition:
|
|
119
|
+
opacity var(--slotted-control-transition-duration) var(--slotted-control-transition-easing),
|
|
120
|
+
scale var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
121
|
+
vertical-align: middle;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@starting-style {
|
|
125
|
+
[data-ui='spinner'] {
|
|
126
|
+
opacity: 0;
|
|
127
|
+
scale: 0.6;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* A frozen ring still communicates waiting: the track, and an arc of most
|
|
133
|
+
* of a turn resting on it. Stopping it entirely is less distracting than
|
|
134
|
+
* replacing one continuous motion with a slower one.
|
|
135
|
+
*/
|
|
136
|
+
@media (prefers-reduced-motion: reduce) {
|
|
137
|
+
[data-ui='spinner'] {
|
|
138
|
+
--_head: 270deg;
|
|
139
|
+
|
|
140
|
+
animation: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (forced-colors: active) {
|
|
145
|
+
/*
|
|
146
|
+
* The ring is painted with a background, and forced colours replace a
|
|
147
|
+
* background that is not one of the system's own colours: the ring goes
|
|
148
|
+
* and the box it sat in stays. `forced-color-adjust: none` keeps
|
|
149
|
+
* `currentcolor`, which is the host's ink, already forced to the right
|
|
150
|
+
* value.
|
|
151
|
+
*/
|
|
152
|
+
[data-ui='spinner'] {
|
|
153
|
+
forced-color-adjust: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Registered so the three angles interpolate: an unregistered custom property
|
|
160
|
+
* flips between its keyframes instead of turning. Without the registration
|
|
161
|
+
* the ring stands as it does under reduced motion rather than as nothing.
|
|
162
|
+
*/
|
|
163
|
+
@property --_turn {
|
|
164
|
+
inherits: false;
|
|
165
|
+
initial-value: 0deg;
|
|
166
|
+
syntax: '<angle>';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@property --_head {
|
|
170
|
+
inherits: false;
|
|
171
|
+
initial-value: 20deg;
|
|
172
|
+
syntax: '<angle>';
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@property --_tail {
|
|
176
|
+
inherits: false;
|
|
177
|
+
initial-value: 0deg;
|
|
178
|
+
syntax: '<angle>';
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* The linear turn under both ends. A full turn and the hundred degrees the
|
|
183
|
+
* two resets below leave over — the tail ends 260 degrees on from where it
|
|
184
|
+
* starts, the head likewise — so the angle a cycle ends on is the angle the
|
|
185
|
+
* next begins on, and the loop has no seam.
|
|
186
|
+
*/
|
|
187
|
+
@keyframes slotted-spinner-turn {
|
|
188
|
+
to {
|
|
189
|
+
--_turn: 460deg;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The head opens the arc in the first half of the cycle and holds in the
|
|
195
|
+
* second; the tail holds in the first and closes it in the second. The ease
|
|
196
|
+
* is written on the keyframe it leaves from, so each half eases on its own
|
|
197
|
+
* and the hold between them is a hold. An arc of twenty degrees to two
|
|
198
|
+
* hundred and eighty: never nothing, never a closed circle.
|
|
199
|
+
*/
|
|
200
|
+
@keyframes slotted-spinner-head {
|
|
201
|
+
0% {
|
|
202
|
+
--_head: 20deg;
|
|
203
|
+
|
|
204
|
+
animation-timing-function: ease-in-out;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
50%,
|
|
208
|
+
100% {
|
|
209
|
+
--_head: 280deg;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@keyframes slotted-spinner-tail {
|
|
214
|
+
0%,
|
|
215
|
+
50% {
|
|
216
|
+
--_tail: 0deg;
|
|
217
|
+
|
|
218
|
+
animation-timing-function: ease-in-out;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
100% {
|
|
222
|
+
--_tail: 260deg;
|
|
223
|
+
}
|
|
224
|
+
}
|