@voidable/theme 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -8
- package/package.json +66 -8
- package/src/app-shell/detail.css +7 -5
- package/src/app-shell/subtable.css +7 -6
- package/src/base.css +28 -0
- package/src/components/accordion.css +96 -19
- package/src/components/action-input.css +51 -61
- package/src/components/alert.css +63 -23
- package/src/components/avatar.css +0 -2
- package/src/components/badge.css +35 -25
- package/src/components/banner.css +60 -19
- package/src/components/bar-chart.css +10 -3
- package/src/components/breadcrumbs.css +20 -16
- package/src/components/button.css +130 -55
- package/src/components/calendar.css +40 -17
- package/src/components/card.css +122 -23
- package/src/components/carousel.css +85 -118
- package/src/components/checkbox-group.css +3 -1
- package/src/components/checkbox.css +18 -23
- package/src/components/collapsible.css +95 -29
- package/src/components/color-picker.css +10 -10
- package/src/components/combobox.css +47 -29
- package/src/components/compose-input.css +3 -3
- package/src/components/dialog.css +115 -41
- package/src/components/divider.css +7 -4
- package/src/components/donut-chart.css +25 -15
- package/src/components/drawer.css +135 -68
- package/src/components/dropdown-menu.css +21 -43
- package/src/components/editable.css +7 -7
- package/src/components/error-fallback.css +48 -27
- package/src/components/field.css +12 -5
- package/src/components/file-upload.css +2 -1
- package/src/components/gauge.css +35 -23
- package/src/components/hamburger.css +10 -10
- package/src/components/hover-card.css +13 -113
- package/src/components/indicator.css +22 -18
- package/src/components/input.css +15 -12
- package/src/components/line-chart.css +10 -10
- package/src/components/list.css +28 -7
- package/src/components/menu.css +48 -33
- package/src/components/multiselect.css +57 -40
- package/src/components/nav-bar.css +23 -14
- package/src/components/nav-menu.css +31 -22
- package/src/components/number-input.css +56 -79
- package/src/components/overlay.css +215 -0
- package/src/components/pagination.css +42 -31
- package/src/components/panel.css +37 -11
- package/src/components/pin-input.css +23 -22
- package/src/components/popover.css +19 -35
- package/src/components/progress.css +19 -10
- package/src/components/radio-group.css +2 -1
- package/src/components/radio.css +15 -20
- package/src/components/scroll-area.css +3 -3
- package/src/components/segmented-control.css +46 -29
- package/src/components/select.css +99 -31
- package/src/components/sidebar.css +8 -4
- package/src/components/skeleton.css +8 -3
- package/src/components/slider.css +4 -2
- package/src/components/spinner.css +5 -4
- package/src/components/stat.css +59 -52
- package/src/components/status-dot.css +0 -1
- package/src/components/switch.css +18 -26
- package/src/components/table.css +443 -16
- package/src/components/tabs.css +92 -29
- package/src/components/tag.css +44 -20
- package/src/components/tags-input.css +43 -55
- package/src/components/textarea.css +15 -12
- package/src/components/toast.css +84 -22
- package/src/components/toggle.css +35 -42
- package/src/components/tooltip.css +19 -38
- package/src/core.css +98 -0
- package/src/forced-colors.css +134 -0
- package/src/index.css +4 -77
- package/src/knobs.css +101 -0
- package/src/layers.css +38 -0
- package/src/media/media.css +258 -0
- package/src/media/surface.css +143 -0
- package/src/patterns/data.css +461 -0
- package/src/patterns/page.css +348 -0
- package/src/patterns/shell.css +371 -0
- package/src/pre-upgrade.css +202 -0
- package/src/primitives.css +19 -97
- package/src/reset.css +45 -21
- package/src/skins/loft.css +114 -0
- package/src/skins/slab.css +107 -0
- package/src/themes/aurora.css +16 -0
- package/src/themes/capsule.css +16 -0
- package/src/themes/console.css +16 -0
- package/src/themes/dune.css +16 -0
- package/src/themes/iris.css +16 -0
- package/src/themes/orbit.css +16 -0
- package/src/themes/paper.css +18 -0
- package/src/themes/void.css +16 -0
- package/src/tokens.css +552 -98
- package/src/type.css +103 -0
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
void-combobox {
|
|
2
|
+
--_void-field-height: var(--void-control-height);
|
|
3
|
+
--_void-field-padding: var(--void-control-padding);
|
|
4
|
+
--_void-field-text: var(--void-control-text);
|
|
2
5
|
display: flex;
|
|
3
6
|
flex-direction: column;
|
|
4
|
-
gap: var(--void-space-
|
|
7
|
+
gap: var(--void-space-1h);
|
|
5
8
|
font-family: var(--void-font-sans);
|
|
6
9
|
position: relative;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
.void-combobox-input {
|
|
10
13
|
width: 100%;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
border
|
|
14
|
+
height: var(--_void-field-height);
|
|
15
|
+
padding: 0 var(--_void-field-padding);
|
|
16
|
+
background: var(--void-field-surface);
|
|
17
|
+
border: var(--void-control-border-width) solid var(--void-field-border);
|
|
18
|
+
border-radius: var(--void-control-radius);
|
|
15
19
|
color: var(--void-color-text);
|
|
16
20
|
font-family: inherit;
|
|
17
|
-
font-size: var(--
|
|
21
|
+
font-size: var(--_void-field-text);
|
|
18
22
|
line-height: var(--void-leading-normal);
|
|
19
23
|
outline: none;
|
|
20
24
|
transition: border-color var(--void-duration-fast) var(--void-ease-in-out),
|
|
@@ -22,13 +26,13 @@ void-combobox {
|
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
.void-combobox-input::placeholder { color: var(--void-color-text-muted); }
|
|
25
|
-
.void-combobox-input:hover { border-color: var(--void-
|
|
29
|
+
.void-combobox-input:hover { border-color: var(--void-field-border); }
|
|
26
30
|
.void-combobox-input:focus {
|
|
27
31
|
border-color: var(--void-color-border-focus);
|
|
28
32
|
box-shadow: 0 0 0 1px var(--void-color-border-focus);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
void-combobox[
|
|
35
|
+
void-combobox[open] .void-combobox-input {
|
|
32
36
|
border-color: var(--void-color-border-focus);
|
|
33
37
|
box-shadow: 0 0 0 1px var(--void-color-border-focus);
|
|
34
38
|
}
|
|
@@ -42,42 +46,57 @@ void-combobox[error]:not([error='']) .void-combobox-input:focus {
|
|
|
42
46
|
|
|
43
47
|
.void-combobox-error {
|
|
44
48
|
color: var(--void-color-error);
|
|
45
|
-
font-size: var(--void-
|
|
49
|
+
font-size: var(--void-type-caption-size);
|
|
50
|
+
line-height: var(--void-type-caption-leading);
|
|
46
51
|
}
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
/* The content part: a popover="manual" surface in the top layer, at least as
|
|
54
|
+
wide as the field; placement, flipping and transitions are shared
|
|
55
|
+
(overlay.css). */
|
|
56
|
+
void-combobox-content {
|
|
57
|
+
--void-overlay-gap: var(--void-space-1);
|
|
58
|
+
min-width: var(--void-overlay-anchor-width);
|
|
59
|
+
color: var(--void-color-text);
|
|
60
|
+
background: var(--void-float-surface);
|
|
61
|
+
border: var(--void-float-border-width) solid var(--void-float-border);
|
|
62
|
+
border-radius: var(--void-float-radius);
|
|
63
|
+
box-shadow: var(--void-float-shadow);
|
|
57
64
|
max-height: 16rem;
|
|
58
65
|
overflow-y: auto;
|
|
59
|
-
z-index: var(--void-z-dropdown);
|
|
60
66
|
padding: var(--void-space-1) 0;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
/* Each option is the author's void-option, wired as role="option": `active`
|
|
70
|
+
marks the highlighted one (aria-activedescendant), aria-selected the chosen
|
|
71
|
+
one. The typed text filters options out with `hidden`. */
|
|
72
|
+
void-combobox-content > void-option {
|
|
73
|
+
/* Flex, so rich content (an avatar, then the name) lines up. */
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: var(--void-space-2);
|
|
64
77
|
padding: var(--void-space-2) var(--void-space-3);
|
|
65
78
|
cursor: pointer;
|
|
66
79
|
color: var(--void-color-text);
|
|
67
|
-
font-size: var(--
|
|
80
|
+
font-size: var(--_void-field-text);
|
|
68
81
|
user-select: none;
|
|
69
82
|
transition: background var(--void-duration-fast) var(--void-ease-in-out);
|
|
70
83
|
}
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
void-combobox-content > void-option[hidden] { display: none; }
|
|
85
|
+
void-combobox-content > void-option:hover { background: var(--void-color-bg-hover); }
|
|
86
|
+
void-combobox-content > void-option[aria-selected='true'] { font-weight: var(--void-weight-medium); }
|
|
87
|
+
void-combobox-content > void-option[active] {
|
|
73
88
|
background: var(--void-color-accent);
|
|
74
89
|
color: var(--void-color-text-on-accent);
|
|
75
90
|
}
|
|
91
|
+
void-combobox-content > void-option[disabled] { opacity: 0.5; cursor: default; }
|
|
76
92
|
|
|
77
|
-
.
|
|
93
|
+
/* Nothing matches what was typed. */
|
|
94
|
+
void-combobox-content[empty]::after {
|
|
95
|
+
content: 'No options found';
|
|
96
|
+
display: block;
|
|
78
97
|
padding: var(--void-space-2) var(--void-space-3);
|
|
79
98
|
color: var(--void-color-text-muted);
|
|
80
|
-
font-size: var(--
|
|
99
|
+
font-size: var(--_void-field-text);
|
|
81
100
|
}
|
|
82
101
|
|
|
83
102
|
void-combobox[disabled] {
|
|
@@ -86,7 +105,6 @@ void-combobox[disabled] {
|
|
|
86
105
|
}
|
|
87
106
|
void-combobox[disabled] .void-combobox-input { cursor: not-allowed; }
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
void-combobox[size='
|
|
91
|
-
void-combobox[size='
|
|
92
|
-
void-combobox[size='xxl'] .void-combobox-input { padding: var(--void-space-5) var(--void-space-6); font-size: var(--void-text-xl); }
|
|
108
|
+
/* Size variants: each step sets the field tokens and nothing else */
|
|
109
|
+
void-combobox[size='sm'] { --_void-field-height: var(--void-control-height-sm); --_void-field-padding: var(--void-control-padding-sm); --_void-field-text: var(--void-control-text-sm); }
|
|
110
|
+
void-combobox[size='lg'] { --_void-field-height: var(--void-control-height-lg); --_void-field-padding: var(--void-control-padding-lg); --_void-field-text: var(--void-control-text-lg); }
|
|
@@ -8,8 +8,8 @@ void-compose-input {
|
|
|
8
8
|
align-items: flex-end;
|
|
9
9
|
gap: var(--void-space-2);
|
|
10
10
|
padding: var(--void-space-2);
|
|
11
|
-
background: var(--void-
|
|
12
|
-
border:
|
|
11
|
+
background: var(--void-field-surface);
|
|
12
|
+
border: var(--void-control-border-width) solid var(--void-field-border);
|
|
13
13
|
border-radius: var(--void-radius-lg);
|
|
14
14
|
transition: border-color var(--void-duration-fast) var(--void-ease-in-out);
|
|
15
15
|
}
|
|
@@ -45,7 +45,7 @@ void-compose-input {
|
|
|
45
45
|
width: 2rem;
|
|
46
46
|
height: 2rem;
|
|
47
47
|
border: none;
|
|
48
|
-
border-radius: var(--void-radius
|
|
48
|
+
border-radius: var(--void-control-radius);
|
|
49
49
|
background: var(--void-color-accent);
|
|
50
50
|
color: var(--void-color-text-on-accent);
|
|
51
51
|
cursor: pointer;
|
|
@@ -1,53 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* The host only carries attributes. Its parts (title, description, body,
|
|
2
|
+
actions) are its own children, shown inside a native <dialog> that lives in
|
|
3
|
+
the host's shadow root (::part(surface)), with the close button
|
|
4
|
+
(::part(close)). Before the element upgrades there is no <dialog>, so the
|
|
5
|
+
parts must not show inline (pre-upgrade.css). */
|
|
6
|
+
/* @tokens void-dialog
|
|
7
|
+
--void-dialog-radius Corner radius of the panel (::part(surface)).
|
|
8
|
+
--void-dialog-shadow Shadow of the panel (::part(surface)). */
|
|
4
9
|
|
|
5
|
-
void-dialog
|
|
10
|
+
void-dialog {
|
|
6
11
|
display: contents;
|
|
12
|
+
/* The title row is one step above the large control (56px by default,
|
|
13
|
+
52px under a denser skin), whatever the title's own leading, so a
|
|
14
|
+
dialog, a drawer and their close buttons line up with each other. */
|
|
15
|
+
--_void-dialog-row: calc(var(--void-control-height-lg) + var(--void-space-3));
|
|
16
|
+
--_void-dialog-title-inset: calc((var(--_void-dialog-row) - var(--void-type-heading-size) * var(--void-type-heading-leading)) / 2);
|
|
7
17
|
}
|
|
8
18
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.void-dialog-panel {
|
|
20
|
-
background: var(--void-color-bg-elevated);
|
|
21
|
-
border: 1px solid var(--void-color-border);
|
|
22
|
-
border-radius: var(--void-radius-lg);
|
|
23
|
-
box-shadow: var(--void-shadow-lg);
|
|
19
|
+
/* Modal panel in the top layer (showModal); ::backdrop and transitions in overlay.css. */
|
|
20
|
+
void-dialog::part(surface) {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
margin: auto;
|
|
23
|
+
padding: 0;
|
|
24
|
+
background: var(--void-float-surface);
|
|
25
|
+
color: var(--void-color-text);
|
|
26
|
+
border: var(--void-float-border-width) solid var(--void-float-border);
|
|
27
|
+
border-radius: var(--void-dialog-radius, var(--void-radius-xl));
|
|
28
|
+
box-shadow: var(--void-dialog-shadow, var(--void-shadow-lg));
|
|
24
29
|
max-height: 85vh;
|
|
30
|
+
max-height: 85dvh;
|
|
25
31
|
overflow-y: auto;
|
|
26
|
-
width: 100
|
|
32
|
+
width: calc(100% - 2 * var(--void-space-4));
|
|
27
33
|
max-width: 32rem;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
scale: 0.97;
|
|
28
36
|
}
|
|
29
37
|
|
|
30
|
-
void-dialog[
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
void-dialog[open]::part(surface) {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
scale: 1;
|
|
41
|
+
}
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
@starting-style {
|
|
44
|
+
void-dialog[open]::part(surface) {
|
|
45
|
+
opacity: 0;
|
|
46
|
+
scale: 0.97;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
void-dialog[size="sm"]::part(surface) { max-width: 24rem; }
|
|
51
|
+
void-dialog[size="md"]::part(surface) { max-width: 32rem; }
|
|
52
|
+
void-dialog[size="lg"]::part(surface) { max-width: 48rem; }
|
|
53
|
+
|
|
54
|
+
/* The title row: the close button sits at its far end. */
|
|
55
|
+
void-dialog-title {
|
|
56
|
+
display: block;
|
|
57
|
+
margin: 0;
|
|
58
|
+
/* Room for the close button, which is laid over the end of the row. */
|
|
59
|
+
padding: var(--_void-dialog-title-inset) calc(var(--void-container-padding) + 1.5rem + var(--void-space-2)) var(--_void-dialog-title-inset) var(--void-container-padding);
|
|
60
|
+
border-bottom: var(--void-rule-head);
|
|
61
|
+
font-family: var(--void-type-heading-family);
|
|
62
|
+
font-size: var(--void-type-heading-size);
|
|
63
|
+
line-height: var(--void-type-heading-leading);
|
|
64
|
+
font-weight: var(--void-type-heading-weight);
|
|
65
|
+
letter-spacing: var(--void-type-heading-tracking);
|
|
66
|
+
color: var(--void-type-heading-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
void-dialog[hide-close] void-dialog-title {
|
|
70
|
+
padding-inline-end: var(--void-container-padding);
|
|
41
71
|
}
|
|
42
72
|
|
|
43
|
-
.
|
|
73
|
+
/* A description joins the title's row: the hairline moves below it. */
|
|
74
|
+
void-dialog-title:has(+ void-dialog-description) {
|
|
75
|
+
padding-bottom: var(--void-space-1);
|
|
76
|
+
border-bottom: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void-dialog-description {
|
|
80
|
+
display: block;
|
|
81
|
+
padding: 0 var(--void-container-padding) var(--void-space-4);
|
|
82
|
+
border-bottom: var(--void-rule-head);
|
|
44
83
|
font-family: var(--void-font-sans);
|
|
45
|
-
font-size: var(--void-
|
|
46
|
-
|
|
84
|
+
font-size: var(--void-type-body-size);
|
|
85
|
+
color: var(--void-color-text-secondary);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
void-dialog-body {
|
|
89
|
+
display: block;
|
|
90
|
+
padding: var(--void-container-padding);
|
|
91
|
+
font-family: var(--void-font-sans);
|
|
92
|
+
font-size: var(--void-type-body-size);
|
|
47
93
|
color: var(--void-color-text);
|
|
48
94
|
}
|
|
49
95
|
|
|
50
|
-
|
|
96
|
+
|
|
97
|
+
/* Blocks written straight into the body (a paragraph, then a field) sit a
|
|
98
|
+
step apart. The scoped reset removes every margin, so without this a label
|
|
99
|
+
sat directly under the sentence above it. Only block-level content is
|
|
100
|
+
named: text with inline markup, and a row of buttons, are left alone. For
|
|
101
|
+
another rhythm, wrap the content in void-stack. */
|
|
102
|
+
void-dialog-body > :where(p, ul, ol, dl, pre, blockquote, form, fieldset, table, figure, div, section, h2, h3, h4, h5, h6, void-field, void-stack, void-alert, void-banner, void-rows, void-description-list, void-checkbox-group, void-radio-group, void-table, void-card, void-panel, void-list, void-divider, void-figures, void-split, void-input, void-textarea, void-select, void-combobox, void-progress) + :where(p, ul, ol, dl, pre, blockquote, form, fieldset, table, figure, div, section, h2, h3, h4, h5, h6, void-field, void-stack, void-alert, void-banner, void-rows, void-description-list, void-checkbox-group, void-radio-group, void-table, void-card, void-panel, void-list, void-divider, void-figures, void-split, void-input, void-textarea, void-select, void-combobox, void-progress) {
|
|
103
|
+
margin-block-start: var(--void-gap-inside);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* The actions close the dialog: they stand clear of the last line or field
|
|
107
|
+
of the body (the body's own padding plus a step), and keep the container
|
|
108
|
+
padding below and beside them. */
|
|
109
|
+
void-dialog-actions {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-wrap: wrap;
|
|
112
|
+
justify-content: flex-end;
|
|
113
|
+
gap: var(--void-space-2);
|
|
114
|
+
padding: var(--void-space-3) var(--void-container-padding) var(--void-container-padding);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Actions straight after the title: they need their own top space. */
|
|
118
|
+
:is(void-dialog-title, void-dialog-description) + void-dialog-actions {
|
|
119
|
+
padding-top: var(--void-container-padding);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
void-dialog::part(close) {
|
|
123
|
+
position: absolute;
|
|
124
|
+
/* Centred in the title row. */
|
|
125
|
+
top: calc((var(--_void-dialog-row) - 1.5rem) / 2);
|
|
126
|
+
inset-inline-end: var(--void-container-padding);
|
|
51
127
|
display: inline-flex;
|
|
52
128
|
align-items: center;
|
|
53
129
|
justify-content: center;
|
|
@@ -62,16 +138,14 @@ void-dialog[size="xl"] .void-dialog-panel { max-width: 64rem; }
|
|
|
62
138
|
cursor: pointer;
|
|
63
139
|
opacity: 0.6;
|
|
64
140
|
transition: opacity var(--void-duration-fast) var(--void-ease-in-out);
|
|
65
|
-
flex-shrink: 0;
|
|
66
141
|
}
|
|
67
142
|
|
|
68
|
-
|
|
143
|
+
void-dialog::part(close):hover {
|
|
69
144
|
opacity: 1;
|
|
70
145
|
}
|
|
71
146
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
color: var(--void-color-text);
|
|
147
|
+
void-dialog::part(close):focus-visible {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
outline: var(--void-focus-ring-width) solid var(--void-focus-ring-color);
|
|
150
|
+
outline-offset: var(--void-focus-ring-offset);
|
|
77
151
|
}
|
|
@@ -2,10 +2,13 @@ void-divider {
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: var(--void-space-3);
|
|
5
|
-
|
|
6
|
-
font-
|
|
7
|
-
|
|
8
|
-
font-weight: var(--void-weight
|
|
5
|
+
font-family: var(--void-type-label-family);
|
|
6
|
+
font-size: var(--void-type-label-size);
|
|
7
|
+
line-height: var(--void-type-label-leading);
|
|
8
|
+
font-weight: var(--void-type-label-weight);
|
|
9
|
+
letter-spacing: var(--void-type-label-tracking);
|
|
10
|
+
text-transform: var(--void-type-label-case);
|
|
11
|
+
color: var(--void-type-label-color);
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
/* Horizontal line via pseudo-elements */
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
/* ============================================================
|
|
2
2
|
void-donut-chart — light DOM SVG, theme-driven
|
|
3
3
|
============================================================ */
|
|
4
|
+
/* @tokens void-donut-chart
|
|
5
|
+
--void-donut-chart-size Setting: the largest width (and height) of the chart. It fills its container up to this and shrinks with it below. */
|
|
4
6
|
|
|
7
|
+
/* A square that fills its container up to a ceiling. Without the ceiling
|
|
8
|
+
the SVG (width: 100%) grew to the full width of whatever held it, so a
|
|
9
|
+
donut beside a bar chart was several times its height. */
|
|
5
10
|
void-donut-chart {
|
|
6
|
-
display:
|
|
11
|
+
display: block;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
inline-size: 100%;
|
|
14
|
+
max-inline-size: var(--void-donut-chart-size, 13.75rem);
|
|
15
|
+
aspect-ratio: 1;
|
|
7
16
|
font-family: var(--void-font-mono);
|
|
8
17
|
color: var(--void-color-text);
|
|
9
18
|
}
|
|
@@ -22,28 +31,29 @@ void-donut-chart svg {
|
|
|
22
31
|
void-donut-chart .void-donut-chart-segment {
|
|
23
32
|
fill: var(--segment-color, var(--void-color-accent));
|
|
24
33
|
stroke: var(--segment-color, var(--void-color-accent));
|
|
25
|
-
stroke-width:
|
|
34
|
+
stroke-width: var(--void-chart-stroke-none);
|
|
26
35
|
}
|
|
27
36
|
|
|
28
37
|
/* 'outline' variant — tinted fill + stroke */
|
|
29
38
|
void-donut-chart[variant="outline"] .void-donut-chart-segment {
|
|
30
39
|
fill: color-mix(in srgb, var(--segment-color, var(--void-color-accent)) 18%, transparent);
|
|
31
|
-
stroke-width:
|
|
40
|
+
stroke-width: var(--void-chart-stroke-thin);
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
/* 'wireframe' variant — stroke only */
|
|
35
44
|
void-donut-chart[variant="wireframe"] .void-donut-chart-segment {
|
|
36
45
|
fill: none;
|
|
37
|
-
stroke-width:
|
|
46
|
+
stroke-width: var(--void-chart-stroke-thin);
|
|
38
47
|
}
|
|
39
48
|
|
|
40
49
|
/* Center total (when show-total) */
|
|
41
50
|
void-donut-chart .void-donut-chart-total text {
|
|
42
|
-
font-family: var(--void-
|
|
51
|
+
font-family: var(--void-type-value-family);
|
|
43
52
|
font-size: var(--void-text-xl);
|
|
44
|
-
font-weight: var(--void-weight
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
font-weight: var(--void-type-value-weight);
|
|
54
|
+
font-variant-numeric: var(--void-type-value-numeric);
|
|
55
|
+
fill: var(--void-type-value-color);
|
|
56
|
+
letter-spacing: var(--void-type-value-tracking);
|
|
47
57
|
}
|
|
48
58
|
|
|
49
59
|
/* Per-segment labels (when show-values).
|
|
@@ -59,7 +69,7 @@ void-donut-chart .void-donut-chart-labels text {
|
|
|
59
69
|
letter-spacing: var(--void-tracking-wide);
|
|
60
70
|
paint-order: stroke;
|
|
61
71
|
stroke: var(--void-color-bg);
|
|
62
|
-
stroke-width:
|
|
72
|
+
stroke-width: var(--void-chart-stroke-thick);
|
|
63
73
|
stroke-linejoin: round;
|
|
64
74
|
stroke-linecap: round;
|
|
65
75
|
pointer-events: none;
|
|
@@ -70,16 +80,16 @@ void-donut-chart .void-donut-chart-labels text {
|
|
|
70
80
|
void-donut-chart .void-donut-chart-tooltip-bg {
|
|
71
81
|
fill: var(--void-color-bg-elevated);
|
|
72
82
|
stroke: var(--void-color-border);
|
|
73
|
-
stroke-width:
|
|
83
|
+
stroke-width: var(--void-chart-stroke-hairline);
|
|
74
84
|
}
|
|
75
85
|
|
|
76
86
|
void-donut-chart .void-donut-chart-tooltip-name {
|
|
77
|
-
font-family: var(--void-
|
|
78
|
-
font-size: var(--void-
|
|
79
|
-
font-weight: var(--void-weight
|
|
87
|
+
font-family: var(--void-type-label-family);
|
|
88
|
+
font-size: var(--void-type-label-size);
|
|
89
|
+
font-weight: var(--void-type-label-weight);
|
|
80
90
|
fill: var(--void-color-text);
|
|
81
|
-
text-transform:
|
|
82
|
-
letter-spacing: var(--void-tracking
|
|
91
|
+
text-transform: var(--void-type-label-case);
|
|
92
|
+
letter-spacing: var(--void-type-label-tracking);
|
|
83
93
|
}
|
|
84
94
|
|
|
85
95
|
void-donut-chart .void-donut-chart-tooltip-value {
|