@rcarls/rc-theme-win31 0.0.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 +185 -0
- package/DESIGN.md +195 -0
- package/README.md +157 -5
- package/bridge.css +257 -0
- package/components/accordion.css +21 -0
- package/components/adaptive-menu.css +108 -0
- package/components/app-bar.css +66 -0
- package/components/bottom-sheet.css +41 -0
- package/components/button.css +74 -0
- package/components/card.css +50 -0
- package/components/carousel.css +59 -0
- package/components/chip-group.css +33 -0
- package/components/chip.css +56 -0
- package/components/combobox.css +83 -0
- package/components/dialog.css +156 -0
- package/components/disclosure.css +106 -0
- package/components/fab-menu.css +47 -0
- package/components/fab.css +49 -0
- package/components/field.css +73 -0
- package/components/icons.css +56 -0
- package/components/list-item.css +90 -0
- package/components/listbox.css +39 -0
- package/components/markdown-editor.css +80 -0
- package/components/menu-button.css +39 -0
- package/components/menu.css +64 -0
- package/components/menubar.css +67 -0
- package/components/modes.css +58 -0
- package/components/navigation-bar.css +52 -0
- package/components/navigation-rail.css +57 -0
- package/components/popover.css +13 -0
- package/components/progress.css +47 -0
- package/components/range-slider.css +41 -0
- package/components/scroller.css +91 -0
- package/components/search-bar.css +65 -0
- package/components/segmented-button.css +64 -0
- package/components/select.css +73 -0
- package/components/slider.css +64 -0
- package/components/snackbar.css +50 -0
- package/components/splitter.css +42 -0
- package/components/switch.css +75 -0
- package/components/textarea.css +42 -0
- package/components/toolbar.css +68 -0
- package/components/tooltip.css +23 -0
- package/components/transfer-list.css +74 -0
- package/components/virtual-canvas.css +45 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +45 -0
- package/css-components/button.css +99 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +109 -0
- package/css-components/disclosure.css +34 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +19 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +169 -0
- package/native.css +271 -0
- package/package.json +51 -7
- package/theme.css +3 -0
package/bridge.css
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-win31.defaults, rc-theme-win31.bridge, rc-theme-win31.native, rc-theme-win31.components, rc-theme-win31.css-components,
|
|
2
|
+
rc-theme-win31.overrides;
|
|
3
|
+
|
|
4
|
+
@layer rc-theme-win31.bridge {
|
|
5
|
+
/*
|
|
6
|
+
* Maps the Windows 3.1 reference tokens onto the rc-webcomponents public
|
|
7
|
+
* styling contract. Consumers can replace --win31-* values and keep this file
|
|
8
|
+
* as their bridge.
|
|
9
|
+
*
|
|
10
|
+
* Three decisions run through the whole mapping and are worth knowing before
|
|
11
|
+
* reading it:
|
|
12
|
+
*
|
|
13
|
+
* - Disabled is a color, never an opacity. --rc-disabled-opacity stays at 1
|
|
14
|
+
* and components/modes.css supplies the embossed gray instead.
|
|
15
|
+
* - Motion is zero. Windows 3.1 had no transitions anywhere.
|
|
16
|
+
* - Depth is geometry. --rc-shadow is none; bevels come from the box-shadow
|
|
17
|
+
* and border-color tokens, which forced-colors can delete cleanly.
|
|
18
|
+
*/
|
|
19
|
+
.rc-theme-win31,
|
|
20
|
+
:host(.rc-theme-win31) {
|
|
21
|
+
--rc-surface: var(--win31-color-surface);
|
|
22
|
+
--rc-field: var(--win31-color-field);
|
|
23
|
+
--rc-field-text: var(--win31-color-field-text);
|
|
24
|
+
--rc-field-error-color: var(--win31-color-frame);
|
|
25
|
+
--rc-button-bg: var(--win31-color-surface);
|
|
26
|
+
--rc-button-text: var(--win31-color-frame);
|
|
27
|
+
--rc-highlight: var(--win31-color-selection);
|
|
28
|
+
--rc-highlight-text: var(--win31-color-selection-text);
|
|
29
|
+
--rc-text-disabled: var(--win31-color-disabled-text);
|
|
30
|
+
--rc-accent: var(--win31-color-selection);
|
|
31
|
+
--rc-border-color: var(--win31-color-frame);
|
|
32
|
+
--rc-border-width: var(--win31-hairline);
|
|
33
|
+
--rc-border-style: solid;
|
|
34
|
+
--rc-border: var(--rc-border-width) var(--rc-border-style) var(--rc-border-color);
|
|
35
|
+
--rc-shadow: none;
|
|
36
|
+
/* A 3.1 menu is a flat panel with a hard frame and a hard drop shadow. */
|
|
37
|
+
--rc-popup-background: var(--win31-color-menu);
|
|
38
|
+
--rc-popup-color: var(--win31-color-menu-text);
|
|
39
|
+
--rc-popup-border: var(--win31-border);
|
|
40
|
+
--rc-popup-radius: var(--win31-radius);
|
|
41
|
+
--rc-popup-shadow: var(--win31-drop-shadow);
|
|
42
|
+
--rc-popup-padding-block: var(--win31-unit);
|
|
43
|
+
|
|
44
|
+
--rc-font-family: var(--win31-font-family);
|
|
45
|
+
--rc-font-size: var(--win31-font-size);
|
|
46
|
+
--rc-font-weight: var(--win31-font-weight);
|
|
47
|
+
--rc-line-height: var(--win31-line-height);
|
|
48
|
+
--rc-icon-font-size: var(--win31-check-size);
|
|
49
|
+
--rc-icon-font-line-height: var(--rc-icon-font-size);
|
|
50
|
+
|
|
51
|
+
--rc-control-block-size: var(--win31-control-height);
|
|
52
|
+
--rc-control-padding-block: var(--win31-padding-block);
|
|
53
|
+
--rc-control-padding-inline: var(--win31-padding-inline);
|
|
54
|
+
--rc-control-gap: var(--win31-gap-tight);
|
|
55
|
+
--rc-item-padding-block: var(--win31-padding-block);
|
|
56
|
+
--rc-item-padding-inline: var(--win31-padding-inline);
|
|
57
|
+
--rc-item-gap: var(--win31-gap-tight);
|
|
58
|
+
|
|
59
|
+
--rc-radius-sm: var(--win31-radius);
|
|
60
|
+
--rc-radius-md: var(--win31-radius);
|
|
61
|
+
--rc-control-radius: var(--win31-radius);
|
|
62
|
+
--rc-thumb-radius: var(--win31-radius);
|
|
63
|
+
|
|
64
|
+
--rc-focus-ring: var(--win31-focus-ring);
|
|
65
|
+
--rc-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
66
|
+
--rc-disabled-opacity: 1;
|
|
67
|
+
/*
|
|
68
|
+
* Period chrome switches state instantly. All thirteen shared motion
|
|
69
|
+
* tokens are declared here at zero, not left to base.css's fallbacks:
|
|
70
|
+
* base.css is optional, and an app that loads it alongside this theme
|
|
71
|
+
* would otherwise inherit base's real 180/300/450ms spatial motion for
|
|
72
|
+
* whichever of these a bridge left unmapped. A step function is the
|
|
73
|
+
* honest curve even though a 0ms duration already makes the curve shape
|
|
74
|
+
* invisible.
|
|
75
|
+
*/
|
|
76
|
+
--rc-motion-effects-duration-fast: 0ms;
|
|
77
|
+
--rc-motion-effects-easing-fast: step-end;
|
|
78
|
+
--rc-motion-effects-duration-default: 0ms;
|
|
79
|
+
--rc-motion-effects-easing-default: step-end;
|
|
80
|
+
--rc-motion-effects-duration-slow: 0ms;
|
|
81
|
+
--rc-motion-effects-easing-slow: step-end;
|
|
82
|
+
--rc-motion-spatial-duration-fast: 0ms;
|
|
83
|
+
--rc-motion-spatial-easing-fast: step-end;
|
|
84
|
+
--rc-motion-spatial-duration-default: 0ms;
|
|
85
|
+
--rc-motion-spatial-easing-default: step-end;
|
|
86
|
+
--rc-motion-spatial-duration-slow: 0ms;
|
|
87
|
+
--rc-motion-spatial-easing-slow: step-end;
|
|
88
|
+
--rc-motion-effects-easing-enter: step-end;
|
|
89
|
+
--rc-motion-effects-easing-exit: step-end;
|
|
90
|
+
--rc-motion-spatial-easing-enter: step-end;
|
|
91
|
+
--rc-motion-spatial-easing-exit: step-end;
|
|
92
|
+
--rc-motion-duration: var(--rc-motion-effects-duration-default);
|
|
93
|
+
|
|
94
|
+
--rc-button-color: var(--rc-button-text);
|
|
95
|
+
--rc-button-block-size: var(--rc-control-block-size);
|
|
96
|
+
--rc-button-radius: var(--win31-radius);
|
|
97
|
+
--rc-button-border: var(--rc-border);
|
|
98
|
+
--rc-button-padding-block: var(--rc-control-padding-block);
|
|
99
|
+
--rc-button-padding-inline: calc(8 * var(--win31-unit));
|
|
100
|
+
--rc-button-gap: var(--rc-control-gap);
|
|
101
|
+
--rc-button-font: var(--rc-font-weight) var(--rc-font-size) / 1 var(--rc-font-family);
|
|
102
|
+
/*
|
|
103
|
+
* Windows 3.1 gave push buttons no hover or focus wash at all. The state
|
|
104
|
+
* layers stay at zero and pressed is drawn as an inverted bevel instead.
|
|
105
|
+
*/
|
|
106
|
+
--rc-button-hover-state-layer-opacity: 0;
|
|
107
|
+
--rc-button-focus-state-layer-opacity: 0;
|
|
108
|
+
--rc-button-pressed-state-layer-opacity: 0;
|
|
109
|
+
|
|
110
|
+
--rc-card-bg: var(--win31-color-surface);
|
|
111
|
+
--rc-card-color: var(--win31-color-frame);
|
|
112
|
+
--rc-card-radius: var(--win31-radius);
|
|
113
|
+
--rc-card-padding-block: var(--win31-gap-tight);
|
|
114
|
+
--rc-card-padding-inline: var(--win31-padding-inline);
|
|
115
|
+
--rc-card-actions-gap: var(--win31-gap);
|
|
116
|
+
--rc-card-subtitle-color: var(--win31-color-frame);
|
|
117
|
+
--rc-card-hover-state-layer-opacity: 0;
|
|
118
|
+
--rc-card-pressed-state-layer-opacity: 0;
|
|
119
|
+
|
|
120
|
+
--rc-chip-block-size: var(--win31-control-height);
|
|
121
|
+
--rc-chip-gap: var(--win31-gap-tight);
|
|
122
|
+
--rc-chip-padding-inline: calc(8 * var(--win31-unit));
|
|
123
|
+
--rc-chip-border: var(--rc-border);
|
|
124
|
+
--rc-chip-radius: var(--win31-radius);
|
|
125
|
+
--rc-chip-bg: var(--win31-color-surface);
|
|
126
|
+
--rc-chip-color: var(--win31-color-frame);
|
|
127
|
+
--rc-chip-font: inherit;
|
|
128
|
+
--rc-chip-text-decoration: none;
|
|
129
|
+
--rc-chip-selected-bg: var(--win31-dither-surface);
|
|
130
|
+
|
|
131
|
+
--rc-switch-native-appearance: none;
|
|
132
|
+
--rc-switch-native-inline-size: 100%;
|
|
133
|
+
--rc-switch-native-block-size: 100%;
|
|
134
|
+
--rc-switch-native-margin: 0;
|
|
135
|
+
--rc-switch-native-opacity: 0;
|
|
136
|
+
--rc-switch-decoration-display: block;
|
|
137
|
+
--rc-switch-icon-display: grid;
|
|
138
|
+
--rc-switch-track-inline-size: calc(36 * var(--win31-unit));
|
|
139
|
+
--rc-switch-track-block-size: var(--win31-control-height);
|
|
140
|
+
--rc-switch-selected-track-bg: var(--win31-color-surface);
|
|
141
|
+
--rc-switch-thumb-translate: calc(16 * var(--win31-unit));
|
|
142
|
+
|
|
143
|
+
--rc-segmented-button-segment-min-block-size: var(--rc-control-block-size);
|
|
144
|
+
--rc-segmented-button-selected-bg: var(--win31-dither-surface);
|
|
145
|
+
|
|
146
|
+
--rc-snackbar-bg: var(--win31-color-surface);
|
|
147
|
+
--rc-snackbar-color: var(--win31-color-frame);
|
|
148
|
+
--rc-snackbar-border: var(--rc-border);
|
|
149
|
+
--rc-snackbar-action-color: var(--win31-color-frame);
|
|
150
|
+
--rc-snackbar-action-border: var(--rc-border);
|
|
151
|
+
--rc-snackbar-action-radius: var(--win31-radius);
|
|
152
|
+
--rc-snackbar-action-padding-block: var(--win31-padding-block);
|
|
153
|
+
--rc-snackbar-action-padding-inline: calc(8 * var(--win31-unit));
|
|
154
|
+
--rc-snackbar-action-bg: var(--win31-color-surface);
|
|
155
|
+
--rc-snackbar-action-font: var(--rc-button-font);
|
|
156
|
+
|
|
157
|
+
--rc-list-item-gap: var(--rc-item-gap);
|
|
158
|
+
--rc-list-item-min-block-size: var(--win31-listbox-row-height);
|
|
159
|
+
--rc-list-item-padding-block: var(--rc-item-padding-block);
|
|
160
|
+
--rc-list-item-padding-inline: var(--rc-item-padding-inline);
|
|
161
|
+
--rc-list-item-selected-bg: var(--win31-color-selection);
|
|
162
|
+
--rc-list-item-selected-color: var(--win31-color-selection-text);
|
|
163
|
+
|
|
164
|
+
/*
|
|
165
|
+
* The scrim is transparent on purpose. Windows 3.1 dimmed nothing behind a
|
|
166
|
+
* modal dialog; the dialog's own frame carried the separation.
|
|
167
|
+
*/
|
|
168
|
+
--rc-dialog-scrim: transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/*
|
|
172
|
+
* Listboxes and menus diverge here, and the divergence is period-correct
|
|
173
|
+
* rather than an oversight: menus highlighted under the pointer, and list
|
|
174
|
+
* rows did not. A list row's resting and hover appearance are the same.
|
|
175
|
+
*/
|
|
176
|
+
.rc-theme-win31 rc-listbox,
|
|
177
|
+
:host(.rc-theme-win31) rc-listbox {
|
|
178
|
+
--rc-listbox-option-gap: var(--win31-gap-tight);
|
|
179
|
+
--rc-listbox-option-min-block-size: var(--win31-listbox-row-height);
|
|
180
|
+
--rc-listbox-option-padding-block: var(--win31-padding-block);
|
|
181
|
+
--rc-listbox-option-padding-inline: var(--win31-padding-inline);
|
|
182
|
+
--rc-listbox-hover-bg: transparent;
|
|
183
|
+
--rc-listbox-hover-color: var(--win31-color-field-text);
|
|
184
|
+
--rc-listbox-active-bg: var(--win31-color-selection);
|
|
185
|
+
--rc-listbox-active-color: var(--win31-color-selection-text);
|
|
186
|
+
--rc-listbox-selected-bg: var(--win31-color-selection);
|
|
187
|
+
--rc-listbox-selected-color: var(--win31-color-selection-text);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.rc-theme-win31 rc-menu,
|
|
191
|
+
:host(.rc-theme-win31) rc-menu {
|
|
192
|
+
--rc-listbox-option-gap: 0;
|
|
193
|
+
--rc-listbox-option-min-block-size: calc(20 * var(--win31-unit));
|
|
194
|
+
--rc-listbox-option-padding-block: 0;
|
|
195
|
+
--rc-listbox-option-padding-inline: var(--win31-padding-inline);
|
|
196
|
+
--rc-listbox-hover-bg: var(--win31-color-selection);
|
|
197
|
+
--rc-listbox-hover-color: var(--win31-color-selection-text);
|
|
198
|
+
--rc-listbox-active-bg: var(--win31-color-selection);
|
|
199
|
+
--rc-listbox-active-color: var(--win31-color-selection-text);
|
|
200
|
+
--rc-listbox-selected-bg: var(--win31-color-selection);
|
|
201
|
+
--rc-listbox-selected-color: var(--win31-color-selection-text);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.rc-theme-win31 rc-select,
|
|
205
|
+
:host(.rc-theme-win31) rc-select,
|
|
206
|
+
.rc-theme-win31 rc-combobox,
|
|
207
|
+
:host(.rc-theme-win31) rc-combobox {
|
|
208
|
+
--rc-select-control-block-size: calc(20 * var(--win31-unit));
|
|
209
|
+
--rc-select-radius: var(--win31-radius);
|
|
210
|
+
/* Drop-down lists are field surfaces, not menus. */
|
|
211
|
+
--rc-select-shadow: none;
|
|
212
|
+
--rc-select-listbox-background: var(--rc-surface);
|
|
213
|
+
--rc-select-listbox-color: var(--rc-field-text);
|
|
214
|
+
--rc-select-chip-radius: var(--win31-radius);
|
|
215
|
+
--rc-combobox-control-block-size: calc(20 * var(--win31-unit));
|
|
216
|
+
--rc-combobox-radius: var(--win31-radius);
|
|
217
|
+
--rc-combobox-shadow: none;
|
|
218
|
+
--rc-combobox-listbox-background: var(--rc-surface);
|
|
219
|
+
--rc-combobox-listbox-color: var(--rc-field-text);
|
|
220
|
+
--rc-combobox-listbox-padding-block: var(--rc-control-padding-block);
|
|
221
|
+
--rc-combobox-chip-radius: var(--win31-radius);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.rc-theme-win31 rc-slider,
|
|
225
|
+
:host(.rc-theme-win31) rc-slider,
|
|
226
|
+
.rc-theme-win31 rc-range-slider,
|
|
227
|
+
:host(.rc-theme-win31) rc-range-slider {
|
|
228
|
+
--rc-slider-track-size: calc(4 * var(--win31-unit));
|
|
229
|
+
--rc-slider-track-background: var(--win31-color-field);
|
|
230
|
+
--rc-slider-progress-background: var(--win31-color-selection);
|
|
231
|
+
--rc-slider-track-radius: var(--win31-radius);
|
|
232
|
+
--rc-range-slider-accent: var(--win31-color-selection);
|
|
233
|
+
--rc-range-slider-track-background: var(--win31-color-field);
|
|
234
|
+
--rc-range-slider-thumb-background: var(--win31-color-surface);
|
|
235
|
+
--rc-range-slider-thumb-border: var(--win31-color-frame);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.rc-theme-win31 rc-progress,
|
|
239
|
+
:host(.rc-theme-win31) rc-progress {
|
|
240
|
+
--rc-progress-track-background: var(--win31-color-field);
|
|
241
|
+
--rc-progress-track-opacity: 1;
|
|
242
|
+
--rc-progress-track-radius: var(--win31-radius);
|
|
243
|
+
--rc-progress-fill-background: var(--win31-color-selection);
|
|
244
|
+
--rc-progress-value-color: var(--win31-color-frame);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.rc-theme-win31 rc-bottom-sheet,
|
|
248
|
+
:host(.rc-theme-win31) rc-bottom-sheet {
|
|
249
|
+
--rc-bottom-sheet-bg: var(--win31-color-surface);
|
|
250
|
+
--rc-bottom-sheet-color: var(--win31-color-frame);
|
|
251
|
+
--rc-bottom-sheet-radius: var(--win31-radius);
|
|
252
|
+
--rc-bottom-sheet-shadow: none;
|
|
253
|
+
--rc-bottom-sheet-scrim: transparent;
|
|
254
|
+
--rc-bottom-sheet-handle-color: var(--win31-color-shadow);
|
|
255
|
+
--rc-bottom-sheet-handle-radius: var(--win31-radius);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* 3.1 had no accordion, so this is a stack of the window-shade panels above
|
|
4
|
+
* with no gap between them, which is how a column of 3.1 panes actually read.
|
|
5
|
+
*
|
|
6
|
+
* rc-accordion owns only the group gap by design. Panel chrome reaches the
|
|
7
|
+
* children through the shared --rc-disclosure-* recipe, so there is no
|
|
8
|
+
* parallel accordion-panel vocabulary to keep in step. Panel styling belongs
|
|
9
|
+
* in disclosure.css rather than here.
|
|
10
|
+
*/
|
|
11
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-accordion {
|
|
12
|
+
--rc-accordion-gap: 0;
|
|
13
|
+
display: block;
|
|
14
|
+
font-family: var(--win31-font-family);
|
|
15
|
+
font-size: var(--win31-font-size);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-accordion > rc-disclosure + rc-disclosure {
|
|
19
|
+
margin-block-start: calc(-1 * var(--win31-hairline));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* Declared on the theme root rather than on rc-adaptive-menu so menus
|
|
4
|
+
* rendered inside other shadow roots inherit the same values.
|
|
5
|
+
*/
|
|
6
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) {
|
|
7
|
+
--rc-adaptive-menu-gap: var(--win31-gap-tight);
|
|
8
|
+
--rc-adaptive-menu-item-gap: var(--win31-gap-tight);
|
|
9
|
+
--rc-adaptive-menu-item-min-block-size: var(--win31-control-height);
|
|
10
|
+
--rc-adaptive-menu-item-padding-block: var(--win31-padding-block);
|
|
11
|
+
--rc-adaptive-menu-item-padding-inline: calc(8 * var(--win31-unit));
|
|
12
|
+
--rc-adaptive-menu-icon-size: var(--win31-check-size);
|
|
13
|
+
--rc-adaptive-menu-trigger-background: var(--win31-color-surface);
|
|
14
|
+
--rc-adaptive-menu-trigger-color: var(--win31-color-frame);
|
|
15
|
+
--rc-adaptive-menu-trigger-border: var(--win31-border);
|
|
16
|
+
--rc-adaptive-menu-trigger-radius: var(--win31-radius);
|
|
17
|
+
--rc-adaptive-menu-trigger-shadow: var(--win31-bevel-outset-1);
|
|
18
|
+
--rc-adaptive-menu-trigger-active-shadow: var(--win31-bevel-inset-1);
|
|
19
|
+
--rc-adaptive-menu-trigger-block-size: var(--win31-control-height);
|
|
20
|
+
--rc-adaptive-menu-trigger-inline-size: var(--win31-control-height);
|
|
21
|
+
--rc-adaptive-menu-trigger-padding: 0;
|
|
22
|
+
--rc-adaptive-menu-popup-min-inline-size: calc(142 * var(--win31-unit));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-adaptive-menu {
|
|
26
|
+
font-family: var(--win31-font-family);
|
|
27
|
+
font-size: var(--win31-font-size);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-adaptive-menu::part(overflow-trigger) {
|
|
31
|
+
cursor: default;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* An action rc-adaptive-menu moves into its overflow renders as a menu row.
|
|
37
|
+
* rc-adaptive-menu maps the action's own tokens onto its item tokens in rc-base,
|
|
38
|
+
* which sits below every theme layer, so this layer repeats the mapping above the
|
|
39
|
+
* theme's button and menu-button variants (filled, tonal, icon-only sizes, and so
|
|
40
|
+
* on) that would otherwise restyle the row as a standalone control.
|
|
41
|
+
*/
|
|
42
|
+
@layer rc-theme-win31.overrides {
|
|
43
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
44
|
+
rc-adaptive-menu
|
|
45
|
+
> rc-button[data-rc-action-overflowed] {
|
|
46
|
+
--rc-button-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
47
|
+
--rc-button-icon-size: 100%;
|
|
48
|
+
--rc-button-touch-target-inline-size: 100%;
|
|
49
|
+
--rc-button-touch-target-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
50
|
+
--rc-button-padding-inline: var(
|
|
51
|
+
--rc-adaptive-menu-item-padding-inline,
|
|
52
|
+
var(--rc-item-padding-inline, 0.75em)
|
|
53
|
+
);
|
|
54
|
+
--rc-button-padding-block: var(
|
|
55
|
+
--rc-adaptive-menu-item-padding-block,
|
|
56
|
+
var(--rc-item-padding-block, 0.3em)
|
|
57
|
+
);
|
|
58
|
+
--rc-button-radius: 0;
|
|
59
|
+
--rc-button-bg: transparent;
|
|
60
|
+
--rc-button-color: currentColor;
|
|
61
|
+
--rc-button-border: 0;
|
|
62
|
+
--rc-button-state-layer-bg: currentColor;
|
|
63
|
+
--rc-button-progress-color: currentColor;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
67
|
+
rc-adaptive-menu
|
|
68
|
+
> rc-menu-button[data-rc-action-overflowed] {
|
|
69
|
+
--rc-menu-button-trigger-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
70
|
+
--rc-menu-button-icon-size: 100%;
|
|
71
|
+
--rc-menu-button-touch-target-inline-size: 100%;
|
|
72
|
+
--rc-menu-button-touch-target-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
73
|
+
--rc-menu-button-trigger-padding-block: var(
|
|
74
|
+
--rc-adaptive-menu-item-padding-block,
|
|
75
|
+
var(--rc-item-padding-block, 0.3em)
|
|
76
|
+
);
|
|
77
|
+
--rc-menu-button-trigger-padding-inline: var(
|
|
78
|
+
--rc-adaptive-menu-item-padding-inline,
|
|
79
|
+
var(--rc-item-padding-inline, 0.75em)
|
|
80
|
+
);
|
|
81
|
+
--rc-menu-button-trigger-gap: var(--rc-adaptive-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
82
|
+
--rc-menu-button-trigger-radius: 0;
|
|
83
|
+
--rc-menu-button-trigger-border: 0;
|
|
84
|
+
--rc-menu-button-trigger-background: transparent;
|
|
85
|
+
--rc-menu-button-trigger-color: currentColor;
|
|
86
|
+
--rc-menu-button-trigger-hover-color: currentColor;
|
|
87
|
+
--rc-menu-button-trigger-open-color: currentColor;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* Win31 draws its buttons on the native control, not through tokens. */
|
|
91
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
92
|
+
rc-adaptive-menu
|
|
93
|
+
> :is(rc-button, rc-menu-button)[data-rc-action-overflowed]
|
|
94
|
+
> :is(button, a[href]) {
|
|
95
|
+
inline-size: 100%;
|
|
96
|
+
min-inline-size: 0;
|
|
97
|
+
min-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
98
|
+
block-size: auto;
|
|
99
|
+
padding: var(--rc-adaptive-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
100
|
+
var(--rc-adaptive-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
101
|
+
border: none;
|
|
102
|
+
border-radius: 0;
|
|
103
|
+
background: transparent;
|
|
104
|
+
box-shadow: none;
|
|
105
|
+
color: inherit;
|
|
106
|
+
text-align: start;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* The application window's caption bar. Same construction as the dialog
|
|
4
|
+
* caption above: a solid active-title fill, a centered bold title, and
|
|
5
|
+
* beveled caption buttons at the trailing edge.
|
|
6
|
+
*/
|
|
7
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar {
|
|
8
|
+
--rc-app-bar-bg: var(--win31-color-title-active);
|
|
9
|
+
--rc-app-bar-color: var(--win31-color-title-active-text);
|
|
10
|
+
--rc-app-bar-compact-min-height: var(--win31-title-height);
|
|
11
|
+
--rc-app-bar-title-font-size: var(--win31-title-font-size);
|
|
12
|
+
--rc-app-bar-expanded-title-font-size: var(--win31-title-font-size);
|
|
13
|
+
--rc-app-bar-expanded-padding-block: 0;
|
|
14
|
+
--rc-app-bar-padding-inline: 0;
|
|
15
|
+
--rc-app-bar-title-start-padding: var(--win31-padding-inline);
|
|
16
|
+
--rc-app-bar-gap: 0;
|
|
17
|
+
--rc-app-bar-shadow: none;
|
|
18
|
+
--rc-app-bar-scroll-divider: var(--win31-border);
|
|
19
|
+
--rc-app-bar-transition-duration: 0ms;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar::part(root) {
|
|
23
|
+
min-block-size: var(--win31-title-height);
|
|
24
|
+
border-block-end: var(--win31-border);
|
|
25
|
+
font-family: var(--win31-font-family);
|
|
26
|
+
user-select: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar::part(title) {
|
|
30
|
+
flex: 1;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
text-align: center;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar::part(scroll-shadow) {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar button {
|
|
40
|
+
inline-size: var(--win31-title-height);
|
|
41
|
+
block-size: var(--win31-title-height);
|
|
42
|
+
min-inline-size: var(--win31-title-height);
|
|
43
|
+
min-block-size: var(--win31-title-height);
|
|
44
|
+
padding: 0;
|
|
45
|
+
color: var(--win31-color-frame);
|
|
46
|
+
background-color: var(--win31-color-surface);
|
|
47
|
+
border: 0;
|
|
48
|
+
border-inline-start: var(--win31-border);
|
|
49
|
+
border-radius: var(--win31-radius);
|
|
50
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
51
|
+
cursor: default;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar button:active {
|
|
55
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/*
|
|
59
|
+
* An inactive window took the muted caption pair. rc-app-bar has no inactive
|
|
60
|
+
* state of its own, so this is offered as a documented opt-in marker.
|
|
61
|
+
*/
|
|
62
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-app-bar[data-rc-win31-inactive] {
|
|
63
|
+
--rc-app-bar-bg: var(--win31-color-title-inactive);
|
|
64
|
+
--rc-app-bar-color: var(--win31-color-title-inactive-text);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* 3.1 had no bottom sheet. The nearest real thing is a non-modal tool
|
|
4
|
+
* palette parked against an edge of the workspace, so that is what this
|
|
5
|
+
* renders: a framed panel with a caption-height grab strip and no rounding,
|
|
6
|
+
* no elevation, and no scrim.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-bottom-sheet {
|
|
9
|
+
--rc-bottom-sheet-bg: var(--win31-color-surface);
|
|
10
|
+
--rc-bottom-sheet-color: var(--win31-color-frame);
|
|
11
|
+
--rc-bottom-sheet-radius: var(--win31-radius);
|
|
12
|
+
--rc-bottom-sheet-shadow: var(--win31-window-frame);
|
|
13
|
+
--rc-bottom-sheet-scrim: transparent;
|
|
14
|
+
--rc-bottom-sheet-padding: var(--win31-gap-panel);
|
|
15
|
+
--rc-bottom-sheet-handle-color: var(--win31-color-title-active);
|
|
16
|
+
--rc-bottom-sheet-handle-radius: var(--win31-radius);
|
|
17
|
+
--rc-bottom-sheet-handle-inline-size: calc(32 * var(--win31-unit));
|
|
18
|
+
--rc-bottom-sheet-handle-block-size: calc(4 * var(--win31-unit));
|
|
19
|
+
--rc-bottom-sheet-snap-duration: 0ms;
|
|
20
|
+
font-family: var(--win31-font-family);
|
|
21
|
+
font-size: var(--win31-font-size);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-bottom-sheet > dialog {
|
|
25
|
+
color: var(--win31-color-frame);
|
|
26
|
+
background: var(--win31-color-surface);
|
|
27
|
+
border: var(--win31-border);
|
|
28
|
+
border-radius: var(--win31-radius);
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-bottom-sheet > dialog::backdrop {
|
|
33
|
+
background: transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-bottom-sheet [data-rc-bottom-sheet-handle] {
|
|
37
|
+
border: var(--win31-hairline) solid;
|
|
38
|
+
border-color: var(--win31-outset-border-color);
|
|
39
|
+
border-radius: var(--win31-radius);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button > button {
|
|
3
|
+
min-block-size: var(--win31-control-height);
|
|
4
|
+
min-inline-size: var(--win31-control-height);
|
|
5
|
+
padding-block: var(--win31-padding-block);
|
|
6
|
+
padding-inline: calc(8 * var(--win31-unit));
|
|
7
|
+
color: var(--win31-color-frame);
|
|
8
|
+
background-color: var(--win31-color-surface);
|
|
9
|
+
border: var(--win31-border);
|
|
10
|
+
border-radius: var(--win31-radius);
|
|
11
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
12
|
+
font: var(--rc-button-font);
|
|
13
|
+
/* Windows 3.1 never showed a text cursor over a push button. */
|
|
14
|
+
cursor: default;
|
|
15
|
+
transition: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Pressed is a geometry change rather than a color change: the bevel inverts
|
|
20
|
+
* and the label moves one pixel down and right, so the control reads as
|
|
21
|
+
* physically depressed.
|
|
22
|
+
*/
|
|
23
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button > button:active:not(:disabled) {
|
|
24
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button > button:active:not(:disabled) > * {
|
|
28
|
+
translate: var(--win31-unit) var(--win31-unit);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button > button:focus-visible {
|
|
32
|
+
outline: var(--win31-focus-ring);
|
|
33
|
+
outline-offset: var(--win31-focus-ring-offset);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Disabled is embossed, not faded. Windows 3.1 had no alpha channel, so it
|
|
38
|
+
* drew gray text over a one-pixel highlight offset. --rc-disabled-opacity
|
|
39
|
+
* stays at 1 for exactly this reason.
|
|
40
|
+
*/
|
|
41
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button > button:disabled {
|
|
42
|
+
color: var(--win31-color-disabled-text);
|
|
43
|
+
text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
|
|
44
|
+
opacity: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
* The default button in a dialog carried a second frame, which is how Enter
|
|
49
|
+
* was advertised before a focus ring could be relied on.
|
|
50
|
+
*/
|
|
51
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button[data-rc-win31-default] > button {
|
|
52
|
+
outline: calc(2 * var(--win31-unit)) solid var(--win31-color-frame);
|
|
53
|
+
outline-offset: var(--win31-unit);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button[icon-only] > button {
|
|
57
|
+
inline-size: var(--win31-toolbar-button-size);
|
|
58
|
+
block-size: var(--win31-toolbar-button-size);
|
|
59
|
+
padding-inline: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button::part(state-layer) {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-button::part(progress) {
|
|
67
|
+
inset: var(--win31-gap-tight);
|
|
68
|
+
background: var(--win31-color-surface);
|
|
69
|
+
border: var(--win31-border);
|
|
70
|
+
border-radius: var(--win31-radius);
|
|
71
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
72
|
+
font: var(--rc-button-font);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* A card is a group box: an outset panel with no radius and no elevation.
|
|
4
|
+
* Depth comes from the one-pixel bevel, which is all Windows 3.1 had.
|
|
5
|
+
*/
|
|
6
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(container) {
|
|
7
|
+
background: var(--win31-color-surface);
|
|
8
|
+
color: var(--win31-color-frame);
|
|
9
|
+
border: var(--win31-hairline) solid;
|
|
10
|
+
border-color: var(--win31-outset-border-color);
|
|
11
|
+
border-radius: var(--win31-radius);
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
font-family: var(--win31-font-family);
|
|
14
|
+
font-size: var(--win31-font-size);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(header) {
|
|
18
|
+
padding-block: var(--win31-gap-tight);
|
|
19
|
+
padding-inline: var(--win31-padding-inline);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(title) {
|
|
23
|
+
font-size: var(--win31-font-size);
|
|
24
|
+
font-weight: 700;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(subtitle) {
|
|
28
|
+
color: var(--win31-color-frame);
|
|
29
|
+
font-size: var(--win31-font-size);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(media) img {
|
|
33
|
+
image-rendering: pixelated;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card::part(state-layer) {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* A horizontal rule in a 3.1 panel is a two-pixel ridge, not a line: one
|
|
42
|
+
* shadow pixel above one highlight pixel.
|
|
43
|
+
*/
|
|
44
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-card hr {
|
|
45
|
+
margin-block: var(--win31-gap-tight);
|
|
46
|
+
border: 0;
|
|
47
|
+
border-block-start: var(--win31-hairline) solid var(--win31-color-shadow);
|
|
48
|
+
border-block-end: var(--win31-hairline) solid var(--win31-color-highlight);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* No 3.1 analogue. Rendered as a framed filmstrip whose navigation reuses
|
|
4
|
+
* the scrollbar button construction, which is the only stepping affordance
|
|
5
|
+
* the period actually had.
|
|
6
|
+
*/
|
|
7
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(track) {
|
|
8
|
+
border: var(--win31-hairline) solid;
|
|
9
|
+
border-color: var(--win31-inset-border-color);
|
|
10
|
+
border-radius: var(--win31-radius);
|
|
11
|
+
background: var(--win31-color-field);
|
|
12
|
+
scroll-behavior: auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(navigation-button) {
|
|
16
|
+
inline-size: var(--win31-scrollbar-size);
|
|
17
|
+
block-size: var(--win31-scrollbar-size);
|
|
18
|
+
color: transparent;
|
|
19
|
+
background-color: var(--win31-color-surface);
|
|
20
|
+
background-position: center;
|
|
21
|
+
background-repeat: no-repeat;
|
|
22
|
+
border: var(--win31-border);
|
|
23
|
+
border-radius: var(--win31-radius);
|
|
24
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
25
|
+
font-size: 0;
|
|
26
|
+
cursor: default;
|
|
27
|
+
transition: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(navigation-button):active {
|
|
31
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(navigation-button-previous) {
|
|
35
|
+
background-image: var(--win31-glyph-arrow-left);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(navigation-button-next) {
|
|
39
|
+
background-image: var(--win31-glyph-arrow-right);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(pagination-item) {
|
|
43
|
+
inline-size: calc(8 * var(--win31-unit));
|
|
44
|
+
block-size: calc(8 * var(--win31-unit));
|
|
45
|
+
background: var(--win31-color-surface);
|
|
46
|
+
border: var(--win31-hairline) solid;
|
|
47
|
+
border-color: var(--win31-inset-border-color);
|
|
48
|
+
border-radius: var(--win31-radius);
|
|
49
|
+
transition: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel::part(pagination-item-active) {
|
|
53
|
+
background: var(--win31-color-selection);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-carousel img {
|
|
57
|
+
image-rendering: pixelated;
|
|
58
|
+
}
|
|
59
|
+
}
|