@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/defaults.css
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
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.defaults {
|
|
5
|
+
/*
|
|
6
|
+
* Windows 3.1 reference tokens.
|
|
7
|
+
*
|
|
8
|
+
* Scoped so applications can place the theme at any app boundary. Import
|
|
9
|
+
* bridge.css alone when providing your own --win31-* tokens.
|
|
10
|
+
*
|
|
11
|
+
* Values are the stock "Windows Default" scheme. Windows 3.1 shipped around
|
|
12
|
+
* twenty further named Control Panel schemes. A color scheme overrides the
|
|
13
|
+
* --win31-color-* roles; image assets may need matching replacements.
|
|
14
|
+
*/
|
|
15
|
+
.rc-theme-win31,
|
|
16
|
+
:host(.rc-theme-win31) {
|
|
17
|
+
/*
|
|
18
|
+
* Windows 3.1 had no dark mode. Declaring the scheme keeps browser-painted
|
|
19
|
+
* UI (form controls, scrollbars, the canvas behind a dialog) from fighting
|
|
20
|
+
* a palette that is light by construction.
|
|
21
|
+
*/
|
|
22
|
+
color-scheme: light;
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* The scaling unit. Every metric below is authored as a multiple of it, so
|
|
26
|
+
* setting --win31-unit: 2px doubles the whole theme for a high-density
|
|
27
|
+
* display or a low-vision consumer without changing a single ratio. This is
|
|
28
|
+
* the bitmap-interface answer to responsive sizing.
|
|
29
|
+
*/
|
|
30
|
+
--win31-unit: 1px;
|
|
31
|
+
|
|
32
|
+
/* Palette */
|
|
33
|
+
--win31-color-surface: #c0c0c0;
|
|
34
|
+
--win31-color-highlight: #ffffff;
|
|
35
|
+
--win31-color-shadow: #808080;
|
|
36
|
+
--win31-color-shadow-dark: #404040;
|
|
37
|
+
--win31-color-frame: #000000;
|
|
38
|
+
--win31-color-field: #ffffff;
|
|
39
|
+
--win31-color-field-text: #000000;
|
|
40
|
+
--win31-color-menu: #c0c0c0;
|
|
41
|
+
--win31-color-menu-text: #000000;
|
|
42
|
+
--win31-color-selection: #000080;
|
|
43
|
+
--win31-color-selection-text: #ffffff;
|
|
44
|
+
--win31-color-title-active: #000080;
|
|
45
|
+
--win31-color-title-active-text: #ffffff;
|
|
46
|
+
--win31-color-title-inactive: #808080;
|
|
47
|
+
--win31-color-title-inactive-text: #c0c0c0;
|
|
48
|
+
--win31-color-desktop: #008080;
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Disabled is embossed rather than faded: Windows 3.1 had no alpha, so it
|
|
52
|
+
* drew gray text with a one-pixel highlight offset underneath it.
|
|
53
|
+
*/
|
|
54
|
+
--win31-color-disabled-text: var(--win31-color-shadow);
|
|
55
|
+
--win31-color-disabled-emboss: var(--win31-color-highlight);
|
|
56
|
+
|
|
57
|
+
/* Typography */
|
|
58
|
+
--win31-font-family: 'Microsoft Sans Serif', 'MS Sans Serif', Tahoma, 'Segoe UI', sans-serif;
|
|
59
|
+
--win31-font-size: calc(13 * var(--win31-unit));
|
|
60
|
+
--win31-menu-font-size: calc(16 * var(--win31-unit));
|
|
61
|
+
--win31-title-font-size: calc(16 * var(--win31-unit));
|
|
62
|
+
--win31-line-height: 1.1;
|
|
63
|
+
--win31-font-weight: 400;
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
* Metrics, derived from the MS Sans Serif 8pt cell of 6 by 13 pixels at
|
|
67
|
+
* 96 DPI. One horizontal dialog unit is 1.5px, one vertical unit 1.625px,
|
|
68
|
+
* which puts the standard 50 by 14 DLU push button at 75 by 23 pixels.
|
|
69
|
+
*/
|
|
70
|
+
--win31-control-height: calc(23 * var(--win31-unit));
|
|
71
|
+
--win31-title-height: calc(24 * var(--win31-unit));
|
|
72
|
+
--win31-menu-height: calc(27 * var(--win31-unit));
|
|
73
|
+
--win31-toolbar-height: calc(31 * var(--win31-unit));
|
|
74
|
+
--win31-toolbar-button-size: calc(27 * var(--win31-unit));
|
|
75
|
+
--win31-listbox-row-height: calc(17 * var(--win31-unit));
|
|
76
|
+
--win31-scrollbar-size: calc(16 * var(--win31-unit));
|
|
77
|
+
--win31-check-size: calc(13 * var(--win31-unit));
|
|
78
|
+
--win31-hairline: var(--win31-unit);
|
|
79
|
+
--win31-gap: calc(4 * var(--win31-unit));
|
|
80
|
+
--win31-gap-tight: calc(2 * var(--win31-unit));
|
|
81
|
+
--win31-gap-panel: calc(6 * var(--win31-unit));
|
|
82
|
+
--win31-padding-block: var(--win31-unit);
|
|
83
|
+
--win31-padding-inline: calc(4 * var(--win31-unit));
|
|
84
|
+
|
|
85
|
+
/* Geometry. Nothing in Windows 3.1 was rounded, and nothing was blurred. */
|
|
86
|
+
--win31-radius: 0;
|
|
87
|
+
--win31-border: var(--win31-hairline) solid var(--win31-color-frame);
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* Focus is a dotted rectangle drawn inside the control, never a ring
|
|
91
|
+
* around it, and it coexists with selection rather than replacing it.
|
|
92
|
+
*/
|
|
93
|
+
--win31-focus-ring: var(--win31-hairline) dotted var(--win31-color-frame);
|
|
94
|
+
--win31-focus-ring-offset: calc(-3 * var(--win31-unit));
|
|
95
|
+
--win31-focus-ring-selected: var(--win31-hairline) dotted var(--win31-color-highlight);
|
|
96
|
+
|
|
97
|
+
--win31-bevel-outset-1:
|
|
98
|
+
inset var(--win31-hairline) var(--win31-hairline) 0 var(--win31-color-highlight),
|
|
99
|
+
inset calc(-1 * var(--win31-hairline)) calc(-1 * var(--win31-hairline)) 0
|
|
100
|
+
var(--win31-color-shadow);
|
|
101
|
+
--win31-bevel-inset-1:
|
|
102
|
+
inset var(--win31-hairline) var(--win31-hairline) 0 var(--win31-color-shadow),
|
|
103
|
+
inset calc(-1 * var(--win31-hairline)) calc(-1 * var(--win31-hairline)) 0
|
|
104
|
+
var(--win31-color-highlight);
|
|
105
|
+
--win31-bevel-outset-2:
|
|
106
|
+
inset calc(2 * var(--win31-hairline)) calc(2 * var(--win31-hairline)) 0
|
|
107
|
+
var(--win31-color-highlight),
|
|
108
|
+
inset calc(-2 * var(--win31-hairline)) calc(-2 * var(--win31-hairline)) 0
|
|
109
|
+
var(--win31-color-shadow);
|
|
110
|
+
--win31-bevel-inset-2:
|
|
111
|
+
inset calc(2 * var(--win31-hairline)) calc(2 * var(--win31-hairline)) 0
|
|
112
|
+
var(--win31-color-shadow),
|
|
113
|
+
inset calc(-2 * var(--win31-hairline)) calc(-2 * var(--win31-hairline)) 0
|
|
114
|
+
var(--win31-color-highlight);
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
* The four-value border-color shorthands are the other way to draw a bevel.
|
|
118
|
+
* They survive a background-image where an inset box-shadow would sit on
|
|
119
|
+
* top of it, so listboxes and fields use these and buttons use the shadows.
|
|
120
|
+
*/
|
|
121
|
+
--win31-inset-border-color: var(--win31-color-shadow) var(--win31-color-highlight)
|
|
122
|
+
var(--win31-color-highlight) var(--win31-color-shadow);
|
|
123
|
+
--win31-outset-border-color: var(--win31-color-highlight) var(--win31-color-shadow)
|
|
124
|
+
var(--win31-color-shadow) var(--win31-color-highlight);
|
|
125
|
+
|
|
126
|
+
--win31-window-frame: 0 0 0 var(--win31-hairline) var(--win31-color-frame);
|
|
127
|
+
--win31-dialog-frame:
|
|
128
|
+
inset 0 0 0 calc(3 * var(--win31-hairline)) var(--win31-color-title-active),
|
|
129
|
+
inset 0 0 0 calc(4 * var(--win31-hairline)) var(--win31-color-highlight);
|
|
130
|
+
|
|
131
|
+
/* A menu casts a hard one-pixel shadow, never a blur. */
|
|
132
|
+
--win31-drop-shadow: var(--win31-hairline) var(--win31-hairline) 0 var(--win31-color-shadow);
|
|
133
|
+
|
|
134
|
+
/*
|
|
135
|
+
* One-bit dither, the period way to say "less" without an alpha channel.
|
|
136
|
+
* Used for scrollbar tracks and latched toggle faces.
|
|
137
|
+
*/
|
|
138
|
+
--win31-dither-track: conic-gradient(
|
|
139
|
+
var(--win31-color-highlight) 0 25%,
|
|
140
|
+
var(--win31-color-surface) 0 50%,
|
|
141
|
+
var(--win31-color-highlight) 0 75%,
|
|
142
|
+
var(--win31-color-surface) 0
|
|
143
|
+
);
|
|
144
|
+
--win31-dither-size: calc(2 * var(--win31-unit));
|
|
145
|
+
|
|
146
|
+
/*
|
|
147
|
+
* The latched face, as a complete background shorthand. Components expose
|
|
148
|
+
* their selected background as a shorthand token, so handing them this
|
|
149
|
+
* paints the dither through their own contract instead of fighting a
|
|
150
|
+
* shorthand with a longhand override.
|
|
151
|
+
*/
|
|
152
|
+
--win31-dither-surface: var(--win31-color-surface) var(--win31-dither-track) repeat 0 0 /
|
|
153
|
+
var(--win31-dither-size);
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
* Glyphs are 1-bit bitmaps, not an icon font. Each is an SVG path drawn on
|
|
157
|
+
* the pixel grid with shape-rendering="crispEdges" so it stays sharp when
|
|
158
|
+
* --win31-unit scales it up.
|
|
159
|
+
*/
|
|
160
|
+
--win31-glyph-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M8 5h1v1h1v1h1v1h1v1H4V8h1V7h1V6h1V5z'/%3E%3C/svg%3E");
|
|
161
|
+
--win31-glyph-arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M4 6h8v1h-1v1h-1v1H9v1H8v1H7v-1H6V9H5V8H4z'/%3E%3C/svg%3E");
|
|
162
|
+
--win31-glyph-arrow-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M5 8h1V7h1V6h1V5h1V4h1v8H9v-1H8v-1H7V9H6V8z'/%3E%3C/svg%3E");
|
|
163
|
+
--win31-glyph-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M6 4h1v1h1v1h1v1h1v1h1v1h-1v1H9v1H8v1H7v1H6z'/%3E%3C/svg%3E");
|
|
164
|
+
--win31-glyph-collapse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M6 4h1v1h1v1h1v1h1v1H3V7h1V6h1V5h1V4z'/%3E%3C/svg%3E");
|
|
165
|
+
--win31-glyph-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M4 3h1v1h1v1h1v1h1v1H7v1H6v1H5v1H4z'/%3E%3C/svg%3E");
|
|
166
|
+
--win31-glyph-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M10 3h2v2h-1v1h-1v1H9v1H8v1H7v1H6v1H4v-1H3V9H2V8H1V7h2v1h1v1h1V8h1V7h1V6h1V5h1V4h1z'/%3E%3C/svg%3E");
|
|
167
|
+
--win31-glyph-submenu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M4 3h1v1h1v1h1v1h1v1H7v1H6v1H5v1H4z'/%3E%3C/svg%3E");
|
|
168
|
+
}
|
|
169
|
+
}
|
package/native.css
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
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
|
+
/* Import defaults.css and bridge.css first when theme tokens are desired. */
|
|
5
|
+
@layer rc-theme-win31.native {
|
|
6
|
+
/*
|
|
7
|
+
* Native styles stop at native controls that are part of an RC-owned
|
|
8
|
+
* presentation, and at subtrees the consumer opts out with
|
|
9
|
+
* data-rc-native="off". These are element-level ownership contracts rather
|
|
10
|
+
* than host boundaries, so ordinary controls remain themed in layout
|
|
11
|
+
* components such as rc-toolbar, rc-card, rc-dialog, and rc-popover.
|
|
12
|
+
*/
|
|
13
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
14
|
+
:where(button, input, select, textarea, progress):not(
|
|
15
|
+
:where(
|
|
16
|
+
[data-rc-native='off'],
|
|
17
|
+
[data-rc-native='off'] *,
|
|
18
|
+
rc-button > :is(button, a[href]),
|
|
19
|
+
rc-chip > :is(button, a[href], label),
|
|
20
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
21
|
+
rc-combobox > select,
|
|
22
|
+
rc-fab > button,
|
|
23
|
+
rc-fab-menu > [slot='trigger'],
|
|
24
|
+
rc-field > :is(input, select, textarea),
|
|
25
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
26
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
27
|
+
rc-listbox > select,
|
|
28
|
+
rc-markdown-editor > textarea,
|
|
29
|
+
rc-navigation-rail > [slot='toggle'],
|
|
30
|
+
rc-menu-button > [slot='trigger'],
|
|
31
|
+
rc-progress > progress,
|
|
32
|
+
rc-range-slider > input[type='range'],
|
|
33
|
+
rc-search-bar > input[type='search'],
|
|
34
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
35
|
+
rc-select > select,
|
|
36
|
+
rc-slider > input[type='range'],
|
|
37
|
+
rc-switch > input[type='checkbox'],
|
|
38
|
+
rc-textarea > textarea,
|
|
39
|
+
rc-transfer-list > select
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
43
|
+
:where(button, input, select, textarea, progress):not(
|
|
44
|
+
:where(
|
|
45
|
+
[data-rc-native='off'],
|
|
46
|
+
[data-rc-native='off'] *,
|
|
47
|
+
rc-button > :is(button, a[href]),
|
|
48
|
+
rc-chip > :is(button, a[href], label),
|
|
49
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
50
|
+
rc-combobox > select,
|
|
51
|
+
rc-fab > button,
|
|
52
|
+
rc-fab-menu > [slot='trigger'],
|
|
53
|
+
rc-field > :is(input, select, textarea),
|
|
54
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
55
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
56
|
+
rc-listbox > select,
|
|
57
|
+
rc-markdown-editor > textarea,
|
|
58
|
+
rc-navigation-rail > [slot='toggle'],
|
|
59
|
+
rc-menu-button > [slot='trigger'],
|
|
60
|
+
rc-progress > progress,
|
|
61
|
+
rc-range-slider > input[type='range'],
|
|
62
|
+
rc-search-bar > input[type='search'],
|
|
63
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
64
|
+
rc-select > select,
|
|
65
|
+
rc-slider > input[type='range'],
|
|
66
|
+
rc-switch > input[type='checkbox'],
|
|
67
|
+
rc-textarea > textarea,
|
|
68
|
+
rc-transfer-list > select
|
|
69
|
+
)
|
|
70
|
+
) {
|
|
71
|
+
&:where(button):not(:where(.rc-button, .rc-chip)) {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
gap: var(--rc-button-gap, var(--rc-control-gap, 0.5rem));
|
|
77
|
+
min-block-size: var(--rc-button-block-size, var(--rc-control-block-size, 2.5rem));
|
|
78
|
+
padding-block: var(--rc-button-padding-block, var(--rc-control-padding-block, 0.5rem));
|
|
79
|
+
padding-inline: var(--rc-button-padding-inline, var(--rc-control-padding-inline, 1rem));
|
|
80
|
+
border: var(--rc-button-border, var(--rc-border, 1px solid ButtonBorder));
|
|
81
|
+
border-radius: var(--rc-button-radius, var(--rc-control-radius, 999px));
|
|
82
|
+
background: var(--rc-button-bg, ButtonFace);
|
|
83
|
+
color: var(--rc-button-color, var(--rc-button-text, ButtonText));
|
|
84
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
85
|
+
font-size: var(--rc-font-size, 1rem);
|
|
86
|
+
font-weight: var(--rc-font-weight, 400);
|
|
87
|
+
line-height: var(--rc-line-height, normal);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:where(
|
|
92
|
+
input:is(
|
|
93
|
+
[type='text'],
|
|
94
|
+
[type='search'],
|
|
95
|
+
[type='email'],
|
|
96
|
+
[type='url'],
|
|
97
|
+
[type='tel'],
|
|
98
|
+
[type='number'],
|
|
99
|
+
[type='password'],
|
|
100
|
+
:where(:not([type]))
|
|
101
|
+
),
|
|
102
|
+
select,
|
|
103
|
+
textarea
|
|
104
|
+
) {
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
107
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
108
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
109
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
110
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
111
|
+
background: var(--rc-field, Field);
|
|
112
|
+
color: var(--rc-field-text, FieldText);
|
|
113
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
114
|
+
font-size: var(--rc-font-size, 1rem);
|
|
115
|
+
font-weight: var(--rc-font-weight, 400);
|
|
116
|
+
line-height: var(--rc-line-height, normal);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:where(select):not(:where(.rc-select)) {
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:not(:where(.rc-button, .rc-chip, .rc-select, .rc-textarea)):focus-visible {
|
|
124
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
125
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:where(input[type='checkbox'], input[type='radio'], input[type='range']) {
|
|
129
|
+
min-block-size: auto;
|
|
130
|
+
padding: 0;
|
|
131
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:where(input[type='range'], progress) {
|
|
135
|
+
inline-size: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:where(progress) {
|
|
139
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:not(:where(.rc-button, .rc-chip)):where(:disabled) {
|
|
143
|
+
color: var(--rc-text-disabled, GrayText);
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:where(button):not(:where(.rc-button, .rc-chip)) {
|
|
148
|
+
background: var(--rc-button-bg, var(--win31-color-surface));
|
|
149
|
+
color: var(--rc-button-color, var(--win31-color-frame));
|
|
150
|
+
border: var(--rc-button-border, var(--win31-border));
|
|
151
|
+
border-radius: var(--win31-radius);
|
|
152
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
153
|
+
cursor: default;
|
|
154
|
+
transition: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:where(button):not(:where(.rc-button, .rc-chip)):active:not(:disabled) {
|
|
158
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&:where(button):not(:where(.rc-button, .rc-chip)):disabled {
|
|
162
|
+
color: var(--win31-color-disabled-text);
|
|
163
|
+
text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
|
|
164
|
+
opacity: 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Reassert rc-base light-DOM row geometry after generic native presentation. */
|
|
170
|
+
@layer rc-theme-win31.components {
|
|
171
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
172
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
173
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
174
|
+
),
|
|
175
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
176
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
177
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
178
|
+
) {
|
|
179
|
+
display: flex;
|
|
180
|
+
gap: var(--rc-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
181
|
+
min-block-size: var(--rc-menu-item-min-block-size, 0px);
|
|
182
|
+
justify-content: normal;
|
|
183
|
+
padding: var(--rc-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
184
|
+
var(--rc-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
185
|
+
border: none;
|
|
186
|
+
border-radius: var(--win31-radius);
|
|
187
|
+
box-shadow: none;
|
|
188
|
+
background: transparent;
|
|
189
|
+
color: inherit;
|
|
190
|
+
font: inherit;
|
|
191
|
+
cursor: default;
|
|
192
|
+
outline: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
196
|
+
rc-menu
|
|
197
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
198
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
199
|
+
),
|
|
200
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
201
|
+
rc-menu
|
|
202
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
203
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
204
|
+
) {
|
|
205
|
+
background: var(--rc-menu-hover-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
206
|
+
color: var(--rc-menu-hover-color, inherit);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
210
|
+
rc-menu
|
|
211
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
212
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
213
|
+
),
|
|
214
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
215
|
+
rc-menu
|
|
216
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
217
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
218
|
+
) {
|
|
219
|
+
background: var(--rc-menu-active-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
220
|
+
color: var(--rc-menu-active-color, inherit);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
224
|
+
rc-menu
|
|
225
|
+
:is(
|
|
226
|
+
button:disabled,
|
|
227
|
+
[role='menuitem'][aria-disabled='true'],
|
|
228
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
229
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
230
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
231
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
232
|
+
rc-menu
|
|
233
|
+
:is(
|
|
234
|
+
button:disabled,
|
|
235
|
+
[role='menuitem'][aria-disabled='true'],
|
|
236
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
237
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
238
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
239
|
+
color: var(--rc-menu-disabled-color, var(--rc-text-disabled, GrayText));
|
|
240
|
+
opacity: var(--rc-menu-disabled-opacity, var(--rc-disabled-opacity, 0.55));
|
|
241
|
+
pointer-events: none;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@layer rc-theme-win31.overrides {
|
|
246
|
+
:where(.rc-theme-win31:not([data-rc-native='off']))
|
|
247
|
+
:where(
|
|
248
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
249
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
250
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
251
|
+
:host(:not([data-rc-native='off']).rc-theme-win31)
|
|
252
|
+
:where(
|
|
253
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
254
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
255
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
256
|
+
display: flex;
|
|
257
|
+
gap: var(--rc-adaptive-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
258
|
+
min-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
259
|
+
padding: var(--rc-adaptive-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
260
|
+
var(--rc-adaptive-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
261
|
+
border: none;
|
|
262
|
+
border-radius: 0;
|
|
263
|
+
box-shadow: none;
|
|
264
|
+
background: transparent;
|
|
265
|
+
color: inherit;
|
|
266
|
+
font: inherit;
|
|
267
|
+
text-align: start;
|
|
268
|
+
justify-content: normal;
|
|
269
|
+
text-decoration: none;
|
|
270
|
+
}
|
|
271
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rcarls/rc-theme-win31",
|
|
3
|
-
"
|
|
4
|
-
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.7.0",
|
|
7
|
+
"description": "Windows 3.1 era CSS theme and token bridge for rc-webcomponents.",
|
|
5
8
|
"repository": {
|
|
6
9
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/richardcarls/rc-webcomponents.git"
|
|
10
|
+
"url": "git+https://github.com/richardcarls/rc-webcomponents.git",
|
|
11
|
+
"directory": "packages/rc-theme-win31"
|
|
8
12
|
},
|
|
13
|
+
"homepage": "https://richardcarls.github.io/rc-webcomponents/guide/theme-previews",
|
|
9
14
|
"license": "MIT",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./bridge.css",
|
|
21
|
+
"./bridge.css": "./bridge.css",
|
|
22
|
+
"./defaults.css": "./defaults.css",
|
|
23
|
+
"./components.css": "./components.css",
|
|
24
|
+
"./components/*.css": "./components/*.css",
|
|
25
|
+
"./css-components.css": "./css-components.css",
|
|
26
|
+
"./css-components/*.css": "./css-components/*.css",
|
|
27
|
+
"./native.css": "./native.css",
|
|
28
|
+
"./theme.css": "./theme.css",
|
|
29
|
+
"./DESIGN.md": "./DESIGN.md"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"*.css",
|
|
33
|
+
"components",
|
|
34
|
+
"css-components",
|
|
35
|
+
"README.md",
|
|
36
|
+
"DESIGN.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "echo 'CSS-only package, no build step'",
|
|
40
|
+
"test:browser": "vitest --run",
|
|
41
|
+
"test:browser:chrome": "vitest --run --project=chromium",
|
|
42
|
+
"test:browser:firefox": "vitest --run --project=firefox"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@rcarls/rc-button": "0.7.0",
|
|
46
|
+
"@rcarls/rc-dialog": "0.7.0",
|
|
47
|
+
"@rcarls/rc-disclosure": "0.7.0",
|
|
48
|
+
"@rcarls/rc-listbox": "0.7.0",
|
|
49
|
+
"@rcarls/rc-progress": "0.7.0",
|
|
50
|
+
"@rcarls/rc-segmented-button": "0.7.0",
|
|
51
|
+
"@rcarls/rc-toolbar": "0.7.0",
|
|
52
|
+
"@vitest/browser-playwright": "4.1.5",
|
|
53
|
+
"lit": "^3.0.0",
|
|
54
|
+
"playwright": "^1.56.0",
|
|
55
|
+
"vite": "^7.1.7",
|
|
56
|
+
"vitest": "^4.0.6"
|
|
13
57
|
}
|
|
14
|
-
}
|
|
58
|
+
}
|
package/theme.css
ADDED