@rcarls/rc-theme-material 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 +600 -0
- package/DESIGN.md +1399 -0
- package/README.md +138 -5
- package/bridge.css +150 -55
- package/components/accordion.css +43 -157
- package/components/adaptive-menu.css +123 -0
- package/components/app-bar.css +49 -7
- package/components/bottom-sheet.css +10 -7
- package/components/button.css +215 -2
- package/components/card.css +2 -0
- package/components/carousel.css +23 -0
- package/components/chip-group.css +15 -0
- package/components/chip.css +12 -1
- package/components/combobox.css +68 -14
- package/components/dialog.css +77 -15
- package/components/disclosure.css +128 -84
- package/components/field.css +566 -0
- package/components/icons.css +48 -6
- package/components/list-item.css +142 -32
- package/components/listbox.css +5 -4
- package/components/markdown-editor.css +62 -35
- package/components/menu-button.css +105 -1
- package/components/menu.css +32 -16
- package/components/menubar.css +4 -1
- package/components/modes.css +36 -17
- package/components/navigation-bar.css +3 -5
- package/components/navigation-rail.css +5 -7
- package/components/popover.css +50 -0
- package/components/progress.css +15 -0
- package/components/range-slider.css +8 -3
- package/components/scroller.css +7 -0
- package/components/search-bar.css +12 -2
- package/components/segmented-button.css +2 -28
- package/components/select.css +106 -14
- package/components/splitter.css +4 -1
- package/components/switch.css +9 -1
- package/components/textarea.css +13 -3
- package/components/toolbar.css +2 -1
- package/components/tooltip.css +12 -0
- package/components/transfer-list.css +5 -1
- package/components/virtual-canvas.css +4 -1
- package/components/virtual-scroller.css +7 -0
- package/components.css +11 -1
- package/constraints/material.json +99 -0
- 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 +329 -14
- package/native.css +258 -0
- package/package.json +21 -2
- package/state-layer.css +5 -1
package/README.md
CHANGED
|
@@ -34,6 +34,30 @@ Selective component styles are also exported:
|
|
|
34
34
|
@import '@rcarls/rc-theme-material/components/menu.css';
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
Native HTML can opt into the same presentation without registering an RC
|
|
38
|
+
element. Import the defaults and bridge when needed, then opt into the native
|
|
39
|
+
layer and the CSS-only recipes independently:
|
|
40
|
+
|
|
41
|
+
```css
|
|
42
|
+
@import '@rcarls/rc-theme-material/defaults.css';
|
|
43
|
+
@import '@rcarls/rc-theme-material/bridge.css';
|
|
44
|
+
@import '@rcarls/rc-theme-material/native.css';
|
|
45
|
+
@import '@rcarls/rc-theme-material/css-components.css';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`native.css` is an optional convenience layer for giving ordinary buttons, text
|
|
49
|
+
fields, selects, textareas, checkboxes, radios, ranges, and progress controls a
|
|
50
|
+
Material treatment throughout `.rc-theme-material`. Component recipes style
|
|
51
|
+
native children when their presentation belongs to a themed menu, toolbar, or
|
|
52
|
+
other component context. Add `data-rc-native="off"` to an element to opt it and
|
|
53
|
+
its descendants out of the native layer. The
|
|
54
|
+
opt-in `css-components.css` recipes cover `.rc-button`, `.rc-chip`,
|
|
55
|
+
`.rc-chip-group`, `.rc-select`, `.rc-textarea`, `.rc-card`, `.rc-list`, and
|
|
56
|
+
`details.rc-disclosure`; each recipe is also available under
|
|
57
|
+
`css-components/<name>.css`. These styles provide appearance and CSS-visible
|
|
58
|
+
states only: they do not add behavior, events, popup replacement, or measured
|
|
59
|
+
overflow.
|
|
60
|
+
|
|
37
61
|
The state-layer utility is included by `components.css` and `theme.css`, and is
|
|
38
62
|
also exported separately for selective imports:
|
|
39
63
|
|
|
@@ -52,6 +76,30 @@ Theme styles are scoped under a `.rc-theme-material` class.
|
|
|
52
76
|
</body>
|
|
53
77
|
```
|
|
54
78
|
|
|
79
|
+
### Button variants and tones
|
|
80
|
+
|
|
81
|
+
The default `rc-button` treatment is filled. Use `rc-button--tonal`,
|
|
82
|
+
`rc-button--outlined`, or `rc-button--text` for the other Material emphasis
|
|
83
|
+
levels. Icon-only buttons use `rc-icon-button--standard`,
|
|
84
|
+
`rc-icon-button--tonal`, or `rc-icon-button--outlined`.
|
|
85
|
+
|
|
86
|
+
`rc-field` uses the Material 3 filled text-field treatment by default. Add
|
|
87
|
+
`rc-field--outlined` for the outlined variant.
|
|
88
|
+
|
|
89
|
+
Add `data-tone="danger"` to any of those variants for the corresponding error
|
|
90
|
+
or error-container color roles. These classes and data attributes are theme
|
|
91
|
+
hooks; they do not change the component's native-button behavior or public API.
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<rc-button class="rc-button--tonal">
|
|
95
|
+
<button type="button">Save draft</button>
|
|
96
|
+
</rc-button>
|
|
97
|
+
|
|
98
|
+
<rc-button class="rc-button--outlined" data-tone="danger">
|
|
99
|
+
<button type="button">Delete</button>
|
|
100
|
+
</rc-button>
|
|
101
|
+
```
|
|
102
|
+
|
|
55
103
|
### Full standalone Material 3 theme
|
|
56
104
|
|
|
57
105
|
Includes bundled light and dark Material 3 token defaults and the full
|
|
@@ -61,6 +109,23 @@ bridge and component style layers:
|
|
|
61
109
|
@import '@rcarls/rc-theme-material/theme.css';
|
|
62
110
|
```
|
|
63
111
|
|
|
112
|
+
## Designing with the theme
|
|
113
|
+
|
|
114
|
+
[`DESIGN.md`](./DESIGN.md) is a Material 3 composition guide written for AI
|
|
115
|
+
coding agents. It covers which component fills which Material role, adaptive
|
|
116
|
+
layouts by window size class, dialogs, sheets, lists, navigation and
|
|
117
|
+
feedback, with the baseline token values in machine-readable front matter. It
|
|
118
|
+
ships in the package and is exported as `@rcarls/rc-theme-material/DESIGN.md`,
|
|
119
|
+
so agents in a consuming app can read it from `node_modules`, or under Yarn
|
|
120
|
+
Plug'n'Play with:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
yarn node -e "process.stdout.write(require('fs').readFileSync(require.resolve('@rcarls/rc-theme-material/DESIGN.md'), 'utf8'))"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
App design documents should reference it for Material 3 composition and keep
|
|
127
|
+
only their own overrides, branding and product patterns.
|
|
128
|
+
|
|
64
129
|
## Theming scope
|
|
65
130
|
|
|
66
131
|
The full style layer styles native controls when their intent is established by
|
|
@@ -70,11 +135,79 @@ unrelated application controls and follows design-token conventions.
|
|
|
70
135
|
Fonts and icons are not bundled; websites and applications may provide
|
|
71
136
|
[Roboto](https://fonts.google.com/specimen/Roboto) and
|
|
72
137
|
[Material Symbols](https://fonts.google.com/icons) through other means.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
138
|
+
|
|
139
|
+
### Scoped type scale
|
|
140
|
+
|
|
141
|
+
Mark a region with `data-rc-type-scale` and set `--rc-type-scale` to enlarge or
|
|
142
|
+
shrink its text, such as a reading view used at arm's length. Every Material type
|
|
143
|
+
size and line height beneath the marked element, and the RC text tokens built on
|
|
144
|
+
them, are multiplied by the factor. Text outside the region is unchanged.
|
|
145
|
+
|
|
146
|
+
```html
|
|
147
|
+
<main data-rc-type-scale style="--rc-type-scale: 1.25">…</main>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Marking the theme root itself scales the whole page, for an app-wide text size
|
|
151
|
+
setting. A nested marked region uses its own `--rc-type-scale`; to compound it
|
|
152
|
+
with a page-wide factor, keep that factor in a separate custom property and
|
|
153
|
+
multiply, since a property can't refer to its own inherited value:
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<html
|
|
157
|
+
class="rc-theme-material"
|
|
158
|
+
data-rc-type-scale
|
|
159
|
+
style="--app-scale: 0.75; --rc-type-scale: var(--app-scale)"
|
|
160
|
+
>
|
|
161
|
+
…
|
|
162
|
+
<p data-rc-type-scale style="--rc-type-scale: calc(var(--app-scale) * 1.25)">…</p>
|
|
163
|
+
</html>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
With `theme.css`, the Material type tokens and RC text tokens scale from the
|
|
167
|
+
bundled `defaults.css` values. With `bridge.css` alone, RC text tokens scale from
|
|
168
|
+
the application's Material type tokens; the application's own
|
|
169
|
+
`--md-sys-typescale-*` tokens remain unchanged. Supply both size and line-height
|
|
170
|
+
tokens for the roles used by RC components when customizing the bridge. If your
|
|
171
|
+
Material token environment also defines matching `*-size-value` or
|
|
172
|
+
`*-line-height-value` source tokens, those are the scale baseline; update them
|
|
173
|
+
alongside branded final values.
|
|
174
|
+
|
|
175
|
+
### Icon font wiring
|
|
176
|
+
|
|
177
|
+
The theme sizes and centers icon markers but never sets `font-family` on them,
|
|
178
|
+
because no font ships with it. Until the application supplies one, a marker
|
|
179
|
+
renders its literal text, so a navigation toggle shows the word `menu`. See
|
|
180
|
+
[Fonts and icons](./DESIGN.md#fonts-and-icons) in the design guide for the
|
|
181
|
+
one rule that wires every marker.
|
|
182
|
+
|
|
183
|
+
### Icon-button modifiers
|
|
184
|
+
|
|
185
|
+
Apply these classes to `rc-button[icon-only]` to use the Material 3 expressive
|
|
186
|
+
container and icon sizes. The default, unmodified size is small: a `2.5rem`
|
|
187
|
+
container with a `1.5rem` icon.
|
|
188
|
+
|
|
189
|
+
| Class | Container | Icon |
|
|
190
|
+
| ------------------------ | --------: | --------: |
|
|
191
|
+
| `rc-button--extra-small` | `2rem` | `1.25rem` |
|
|
192
|
+
| `rc-button--medium` | `3.5rem` | `1.5rem` |
|
|
193
|
+
| `rc-button--large` | `6rem` | `2rem` |
|
|
194
|
+
| `rc-button--extra-large` | `8.5rem` | `2.5rem` |
|
|
195
|
+
|
|
196
|
+
Combine a size class with `rc-button--narrow` or `rc-button--wide` to select
|
|
197
|
+
that size's narrower or wider container width without changing its height or
|
|
198
|
+
icon size. `rc-menu-button[icon-only]` supports `rc-menu-button--narrow` for a
|
|
199
|
+
`2rem`-wide small trigger. The component packages continue to reserve a `3rem`
|
|
200
|
+
activation area around visual containers smaller than that target.
|
|
201
|
+
|
|
202
|
+
`rc-adaptive-menu` uses the same Material small narrow geometry for its
|
|
203
|
+
overflow trigger: a `2rem × 2.5rem` visible container centered in the
|
|
204
|
+
component-owned `3rem × 3rem` activation area. The theme also aligns overflow
|
|
205
|
+
rows with Material menu geometry while leaving the component's controlled or
|
|
206
|
+
uncontrolled `open` contract unchanged.
|
|
207
|
+
|
|
208
|
+
Direct native buttons in an `rc-app-bar`'s `leading` and `trailing` slots also
|
|
209
|
+
receive the Material small icon-button geometry. Controls nested in an
|
|
210
|
+
`rc-button` or `rc-menu-button` keep their component-owned sizing.
|
|
78
211
|
|
|
79
212
|
[Material Web](material-web.dev) token names are used where a corresponding component
|
|
80
213
|
exists. Search bar and top app bar mappings follow Material 3 token terminology and
|
package/bridge.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@layer rc-theme-material.defaults, rc-theme-material.bridge, rc-theme-material.components
|
|
1
|
+
@layer rc-base, rc-theme-material.defaults, rc-theme-material.bridge, rc-theme-material.native, rc-theme-material.components, rc-theme-material.css-components,
|
|
2
|
+
rc-theme-material.overrides;
|
|
2
3
|
|
|
3
4
|
@layer rc-theme-material.bridge {
|
|
4
5
|
/*
|
|
@@ -34,6 +35,31 @@
|
|
|
34
35
|
calc(var(--md-sys-elevation-level4, 8px) * 2)
|
|
35
36
|
color-mix(in srgb, var(--md-sys-color-shadow, #000) 24%, transparent);
|
|
36
37
|
--rc-shadow: var(--rc-shadow-level2);
|
|
38
|
+
/*
|
|
39
|
+
* Menus, select and combobox listboxes, and adaptive-menu popups share the
|
|
40
|
+
* MD3 menu container. Set here rather than per element so the values also
|
|
41
|
+
* inherit into popups rendered inside other shadow roots.
|
|
42
|
+
*/
|
|
43
|
+
--rc-popup-background: var(
|
|
44
|
+
--md-menu-container-color,
|
|
45
|
+
var(--md-sys-color-surface-container, Canvas)
|
|
46
|
+
);
|
|
47
|
+
--rc-popup-color: var(--md-sys-color-on-surface, CanvasText);
|
|
48
|
+
--rc-popup-border: 0;
|
|
49
|
+
--rc-popup-radius: var(
|
|
50
|
+
--md-menu-container-shape,
|
|
51
|
+
var(--md-sys-shape-corner-extra-small, 0.25rem)
|
|
52
|
+
);
|
|
53
|
+
--rc-popup-shadow: var(--rc-shadow);
|
|
54
|
+
--rc-adaptive-menu-popup-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 2px 6px 2px rgb(0 0 0 / 15%);
|
|
55
|
+
--rc-popup-padding-block: 0.5rem;
|
|
56
|
+
/* Menu, listbox, and adaptive-menu items use the MD3 body-large scale. */
|
|
57
|
+
--rc-item-font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
58
|
+
--rc-item-font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
59
|
+
--rc-item-font-weight: var(--md-sys-typescale-body-large-weight, 400);
|
|
60
|
+
--rc-item-line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
61
|
+
--rc-item-letter-spacing: var(--md-sys-typescale-body-large-tracking, 0.03125rem);
|
|
62
|
+
--rc-item-icon-size: 1.5rem;
|
|
37
63
|
--rc-font-family: var(--md-sys-typescale-body-medium-font, inherit);
|
|
38
64
|
--rc-font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
|
|
39
65
|
--rc-line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem);
|
|
@@ -51,7 +77,14 @@
|
|
|
51
77
|
--rc-list-item-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
52
78
|
--rc-list-item-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
53
79
|
--rc-button-bg: var(--md-sys-color-primary, ButtonFace);
|
|
54
|
-
|
|
80
|
+
/*
|
|
81
|
+
* Both of these sit on --rc-button-bg, so both take the on-primary color.
|
|
82
|
+
* rc-select, rc-combobox, and rc-menu-button read --rc-button-text directly
|
|
83
|
+
* for their trigger and chip text; leaving it unset dropped them onto the
|
|
84
|
+
* ButtonText system color over the primary fill.
|
|
85
|
+
*/
|
|
86
|
+
--rc-button-text: var(--md-sys-color-on-primary, ButtonText);
|
|
87
|
+
--rc-button-color: var(--rc-button-text, ButtonText);
|
|
55
88
|
--rc-button-block-size: var(--rc-control-block-size);
|
|
56
89
|
--rc-button-radius: var(--rc-control-radius);
|
|
57
90
|
--rc-button-border: 0;
|
|
@@ -122,27 +155,38 @@
|
|
|
122
155
|
--rc-focus-ring-offset: 2px;
|
|
123
156
|
--rc-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
124
157
|
--rc-motion-effects-duration-fast: var(--md-sys-motion-duration-150, 150ms);
|
|
125
|
-
--rc-motion-effects-easing-fast:
|
|
126
|
-
var(--md-sys-motion-easing-standard-x0, 0.2),
|
|
127
|
-
var(--md-sys-motion-easing-standard-y0, 0),
|
|
128
|
-
var(--md-sys-motion-easing-standard-x1, 0),
|
|
129
|
-
var(--md-sys-motion-easing-standard-y1, 1)
|
|
130
|
-
);
|
|
158
|
+
--rc-motion-effects-easing-fast: var(--md-sys-motion-easing-standard, ease-out);
|
|
131
159
|
--rc-motion-effects-duration-default: var(--md-sys-motion-duration-200, 200ms);
|
|
132
160
|
--rc-motion-effects-easing-default: var(--rc-motion-effects-easing-fast);
|
|
133
161
|
--rc-motion-effects-duration-slow: var(--md-sys-motion-duration-300, 300ms);
|
|
134
162
|
--rc-motion-effects-easing-slow: var(--rc-motion-effects-easing-fast);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
--rc-motion-spatial-duration-
|
|
163
|
+
/*
|
|
164
|
+
* Spec spatial durations are 350/500/700ms. This project's own motion
|
|
165
|
+
* guide finds anything past ~400ms reads as waiting rather than
|
|
166
|
+
* feedback, so the scale is compressed to 300/400/500ms — a deliberate
|
|
167
|
+
* departure recorded here rather than a silent guess. The curve shape
|
|
168
|
+
* (emphasized) is unchanged from spec.
|
|
169
|
+
*/
|
|
170
|
+
--rc-motion-spatial-duration-fast: var(--md-sys-motion-duration-medium2, 300ms);
|
|
171
|
+
--rc-motion-spatial-easing-fast: var(
|
|
172
|
+
--md-sys-motion-easing-emphasized,
|
|
173
|
+
cubic-bezier(0.2, 0, 0, 1)
|
|
174
|
+
);
|
|
175
|
+
--rc-motion-spatial-duration-default: var(--md-sys-motion-duration-medium4, 400ms);
|
|
143
176
|
--rc-motion-spatial-easing-default: var(--rc-motion-spatial-easing-fast);
|
|
144
|
-
--rc-motion-spatial-duration-slow: var(--md-sys-motion-duration-
|
|
177
|
+
--rc-motion-spatial-duration-slow: var(--md-sys-motion-duration-long2, 500ms);
|
|
145
178
|
--rc-motion-spatial-easing-slow: var(--rc-motion-spatial-easing-fast);
|
|
179
|
+
/* Decelerate for arriving, accelerate for leaving; family matches above. */
|
|
180
|
+
--rc-motion-effects-easing-enter: var(--md-sys-motion-easing-standard-decelerate, ease-out);
|
|
181
|
+
--rc-motion-effects-easing-exit: var(--md-sys-motion-easing-standard-accelerate, ease-in);
|
|
182
|
+
--rc-motion-spatial-easing-enter: var(
|
|
183
|
+
--md-sys-motion-easing-emphasized-decelerate,
|
|
184
|
+
cubic-bezier(0, 0, 0, 1)
|
|
185
|
+
);
|
|
186
|
+
--rc-motion-spatial-easing-exit: var(
|
|
187
|
+
--md-sys-motion-easing-emphasized-accelerate,
|
|
188
|
+
cubic-bezier(0.3, 0, 1, 1)
|
|
189
|
+
);
|
|
146
190
|
--rc-motion-duration: var(--rc-motion-effects-duration-default);
|
|
147
191
|
--rc-dialog-scrim: color-mix(in srgb, var(--md-sys-color-scrim, #000) 32%, transparent);
|
|
148
192
|
}
|
|
@@ -157,16 +201,9 @@
|
|
|
157
201
|
);
|
|
158
202
|
--rc-select-border: 1px solid
|
|
159
203
|
var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, ButtonBorder));
|
|
160
|
-
--rc-select-listbox-radius: var(
|
|
161
|
-
--md-menu-container-shape,
|
|
162
|
-
var(--md-sys-shape-corner-extra-small, 0.25rem)
|
|
163
|
-
);
|
|
164
|
-
--rc-select-listbox-border: 0;
|
|
165
|
-
--rc-select-listbox-padding-block: 0.5rem;
|
|
166
|
-
--rc-select-shadow: var(--rc-shadow);
|
|
167
204
|
--rc-select-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
168
|
-
--rc-select-chip-padding-block: 0
|
|
169
|
-
--rc-select-chip-padding-inline: 0.75rem;
|
|
205
|
+
--rc-select-chip-padding-block: 0;
|
|
206
|
+
--rc-select-chip-padding-inline-start: 0.75rem;
|
|
170
207
|
--rc-field: var(
|
|
171
208
|
--md-outlined-select-text-field-container-color,
|
|
172
209
|
var(--md-sys-color-surface, Field)
|
|
@@ -215,16 +252,9 @@
|
|
|
215
252
|
);
|
|
216
253
|
--rc-combobox-border: 1px solid
|
|
217
254
|
var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, ButtonBorder));
|
|
218
|
-
--rc-combobox-listbox-radius: var(
|
|
219
|
-
--md-menu-container-shape,
|
|
220
|
-
var(--md-sys-shape-corner-extra-small, 0.25rem)
|
|
221
|
-
);
|
|
222
|
-
--rc-combobox-listbox-border: 0;
|
|
223
|
-
--rc-combobox-listbox-padding-block: 0.5rem;
|
|
224
|
-
--rc-combobox-shadow: var(--rc-shadow);
|
|
225
255
|
--rc-combobox-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
226
|
-
--rc-combobox-chip-padding-block: 0
|
|
227
|
-
--rc-combobox-chip-padding-inline: 0.75rem;
|
|
256
|
+
--rc-combobox-chip-padding-block: 0;
|
|
257
|
+
--rc-combobox-chip-padding-inline-start: 0.75rem;
|
|
228
258
|
--rc-field: var(--md-outlined-text-field-container-color, var(--md-sys-color-surface, Field));
|
|
229
259
|
--rc-field-text: var(
|
|
230
260
|
--md-outlined-text-field-input-text-color,
|
|
@@ -259,6 +289,24 @@
|
|
|
259
289
|
--rc-thumb-radius: calc(var(--md-slider-handle-width, 1.25rem) / 2);
|
|
260
290
|
}
|
|
261
291
|
|
|
292
|
+
.rc-theme-material rc-progress,
|
|
293
|
+
:host(.rc-theme-material) rc-progress {
|
|
294
|
+
--rc-progress-track-background: var(
|
|
295
|
+
--md-linear-progress-track-color,
|
|
296
|
+
var(--md-sys-color-surface-container-highest, CanvasText)
|
|
297
|
+
);
|
|
298
|
+
--rc-progress-track-opacity: 1;
|
|
299
|
+
--rc-progress-track-radius: var(
|
|
300
|
+
--md-linear-progress-track-shape,
|
|
301
|
+
var(--md-sys-shape-corner-full, 999px)
|
|
302
|
+
);
|
|
303
|
+
--rc-progress-fill-background: var(
|
|
304
|
+
--md-linear-progress-active-indicator-color,
|
|
305
|
+
var(--md-sys-color-primary, Highlight)
|
|
306
|
+
);
|
|
307
|
+
--rc-progress-value-color: var(--md-sys-color-on-surface-variant, GrayText);
|
|
308
|
+
}
|
|
309
|
+
|
|
262
310
|
.rc-theme-material rc-range-slider,
|
|
263
311
|
:host(.rc-theme-material) rc-range-slider {
|
|
264
312
|
--rc-range-slider-accent: var(
|
|
@@ -390,19 +438,9 @@
|
|
|
390
438
|
);
|
|
391
439
|
}
|
|
392
440
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
--rc-menu-background: var(
|
|
397
|
-
--md-menu-container-color,
|
|
398
|
-
var(--md-sys-color-surface-container, Canvas)
|
|
399
|
-
);
|
|
400
|
-
--rc-menu-border: 0;
|
|
401
|
-
--rc-menu-radius: var(
|
|
402
|
-
--md-menu-container-shape,
|
|
403
|
-
var(--md-sys-shape-corner-extra-small, 0.25rem)
|
|
404
|
-
);
|
|
405
|
-
--rc-menu-shadow: var(--rc-shadow);
|
|
441
|
+
/* Declared on the theme root so menus inside other shadow roots inherit it. */
|
|
442
|
+
.rc-theme-material,
|
|
443
|
+
:host(.rc-theme-material) {
|
|
406
444
|
--rc-menu-color: var(
|
|
407
445
|
--md-menu-item-label-text-color,
|
|
408
446
|
var(--md-sys-color-on-surface, CanvasText)
|
|
@@ -511,10 +549,10 @@
|
|
|
511
549
|
|
|
512
550
|
.rc-theme-material rc-markdown-editor,
|
|
513
551
|
:host(.rc-theme-material) rc-markdown-editor {
|
|
514
|
-
--
|
|
515
|
-
--
|
|
516
|
-
--
|
|
517
|
-
--
|
|
552
|
+
--rc-markdown-editor-background: var(--md-sys-color-surface, Canvas);
|
|
553
|
+
--rc-markdown-editor-color: var(--md-sys-color-on-surface, CanvasText);
|
|
554
|
+
--rc-markdown-editor-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
555
|
+
--rc-markdown-editor-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
|
|
518
556
|
}
|
|
519
557
|
|
|
520
558
|
.rc-theme-material rc-transfer-list,
|
|
@@ -540,9 +578,6 @@
|
|
|
540
578
|
--rc-navigation-rail-item-text-decoration: none;
|
|
541
579
|
--rc-navigation-rail-indicator-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
542
580
|
--rc-navigation-rail-indicator-border: 0;
|
|
543
|
-
--rc-navigation-rail-toggle-padding: 0;
|
|
544
|
-
--rc-navigation-rail-toggle-border: 0;
|
|
545
|
-
--rc-navigation-rail-toggle-font: inherit;
|
|
546
581
|
}
|
|
547
582
|
.rc-theme-material rc-navigation-rail > rc-fab[slot='header'],
|
|
548
583
|
:host(.rc-theme-material) rc-navigation-rail > rc-fab[slot='header'] {
|
|
@@ -615,6 +650,65 @@
|
|
|
615
650
|
);
|
|
616
651
|
}
|
|
617
652
|
|
|
653
|
+
/*
|
|
654
|
+
* Scale RC text from the unscaled Material values. The bundled defaults
|
|
655
|
+
* expose *-value tokens; bridge-only consumers can supply Material type
|
|
656
|
+
* tokens, which the bridge leaves unchanged.
|
|
657
|
+
*/
|
|
658
|
+
/* A marked theme root itself must outrank its own token rule above. */
|
|
659
|
+
:where(.rc-theme-material [data-rc-type-scale], :host(.rc-theme-material) [data-rc-type-scale]),
|
|
660
|
+
.rc-theme-material[data-rc-type-scale],
|
|
661
|
+
:host(.rc-theme-material[data-rc-type-scale]) {
|
|
662
|
+
--rc-item-font-size: calc(
|
|
663
|
+
var(--md-sys-typescale-body-large-size-value, var(--md-sys-typescale-body-large-size, 1rem)) *
|
|
664
|
+
var(--rc-type-scale, 1)
|
|
665
|
+
);
|
|
666
|
+
--rc-item-line-height: calc(
|
|
667
|
+
var(
|
|
668
|
+
--md-sys-typescale-body-large-line-height-value,
|
|
669
|
+
var(--md-sys-typescale-body-large-line-height, 1.5rem)
|
|
670
|
+
) *
|
|
671
|
+
var(--rc-type-scale, 1)
|
|
672
|
+
);
|
|
673
|
+
--rc-font-size: calc(
|
|
674
|
+
var(
|
|
675
|
+
--md-sys-typescale-body-medium-size-value,
|
|
676
|
+
var(--md-sys-typescale-body-medium-size, 0.875rem)
|
|
677
|
+
) *
|
|
678
|
+
var(--rc-type-scale, 1)
|
|
679
|
+
);
|
|
680
|
+
--rc-line-height: calc(
|
|
681
|
+
var(
|
|
682
|
+
--md-sys-typescale-body-medium-line-height-value,
|
|
683
|
+
var(--md-sys-typescale-body-medium-line-height, 1.25rem)
|
|
684
|
+
) *
|
|
685
|
+
var(--rc-type-scale, 1)
|
|
686
|
+
);
|
|
687
|
+
--rc-button-font: 500
|
|
688
|
+
calc(
|
|
689
|
+
var(
|
|
690
|
+
--md-sys-typescale-label-large-size-value,
|
|
691
|
+
var(--md-sys-typescale-label-large-size, 0.875rem)
|
|
692
|
+
) *
|
|
693
|
+
var(--rc-type-scale, 1)
|
|
694
|
+
) /
|
|
695
|
+
calc(
|
|
696
|
+
var(
|
|
697
|
+
--md-sys-typescale-label-large-line-height-value,
|
|
698
|
+
var(--md-sys-typescale-label-large-line-height, 1.25rem)
|
|
699
|
+
) *
|
|
700
|
+
var(--rc-type-scale, 1)
|
|
701
|
+
)
|
|
702
|
+
var(--rc-font-family);
|
|
703
|
+
--rc-menu-shortcut-size: calc(
|
|
704
|
+
var(
|
|
705
|
+
--md-sys-typescale-label-large-size-value,
|
|
706
|
+
var(--md-sys-typescale-label-large-size, 0.875rem)
|
|
707
|
+
) *
|
|
708
|
+
var(--rc-type-scale, 1)
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
|
|
618
712
|
@media (forced-colors: active) {
|
|
619
713
|
.rc-theme-material,
|
|
620
714
|
:host(.rc-theme-material) {
|
|
@@ -623,6 +717,7 @@
|
|
|
623
717
|
--rc-shadow-level2: none;
|
|
624
718
|
--rc-shadow-level3: none;
|
|
625
719
|
--rc-shadow: none;
|
|
720
|
+
--rc-popup-border: 1px solid ButtonBorder;
|
|
626
721
|
--rc-disabled-opacity: 1;
|
|
627
722
|
}
|
|
628
723
|
|