@rcarls/rc-theme-substrate 0.5.0 → 0.7.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/CHANGELOG.md +417 -0
- package/README.md +23 -0
- package/bridge.css +47 -17
- package/components/accordion.css +10 -111
- package/components/adaptive-menu.css +98 -0
- package/components/app-bar.css +1 -5
- package/components/bottom-sheet.css +1 -1
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/dialog.css +15 -11
- package/components/disclosure.css +56 -72
- package/components/fab-menu.css +3 -3
- package/components/field.css +155 -0
- package/components/list-item.css +36 -33
- package/components/listbox.css +4 -2
- package/components/markdown-editor.css +45 -32
- package/components/menu.css +11 -6
- package/components/modes.css +36 -0
- package/components/popover.css +13 -0
- package/components/progress.css +11 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +3 -1
- package/components/segmented-button.css +2 -27
- package/components/select.css +21 -0
- package/components/splitter.css +27 -2
- package/components/textarea.css +3 -2
- package/components/toolbar.css +9 -4
- package/components/tooltip.css +15 -0
- package/components/transfer-list.css +3 -3
- package/components/virtual-canvas.css +10 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +11 -1
- package/css-components/button.css +66 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +80 -0
- package/css-components/disclosure.css +25 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +20 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +34 -5
- package/native.css +249 -0
- package/package.json +5 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list {
|
|
3
3
|
--rc-transfer-list-gap: 1rem;
|
|
4
|
-
--rc-transfer-list-
|
|
5
|
-
--rc-transfer-list-
|
|
6
|
-
--rc-transfer-list-
|
|
4
|
+
--rc-transfer-list-listbox-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
--rc-transfer-list-listbox-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
--rc-transfer-list-listbox-bg: var(--substrate-surface-raised, Canvas);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(panel),
|
|
@@ -4,5 +4,15 @@
|
|
|
4
4
|
border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
5
|
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
6
|
background: var(--substrate-surface, Canvas);
|
|
7
|
+
|
|
8
|
+
--rc-virtual-canvas-scrollbar-size: 0.75rem;
|
|
9
|
+
--rc-virtual-canvas-scrollbar-width: thin;
|
|
10
|
+
--rc-virtual-canvas-scrollbar-track-background: transparent;
|
|
11
|
+
--rc-virtual-canvas-scrollbar-thumb-background: color-mix(
|
|
12
|
+
in srgb,
|
|
13
|
+
var(--substrate-on-surface-muted, GrayText) 45%,
|
|
14
|
+
transparent
|
|
15
|
+
);
|
|
16
|
+
--rc-virtual-canvas-scrollbar-button-background: var(--substrate-surface-raised, ButtonFace);
|
|
7
17
|
}
|
|
8
18
|
}
|
package/components.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
@layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components
|
|
1
|
+
@layer rc-base, rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.native, rc-theme-substrate.components, rc-theme-substrate.css-components,
|
|
2
|
+
rc-theme-substrate.overrides;
|
|
2
3
|
|
|
3
4
|
@import './components/icons.css';
|
|
4
5
|
@import './components/listbox.css';
|
|
5
6
|
@import './components/select.css';
|
|
6
7
|
@import './components/combobox.css';
|
|
7
8
|
@import './components/search-bar.css';
|
|
9
|
+
@import './components/field.css';
|
|
8
10
|
@import './components/bottom-sheet.css';
|
|
9
11
|
@import './components/textarea.css';
|
|
10
12
|
@import './components/markdown-editor.css';
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
@import './components/toolbar.css';
|
|
25
27
|
@import './components/segmented-button.css';
|
|
26
28
|
@import './components/slider.css';
|
|
29
|
+
@import './components/progress.css';
|
|
27
30
|
@import './components/snackbar.css';
|
|
28
31
|
@import './components/range-slider.css';
|
|
29
32
|
@import './components/splitter.css';
|
|
@@ -32,4 +35,11 @@
|
|
|
32
35
|
@import './components/disclosure.css';
|
|
33
36
|
@import './components/accordion.css';
|
|
34
37
|
@import './components/virtual-canvas.css';
|
|
38
|
+
@import './components/adaptive-menu.css';
|
|
39
|
+
@import './components/carousel.css';
|
|
40
|
+
@import './components/chip-group.css';
|
|
41
|
+
@import './components/scroller.css';
|
|
42
|
+
@import './components/virtual-scroller.css';
|
|
43
|
+
@import './components/tooltip.css';
|
|
44
|
+
@import './components/popover.css';
|
|
35
45
|
@import './components/modes.css';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
4
|
+
:where(rc-button > a)
|
|
5
|
+
) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: var(--rc-button-gap, 0.5rem);
|
|
10
|
+
min-block-size: var(--rc-button-block-size, 2.5rem);
|
|
11
|
+
padding-block: var(--rc-button-padding-block, 0.5rem);
|
|
12
|
+
padding-inline: var(--rc-button-padding-inline, 1.5rem);
|
|
13
|
+
border: var(--rc-button-border, var(--rc-border, 1px solid ButtonBorder));
|
|
14
|
+
border-radius: var(--rc-button-radius, var(--rc-control-radius, 999px));
|
|
15
|
+
background: var(--rc-button-bg, ButtonFace);
|
|
16
|
+
color: var(--rc-button-color, var(--rc-button-text, ButtonText));
|
|
17
|
+
font: var(--rc-button-font, inherit);
|
|
18
|
+
text-decoration: var(--rc-button-text-decoration, none);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
user-select: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
24
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
25
|
+
:where(rc-button > a)
|
|
26
|
+
):hover:not(:where(:disabled)) {
|
|
27
|
+
background: color-mix(in srgb, currentColor 8%, var(--rc-button-bg, ButtonFace));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
31
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
32
|
+
:where(rc-button > a)
|
|
33
|
+
):active:not(:where(:disabled)),
|
|
34
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
35
|
+
:where(button.rc-button, a[href].rc-button)[aria-pressed='true']:not(
|
|
36
|
+
:where(rc-button > button)
|
|
37
|
+
):not(:where(rc-button > a)) {
|
|
38
|
+
background: var(--rc-highlight, Highlight);
|
|
39
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
43
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
44
|
+
:where(rc-button > a)
|
|
45
|
+
):focus-visible {
|
|
46
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
47
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
51
|
+
:where(button.rc-button, a[href].rc-button):is(:disabled, [aria-disabled='true']) {
|
|
52
|
+
color: var(--rc-text-disabled, GrayText);
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (forced-colors: active) {
|
|
57
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
58
|
+
:where(button.rc-button, a[href].rc-button)[aria-pressed='true'] {
|
|
59
|
+
border-color: Highlight;
|
|
60
|
+
outline: 1px solid Highlight;
|
|
61
|
+
outline-offset: -1px;
|
|
62
|
+
background: Highlight;
|
|
63
|
+
color: HighlightText;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-card {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--rc-card-actions-gap, 0.5rem);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding-block: var(--rc-card-padding-block, 1rem);
|
|
7
|
+
padding-inline: var(--rc-card-padding-inline, 1rem);
|
|
8
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
9
|
+
border-radius: var(--rc-card-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-card-bg, var(--rc-surface, Canvas));
|
|
11
|
+
color: var(--rc-card-color, CanvasText);
|
|
12
|
+
box-shadow: var(--rc-shadow, none);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-chip-group {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--rc-chip-group-row-gap, var(--rc-control-gap, 0.5rem))
|
|
7
|
+
var(--rc-chip-group-column-gap, var(--rc-control-gap, 0.5rem));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
4
|
+
:where(rc-chip > a)
|
|
5
|
+
):not(:where(rc-chip > label)) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: var(--rc-chip-gap, 0.25rem);
|
|
10
|
+
min-block-size: var(--rc-chip-block-size, 2rem);
|
|
11
|
+
padding-block: var(--rc-chip-padding-block, 0.25rem);
|
|
12
|
+
padding-inline: var(--rc-chip-padding-inline, 1rem);
|
|
13
|
+
border: var(--rc-chip-border, var(--rc-border, 1px solid ButtonBorder));
|
|
14
|
+
border-radius: var(--rc-chip-radius, 0.5rem);
|
|
15
|
+
background: var(--rc-chip-bg, ButtonFace);
|
|
16
|
+
color: var(--rc-chip-color, ButtonText);
|
|
17
|
+
font: var(--rc-chip-font, inherit);
|
|
18
|
+
text-decoration: var(--rc-chip-text-decoration, none);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
23
|
+
label.rc-chip
|
|
24
|
+
> :where(input[type='checkbox'], input[type='radio']) {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inline-size: 1px;
|
|
27
|
+
block-size: 1px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
clip-path: inset(50%);
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
34
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
35
|
+
:where(rc-chip > a)
|
|
36
|
+
):not(:where(rc-chip > label)):hover:not(:where(:disabled)):not(:has(input:disabled)) {
|
|
37
|
+
background: color-mix(in srgb, currentColor 8%, var(--rc-chip-bg, ButtonFace));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
41
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
42
|
+
:where(rc-chip > a)
|
|
43
|
+
):not(:where(rc-chip > label)):has(input:checked) {
|
|
44
|
+
background: var(--rc-chip-selected-bg, Highlight);
|
|
45
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
49
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
50
|
+
:where(rc-chip > a)
|
|
51
|
+
):not(:where(rc-chip > label)):is(:focus-visible, :has(input:focus-visible)) {
|
|
52
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
53
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
57
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
58
|
+
:where(rc-chip > a)
|
|
59
|
+
):not(:where(rc-chip > label)):has(input:disabled) {
|
|
60
|
+
color: var(--rc-text-disabled, GrayText);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
65
|
+
:where(button.rc-chip, a[href].rc-chip):is(:disabled, [aria-disabled='true']) {
|
|
66
|
+
color: var(--rc-text-disabled, GrayText);
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (forced-colors: active) {
|
|
71
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
72
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):has(input:checked) {
|
|
73
|
+
border-color: Highlight;
|
|
74
|
+
outline: 1px solid Highlight;
|
|
75
|
+
outline-offset: -1px;
|
|
76
|
+
background: Highlight;
|
|
77
|
+
color: HighlightText;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
details.rc-disclosure:not(:where(rc-disclosure > details)) {
|
|
4
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
5
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
6
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
7
|
+
border-radius: var(--rc-card-radius, var(--rc-control-radius, 0.5rem));
|
|
8
|
+
background: var(--rc-surface, Canvas);
|
|
9
|
+
color: var(--rc-field-text, CanvasText);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
13
|
+
details.rc-disclosure:not(:where(rc-disclosure > details))
|
|
14
|
+
> summary {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
20
|
+
details.rc-disclosure:not(:where(rc-disclosure > details))
|
|
21
|
+
> summary:focus-visible {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--rc-list-item-gap, 0.5rem);
|
|
5
|
+
margin-block: 0;
|
|
6
|
+
padding-inline-start: 0;
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list > li {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
min-block-size: var(--rc-list-item-min-block-size, 3rem);
|
|
14
|
+
padding-block: var(--rc-list-item-padding-block, 0.5rem);
|
|
15
|
+
padding-inline: var(--rc-list-item-padding-inline, 1rem);
|
|
16
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list > li[aria-selected='true'],
|
|
20
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list > li:has(input:checked) {
|
|
21
|
+
background: var(--rc-list-item-selected-bg, Highlight);
|
|
22
|
+
color: var(--rc-list-item-selected-color, HighlightText);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (forced-colors: active) {
|
|
26
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
27
|
+
.rc-list
|
|
28
|
+
> li:is([aria-selected='true'], :has(input:checked)) {
|
|
29
|
+
border-color: Highlight;
|
|
30
|
+
outline: 1px solid Highlight;
|
|
31
|
+
outline-offset: -1px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
select.rc-select:not(:where(rc-select > select)) {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
min-block-size: var(--rc-select-control-block-size, var(--rc-control-block-size, 2.5rem));
|
|
6
|
+
padding-block: var(--rc-select-padding-block, var(--rc-control-padding-block, 0.5rem));
|
|
7
|
+
padding-inline: var(--rc-select-padding-inline, var(--rc-control-padding-inline, 1rem));
|
|
8
|
+
border: var(--rc-select-border, var(--rc-border, 1px solid ButtonBorder));
|
|
9
|
+
border-radius: var(--rc-select-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-field, Field);
|
|
11
|
+
color: var(--rc-field-text, FieldText);
|
|
12
|
+
font: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
16
|
+
select.rc-select:not(:where(rc-select > select)):focus-visible {
|
|
17
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
18
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
textarea.rc-textarea:not(:where(rc-textarea > textarea)) {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
6
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
7
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
8
|
+
border: var(--rc-textarea-border, var(--rc-border, 1px solid ButtonBorder));
|
|
9
|
+
border-radius: var(--rc-textarea-border-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-textarea-background, var(--rc-field, Field));
|
|
11
|
+
color: var(--rc-textarea-color, var(--rc-field-text, FieldText));
|
|
12
|
+
caret-color: var(--rc-textarea-caret-color, var(--rc-accent, AccentColor));
|
|
13
|
+
font: inherit;
|
|
14
|
+
resize: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
18
|
+
textarea.rc-textarea:not(:where(rc-textarea > textarea)):focus-visible {
|
|
19
|
+
outline: var(--rc-textarea-focus-outline, var(--rc-focus-ring, 2px solid Highlight));
|
|
20
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.native, rc-theme-substrate.components, rc-theme-substrate.css-components,
|
|
2
|
+
rc-theme-substrate.overrides;
|
|
3
|
+
|
|
4
|
+
@import './css-components/button.css';
|
|
5
|
+
@import './css-components/chip.css';
|
|
6
|
+
@import './css-components/chip-group.css';
|
|
7
|
+
@import './css-components/select.css';
|
|
8
|
+
@import './css-components/textarea.css';
|
|
9
|
+
@import './css-components/card.css';
|
|
10
|
+
@import './css-components/list.css';
|
|
11
|
+
@import './css-components/disclosure.css';
|
|
12
|
+
|
|
13
|
+
@layer rc-theme-substrate.css-components {
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
16
|
+
:where(
|
|
17
|
+
button.rc-button,
|
|
18
|
+
a.rc-button,
|
|
19
|
+
button.rc-chip,
|
|
20
|
+
a.rc-chip,
|
|
21
|
+
label.rc-chip,
|
|
22
|
+
select.rc-select,
|
|
23
|
+
textarea.rc-textarea,
|
|
24
|
+
.rc-card,
|
|
25
|
+
.rc-list,
|
|
26
|
+
details.rc-disclosure
|
|
27
|
+
) {
|
|
28
|
+
forced-color-adjust: auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/defaults.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components
|
|
1
|
+
@layer rc-base, rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.native, rc-theme-substrate.components, rc-theme-substrate.css-components,
|
|
2
|
+
rc-theme-substrate.overrides;
|
|
2
3
|
|
|
3
4
|
@layer rc-theme-substrate.defaults {
|
|
4
5
|
/*
|
|
@@ -24,6 +25,17 @@
|
|
|
24
25
|
--substrate-border-color: light-dark(oklch(83% 0.018 75), oklch(39% 0.018 72));
|
|
25
26
|
--substrate-shadow-color: light-dark(oklch(16% 0.03 60 / 18%), oklch(0% 0 0 / 42%));
|
|
26
27
|
|
|
28
|
+
/* Flipped against the surface pair, for the snackbar and anything else
|
|
29
|
+
* that has to read as a layer above the page rather than part of it. */
|
|
30
|
+
--substrate-inverse-surface: light-dark(oklch(27% 0.018 72), oklch(93% 0.01 80));
|
|
31
|
+
--substrate-inverse-on-surface: light-dark(oklch(96% 0.01 80), oklch(21% 0.018 72));
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* Held at hue 25 so it reads as red rather than as a darker shade of the
|
|
35
|
+
* primary, which sits at hue 48. Clears 7:1 against the field in both modes.
|
|
36
|
+
*/
|
|
37
|
+
--substrate-error: light-dark(oklch(47% 0.19 25), oklch(74% 0.15 25));
|
|
38
|
+
|
|
27
39
|
--substrate-font-family:
|
|
28
40
|
system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell,
|
|
29
41
|
'Noto Sans', sans-serif;
|
|
@@ -35,6 +47,7 @@
|
|
|
35
47
|
--substrate-radius-md: 0.5rem;
|
|
36
48
|
--substrate-radius-lg: 0.75rem;
|
|
37
49
|
--substrate-radius-xl: 1rem;
|
|
50
|
+
--substrate-radius-pill: 999px;
|
|
38
51
|
|
|
39
52
|
--substrate-control-block-size: 2.5rem;
|
|
40
53
|
--substrate-control-padding-block: 0.5rem;
|
|
@@ -46,17 +59,30 @@
|
|
|
46
59
|
|
|
47
60
|
--substrate-shadow-sm: 0 1px 2px var(--substrate-shadow-color);
|
|
48
61
|
--substrate-shadow-md:
|
|
49
|
-
0 1px 2px var(--substrate-shadow-color),
|
|
50
|
-
color-mix(in oklch, var(--substrate-shadow-color) 65%, transparent);
|
|
62
|
+
0 1px 2px var(--substrate-shadow-color),
|
|
63
|
+
0 10px 30px color-mix(in oklch, var(--substrate-shadow-color) 65%, transparent);
|
|
51
64
|
--substrate-shadow-lg:
|
|
52
|
-
0 1px 2px var(--substrate-shadow-color),
|
|
53
|
-
color-mix(in oklch, var(--substrate-shadow-color) 80%, transparent);
|
|
65
|
+
0 1px 2px var(--substrate-shadow-color),
|
|
66
|
+
0 18px 48px color-mix(in oklch, var(--substrate-shadow-color) 80%, transparent);
|
|
54
67
|
|
|
55
68
|
--substrate-focus-ring: 2px solid var(--substrate-primary);
|
|
56
69
|
--substrate-focus-ring-offset: 2px;
|
|
57
70
|
--substrate-motion-duration: 160ms;
|
|
58
71
|
--substrate-motion-duration-slow: 240ms;
|
|
59
72
|
--substrate-motion-easing: cubic-bezier(0.2, 0, 0, 1);
|
|
73
|
+
/*
|
|
74
|
+
* The shared spatial/effects scale (see the styling guide), kept as its
|
|
75
|
+
* own small set of primitives rather than derived from the two above:
|
|
76
|
+
* Substrate favors few named tokens over a layered primitive/semantic
|
|
77
|
+
* split, and the values only partly overlap (160/240ms already meant
|
|
78
|
+
* something as the flat scale; here they mean the spatial tier).
|
|
79
|
+
*/
|
|
80
|
+
--substrate-motion-effects-duration-fast: 100ms;
|
|
81
|
+
--substrate-motion-effects-duration-default: 160ms;
|
|
82
|
+
--substrate-motion-effects-duration-slow: 240ms;
|
|
83
|
+
--substrate-motion-spatial-duration-fast: 160ms;
|
|
84
|
+
--substrate-motion-spatial-duration-default: 240ms;
|
|
85
|
+
--substrate-motion-spatial-duration-slow: 320ms;
|
|
60
86
|
--substrate-disabled-opacity: 0.52;
|
|
61
87
|
}
|
|
62
88
|
|
|
@@ -72,6 +98,9 @@
|
|
|
72
98
|
--substrate-field: Field;
|
|
73
99
|
--substrate-on-surface: CanvasText;
|
|
74
100
|
--substrate-on-surface-muted: GrayText;
|
|
101
|
+
--substrate-inverse-surface: CanvasText;
|
|
102
|
+
--substrate-inverse-on-surface: Canvas;
|
|
103
|
+
--substrate-error: Mark;
|
|
75
104
|
--substrate-border-color: ButtonBorder;
|
|
76
105
|
--substrate-shadow-color: transparent;
|
|
77
106
|
--substrate-focus-ring: 2px solid Highlight;
|