@rcarls/rc-theme-win31 0.0.0-next-20260921045401
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 +92 -0
- package/README.md +137 -0
- package/bridge.css +247 -0
- package/components/accordion.css +21 -0
- package/components/adaptive-menu.css +35 -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 +67 -0
- package/components/icons.css +53 -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 +66 -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/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 +67 -0
- package/components/transfer-list.css +74 -0
- package/components/virtual-canvas.css +45 -0
- package/components.css +41 -0
- package/defaults.css +164 -0
- package/package.json +51 -0
- package/theme.css +3 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# @rcarls/rc-theme-win31
|
|
2
|
+
|
|
3
|
+
## 0.0.0-next-20260921045401
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 873592e: Add four directional motion tokens to the shared base contract:
|
|
8
|
+
`--rc-motion-effects-easing-enter`/`-exit` and
|
|
9
|
+
`--rc-motion-spatial-easing-enter`/`-exit`. An opening element decelerates
|
|
10
|
+
into place; a closing one accelerates out. There are no matching enter/exit
|
|
11
|
+
duration tokens; pair `-easing-exit` with an existing `-duration-fast` token
|
|
12
|
+
instead.
|
|
13
|
+
|
|
14
|
+
All three themes map the new tokens: Material pairs them with its
|
|
15
|
+
standard/emphasized decelerate and accelerate curves, Substrate keeps its one
|
|
16
|
+
curve as the enter curve and adds a generic accelerate shape for exit
|
|
17
|
+
(refined further once Substrate gets its own full spatial/effects scale), and
|
|
18
|
+
`rc-theme-win31` declares all four as `step-end`, matching its zero-motion
|
|
19
|
+
contract, so an application that loads the shared base tokens alongside
|
|
20
|
+
`rc-theme-win31` does not inherit the base defaults' real easing curves for
|
|
21
|
+
these two directions.
|
|
22
|
+
|
|
23
|
+
- 58f4e71: `rc-theme-substrate` and `rc-theme-win31` now map the full shared
|
|
24
|
+
spatial/effects motion scale that `rc-theme-material` already implements,
|
|
25
|
+
closing a gap where each declared only its own single compatibility duration.
|
|
26
|
+
|
|
27
|
+
Substrate adds a small, quicker scale of its own: 100/160/240 ms for
|
|
28
|
+
effects and 160/240/320 ms for spatial, with its existing single easing
|
|
29
|
+
curve as the spatial curve (it is already decelerate-shaped) and `ease-out`
|
|
30
|
+
for effects. The compatibility token now follows the effects default rather
|
|
31
|
+
than its own literal, matching the shared base contract's own convention.
|
|
32
|
+
The one remaining hardcoded duration, `rc-list-item`'s 100 ms row
|
|
33
|
+
transition, now reads from the effects-fast token. Substrate's
|
|
34
|
+
`prefers-reduced-motion` override moves from the bridge layer into
|
|
35
|
+
`components/modes.css`, in the components layer, matching where the other
|
|
36
|
+
two themes keep their mode overrides; a cascade layer test now proves the
|
|
37
|
+
later layer's override wins rather than assuming it.
|
|
38
|
+
|
|
39
|
+
win31 declares all thirteen shared tokens, plus the four directional ones
|
|
40
|
+
added last release, at zero duration with `step-end` easing. Previously only
|
|
41
|
+
the single compatibility token was set, so an application loading the shared
|
|
42
|
+
base tokens alongside this theme inherited base's real 180/300/450 ms
|
|
43
|
+
spatial motion for every other token in the scale, silently contradicting the
|
|
44
|
+
theme's own zero-motion contract. `rc-chip`'s existing zero-duration override
|
|
45
|
+
gets its matching `step-end` easing token.
|
|
46
|
+
|
|
47
|
+
Verifying that claim surfaced a limit worth knowing about even after this
|
|
48
|
+
fix: it holds only when the theme class is applied to a container, the
|
|
49
|
+
documented pattern, not to `<html>`. The shared `base.css` declares no cascade
|
|
50
|
+
layer, so its `:root` values outrank any theme layer whenever both target the
|
|
51
|
+
same element, which happens only when the theme class sits on `<html>` itself.
|
|
52
|
+
No theme package can fix this by declaring more tokens; see the styling guide
|
|
53
|
+
for details.
|
|
54
|
+
|
|
55
|
+
- 322d875: Add a Windows 3.1 era theme package with full component coverage.
|
|
56
|
+
|
|
57
|
+
`@rcarls/rc-theme-win31` maps a period `--win31-*` token layer onto the public
|
|
58
|
+
`--rc-*` contract and ships one stylesheet per component, matching the coverage
|
|
59
|
+
of the existing themes. Metrics derive from the MS Sans Serif 8pt cell and scale
|
|
60
|
+
from a single `--win31-unit` token, so the theme can be doubled without any
|
|
61
|
+
proportion changing.
|
|
62
|
+
|
|
63
|
+
The theme is light only, has no hover states outside menus, treats disabled as a
|
|
64
|
+
color rather than an opacity, draws focus and selection as separate marks, and
|
|
65
|
+
yields entirely under forced colors.
|
|
66
|
+
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- fef89dc: Move the segmented appearance into the component behind one switch.
|
|
70
|
+
|
|
71
|
+
Turning the native fieldset into a segmented control took 27 `--_rc-*`
|
|
72
|
+
declarations that every theme had to restate, 23 of them byte-identical. Two of
|
|
73
|
+
those blocks were accessibility recipes rather than taste: the visually hidden
|
|
74
|
+
legend that keeps the group's accessible name, and the hidden but focusable
|
|
75
|
+
radio. A theme that got either wrong removed the accessible name or made the
|
|
76
|
+
control unreachable by keyboard.
|
|
77
|
+
|
|
78
|
+
The component now owns the recipe and a theme sets
|
|
79
|
+
`--rc-segmented-button-appearance: segmented`. Four genuine theme choices become
|
|
80
|
+
public properties: `--rc-segmented-button-cursor`,
|
|
81
|
+
`--rc-segmented-button-disabled-cursor`,
|
|
82
|
+
`--rc-segmented-button-vertical-divider`, and
|
|
83
|
+
`--rc-segmented-button-selected-icon-display`.
|
|
84
|
+
|
|
85
|
+
Unset, the fieldset, legend, and radios keep their browser appearance, as
|
|
86
|
+
before. The switch is read with a style container query (Chrome 111, Safari 18,
|
|
87
|
+
Firefox 128); where that is unsupported the recipe does not apply and the
|
|
88
|
+
control falls back to the same native appearance.
|
|
89
|
+
|
|
90
|
+
To migrate a theme, replace its `--_rc-segmented-button-*` block with the single
|
|
91
|
+
`--rc-segmented-button-appearance: segmented` declaration, plus any of the four
|
|
92
|
+
public properties whose value differs from the default.
|
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# @rcarls/rc-theme-win31
|
|
2
|
+
|
|
3
|
+
Windows 3.1 era CSS theme and token bridge for
|
|
4
|
+
[rc-webcomponents](https://github.com/richardcarls/rc-webcomponents).
|
|
5
|
+
|
|
6
|
+
Beveled, square, motionless chrome, as Windows 3.1 looked to applications that
|
|
7
|
+
linked `CTL3D`. Styling only: no component behavior changes.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @rcarls/rc-theme-win31
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```css
|
|
14
|
+
@import '@rcarls/rc-theme-win31/theme.css';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<div class="rc-theme-win31">
|
|
19
|
+
<rc-select>...</rc-select>
|
|
20
|
+
<rc-dialog>...</rc-dialog>
|
|
21
|
+
</div>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Token layers
|
|
25
|
+
|
|
26
|
+
`theme.css` composes three files, in this order:
|
|
27
|
+
|
|
28
|
+
| File | Owns |
|
|
29
|
+
| ---------------- | ----------------------------------------------------------- |
|
|
30
|
+
| `defaults.css` | The `--win31-*` reference tokens: palette, metrics, glyphs |
|
|
31
|
+
| `bridge.css` | The mapping from `--win31-*` onto the public `--rc-*` layer |
|
|
32
|
+
| `components.css` | Per-component chrome, one stylesheet per component |
|
|
33
|
+
|
|
34
|
+
Component stylesheets read the `--win31-*` tokens with no literal fallbacks, so
|
|
35
|
+
a value lives in exactly one place and cannot drift between the token layer and
|
|
36
|
+
thirty-nine component sheets. Import `defaults.css` before any selective import,
|
|
37
|
+
or supply the `--win31-*` set yourself.
|
|
38
|
+
|
|
39
|
+
```css
|
|
40
|
+
@import '@rcarls/rc-theme-win31/defaults.css';
|
|
41
|
+
@import '@rcarls/rc-theme-win31/bridge.css';
|
|
42
|
+
@import '@rcarls/rc-theme-win31/components/button.css';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Scaling
|
|
46
|
+
|
|
47
|
+
Every metric is a multiple of one token, so the whole theme scales without any
|
|
48
|
+
proportion changing. This is the bitmap-interface answer to responsive sizing.
|
|
49
|
+
|
|
50
|
+
```css
|
|
51
|
+
.rc-theme-win31 {
|
|
52
|
+
--win31-unit: 2px;
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## What is deliberate
|
|
57
|
+
|
|
58
|
+
- **Light only.** Windows 3.1 had no dark mode. It had around twenty
|
|
59
|
+
user-selectable whole-system color schemes instead, which is arguably the
|
|
60
|
+
stronger idea and predates `prefers-color-scheme` by three decades. Every
|
|
61
|
+
component stylesheet reads only the `--win31-color-*` tokens, so a scheme is a
|
|
62
|
+
class that overrides those and nothing else. The named period schemes are not
|
|
63
|
+
shipped yet: their values live in the original `CONTROL.INI` and are not
|
|
64
|
+
worth guessing.
|
|
65
|
+
- **No hover states**, except on menus. That is period-correct and it does
|
|
66
|
+
surprise people. Push buttons and list rows are identical at rest and under
|
|
67
|
+
the pointer. The upside is that every affordance is legible without a pointer,
|
|
68
|
+
which is what touch and keyboard users need anyway.
|
|
69
|
+
- **Disabled is a color, not an opacity.** 3.1 had no alpha channel, so it
|
|
70
|
+
embossed disabled text: gray with a one-pixel highlight beneath. WCAG exempts
|
|
71
|
+
inactive controls from the contrast minimum, so the period treatment stands.
|
|
72
|
+
- **Focus and selection are separate marks.** A list can hold a selected row
|
|
73
|
+
that is not the focused row, so the dotted focus rectangle is drawn in
|
|
74
|
+
addition to the inverse-video selection, and turns white inside it.
|
|
75
|
+
- **It disappears under forced colors.** Every bevel is an inset shadow, a
|
|
76
|
+
four-value `border-color`, or a dither image, and High Contrast removes all
|
|
77
|
+
three. The theme yields completely. The result is closer to stock, pre-`CTL3D`
|
|
78
|
+
Windows 3.1 than the beveled default is.
|
|
79
|
+
- **Scrollbar chrome is Chromium and WebKit only.** Firefox exposes only
|
|
80
|
+
`scrollbar-width` and `scrollbar-color`, so it gets a two-color fallback.
|
|
81
|
+
- **`rc-fab` and `rc-fab-menu` are knowing anachronisms.** Windows 3.1 had no
|
|
82
|
+
floating action button and nothing that would have produced one. They are
|
|
83
|
+
drawn as floating tool-palette buttons so a themed page has no unstyled
|
|
84
|
+
holes.
|
|
85
|
+
|
|
86
|
+
## Window chrome
|
|
87
|
+
|
|
88
|
+
`rc-dialog` keeps the native `<dialog>` in consumer light DOM, so the caption
|
|
89
|
+
bar is your markup. The theme styles the shape the component already contracts
|
|
90
|
+
on through `move-handle`:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<rc-dialog movable move-handle="header">
|
|
94
|
+
<dialog aria-labelledby="save-title">
|
|
95
|
+
<header>
|
|
96
|
+
<button aria-label="System menu"></button>
|
|
97
|
+
<h2 id="save-title">Save Changes</h2>
|
|
98
|
+
</header>
|
|
99
|
+
<p>Save changes before closing?</p>
|
|
100
|
+
<footer>
|
|
101
|
+
<button data-rc-win31-default>OK</button>
|
|
102
|
+
<button>Cancel</button>
|
|
103
|
+
</footer>
|
|
104
|
+
</dialog>
|
|
105
|
+
</rc-dialog>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Theme markers
|
|
109
|
+
|
|
110
|
+
Three authored markers are public API for this theme:
|
|
111
|
+
|
|
112
|
+
| Marker | Applies to | Effect |
|
|
113
|
+
| ------------------------ | ------------ | ---------------------------------------------- |
|
|
114
|
+
| `data-rc-win31-default` | `rc-button` | The heavier frame of a dialog's default button |
|
|
115
|
+
| `data-rc-win31-toggle` | `rc-switch` | The sliding variant instead of the checkbox |
|
|
116
|
+
| `data-rc-win31-inactive` | `rc-app-bar` | The muted inactive caption pair |
|
|
117
|
+
|
|
118
|
+
## Fonts
|
|
119
|
+
|
|
120
|
+
MS Sans Serif is a Microsoft bitmap face and is not redistributed here. The
|
|
121
|
+
stack falls back through `Tahoma` and the system sans, so type is
|
|
122
|
+
metric-adjacent rather than pixel-exact.
|
|
123
|
+
|
|
124
|
+
## Notice
|
|
125
|
+
|
|
126
|
+
Not affiliated with or endorsed by Microsoft. Windows is a trademark of
|
|
127
|
+
Microsoft Corporation. No Microsoft fonts, bitmaps, or icons are redistributed;
|
|
128
|
+
every glyph in this package is redrawn as SVG or CSS.
|
|
129
|
+
|
|
130
|
+
## Documentation
|
|
131
|
+
|
|
132
|
+
- [Theme previews](https://richardcarls.github.io/rc-webcomponents/guide/theme-previews)
|
|
133
|
+
- [Styling guide](https://richardcarls.github.io/rc-webcomponents/guide/styling)
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
MIT
|
package/bridge.css
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
@layer rc-theme-win31.defaults, rc-theme-win31.bridge, rc-theme-win31.components;
|
|
2
|
+
|
|
3
|
+
@layer rc-theme-win31.bridge {
|
|
4
|
+
/*
|
|
5
|
+
* Maps the Windows 3.1 reference tokens onto the rc-webcomponents public
|
|
6
|
+
* styling contract. Consumers can replace --win31-* values and keep this file
|
|
7
|
+
* as their bridge.
|
|
8
|
+
*
|
|
9
|
+
* Three decisions run through the whole mapping and are worth knowing before
|
|
10
|
+
* reading it:
|
|
11
|
+
*
|
|
12
|
+
* - Disabled is a color, never an opacity. --rc-disabled-opacity stays at 1
|
|
13
|
+
* and components/modes.css supplies the embossed gray instead.
|
|
14
|
+
* - Motion is zero. Windows 3.1 had no transitions anywhere.
|
|
15
|
+
* - Depth is geometry. --rc-shadow is none; bevels come from the box-shadow
|
|
16
|
+
* and border-color tokens, which forced-colors can delete cleanly.
|
|
17
|
+
*/
|
|
18
|
+
.rc-theme-win31,
|
|
19
|
+
:host(.rc-theme-win31) {
|
|
20
|
+
--rc-surface: var(--win31-color-surface);
|
|
21
|
+
--rc-field: var(--win31-color-field);
|
|
22
|
+
--rc-field-text: var(--win31-color-field-text);
|
|
23
|
+
--rc-field-error-color: var(--win31-color-frame);
|
|
24
|
+
--rc-button-bg: var(--win31-color-surface);
|
|
25
|
+
--rc-button-text: var(--win31-color-frame);
|
|
26
|
+
--rc-highlight: var(--win31-color-selection);
|
|
27
|
+
--rc-highlight-text: var(--win31-color-selection-text);
|
|
28
|
+
--rc-text-disabled: var(--win31-color-disabled-text);
|
|
29
|
+
--rc-accent: var(--win31-color-selection);
|
|
30
|
+
--rc-border-color: var(--win31-color-frame);
|
|
31
|
+
--rc-border-width: var(--win31-hairline);
|
|
32
|
+
--rc-border-style: solid;
|
|
33
|
+
--rc-border: var(--rc-border-width) var(--rc-border-style) var(--rc-border-color);
|
|
34
|
+
--rc-shadow: none;
|
|
35
|
+
|
|
36
|
+
--rc-font-family: var(--win31-font-family);
|
|
37
|
+
--rc-font-size: var(--win31-font-size);
|
|
38
|
+
--rc-font-weight: var(--win31-font-weight);
|
|
39
|
+
--rc-line-height: var(--win31-line-height);
|
|
40
|
+
--rc-icon-font-size: var(--win31-check-size);
|
|
41
|
+
--rc-icon-font-line-height: var(--rc-icon-font-size);
|
|
42
|
+
|
|
43
|
+
--rc-control-block-size: var(--win31-control-height);
|
|
44
|
+
--rc-control-padding-block: var(--win31-padding-block);
|
|
45
|
+
--rc-control-padding-inline: var(--win31-padding-inline);
|
|
46
|
+
--rc-control-gap: var(--win31-gap-tight);
|
|
47
|
+
--rc-item-padding-block: var(--win31-padding-block);
|
|
48
|
+
--rc-item-padding-inline: var(--win31-padding-inline);
|
|
49
|
+
--rc-item-gap: var(--win31-gap-tight);
|
|
50
|
+
|
|
51
|
+
--rc-radius-sm: var(--win31-radius);
|
|
52
|
+
--rc-radius-md: var(--win31-radius);
|
|
53
|
+
--rc-control-radius: var(--win31-radius);
|
|
54
|
+
--rc-thumb-radius: var(--win31-radius);
|
|
55
|
+
|
|
56
|
+
--rc-focus-ring: var(--win31-focus-ring);
|
|
57
|
+
--rc-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
58
|
+
--rc-disabled-opacity: 1;
|
|
59
|
+
/*
|
|
60
|
+
* Period chrome switches state instantly. All thirteen shared motion
|
|
61
|
+
* tokens are declared here at zero, not left to base.css's fallbacks:
|
|
62
|
+
* base.css is optional, and an app that loads it alongside this theme
|
|
63
|
+
* would otherwise inherit base's real 180/300/450ms spatial motion for
|
|
64
|
+
* whichever of these a bridge left unmapped. A step function is the
|
|
65
|
+
* honest curve even though a 0ms duration already makes the curve shape
|
|
66
|
+
* invisible.
|
|
67
|
+
*/
|
|
68
|
+
--rc-motion-effects-duration-fast: 0ms;
|
|
69
|
+
--rc-motion-effects-easing-fast: step-end;
|
|
70
|
+
--rc-motion-effects-duration-default: 0ms;
|
|
71
|
+
--rc-motion-effects-easing-default: step-end;
|
|
72
|
+
--rc-motion-effects-duration-slow: 0ms;
|
|
73
|
+
--rc-motion-effects-easing-slow: step-end;
|
|
74
|
+
--rc-motion-spatial-duration-fast: 0ms;
|
|
75
|
+
--rc-motion-spatial-easing-fast: step-end;
|
|
76
|
+
--rc-motion-spatial-duration-default: 0ms;
|
|
77
|
+
--rc-motion-spatial-easing-default: step-end;
|
|
78
|
+
--rc-motion-spatial-duration-slow: 0ms;
|
|
79
|
+
--rc-motion-spatial-easing-slow: step-end;
|
|
80
|
+
--rc-motion-effects-easing-enter: step-end;
|
|
81
|
+
--rc-motion-effects-easing-exit: step-end;
|
|
82
|
+
--rc-motion-spatial-easing-enter: step-end;
|
|
83
|
+
--rc-motion-spatial-easing-exit: step-end;
|
|
84
|
+
--rc-motion-duration: var(--rc-motion-effects-duration-default);
|
|
85
|
+
|
|
86
|
+
--rc-button-color: var(--rc-button-text);
|
|
87
|
+
--rc-button-block-size: var(--rc-control-block-size);
|
|
88
|
+
--rc-button-radius: var(--win31-radius);
|
|
89
|
+
--rc-button-border: var(--rc-border);
|
|
90
|
+
--rc-button-padding-block: var(--rc-control-padding-block);
|
|
91
|
+
--rc-button-padding-inline: calc(8 * var(--win31-unit));
|
|
92
|
+
--rc-button-gap: var(--rc-control-gap);
|
|
93
|
+
--rc-button-font: var(--rc-font-weight) var(--rc-font-size) / 1 var(--rc-font-family);
|
|
94
|
+
/*
|
|
95
|
+
* Windows 3.1 gave push buttons no hover or focus wash at all. The state
|
|
96
|
+
* layers stay at zero and pressed is drawn as an inverted bevel instead.
|
|
97
|
+
*/
|
|
98
|
+
--rc-button-hover-state-layer-opacity: 0;
|
|
99
|
+
--rc-button-focus-state-layer-opacity: 0;
|
|
100
|
+
--rc-button-pressed-state-layer-opacity: 0;
|
|
101
|
+
|
|
102
|
+
--rc-card-bg: var(--win31-color-surface);
|
|
103
|
+
--rc-card-color: var(--win31-color-frame);
|
|
104
|
+
--rc-card-radius: var(--win31-radius);
|
|
105
|
+
--rc-card-padding-block: var(--win31-gap-tight);
|
|
106
|
+
--rc-card-padding-inline: var(--win31-padding-inline);
|
|
107
|
+
--rc-card-actions-gap: var(--win31-gap);
|
|
108
|
+
--rc-card-subtitle-color: var(--win31-color-frame);
|
|
109
|
+
--rc-card-hover-state-layer-opacity: 0;
|
|
110
|
+
--rc-card-pressed-state-layer-opacity: 0;
|
|
111
|
+
|
|
112
|
+
--rc-chip-block-size: var(--win31-control-height);
|
|
113
|
+
--rc-chip-gap: var(--win31-gap-tight);
|
|
114
|
+
--rc-chip-padding-inline: calc(8 * var(--win31-unit));
|
|
115
|
+
--rc-chip-border: var(--rc-border);
|
|
116
|
+
--rc-chip-radius: var(--win31-radius);
|
|
117
|
+
--rc-chip-bg: var(--win31-color-surface);
|
|
118
|
+
--rc-chip-color: var(--win31-color-frame);
|
|
119
|
+
--rc-chip-font: inherit;
|
|
120
|
+
--rc-chip-text-decoration: none;
|
|
121
|
+
--rc-chip-selected-bg: var(--win31-dither-surface);
|
|
122
|
+
|
|
123
|
+
--rc-switch-native-appearance: none;
|
|
124
|
+
--rc-switch-native-inline-size: 100%;
|
|
125
|
+
--rc-switch-native-block-size: 100%;
|
|
126
|
+
--rc-switch-native-margin: 0;
|
|
127
|
+
--rc-switch-native-opacity: 0;
|
|
128
|
+
--rc-switch-decoration-display: block;
|
|
129
|
+
--rc-switch-icon-display: grid;
|
|
130
|
+
--rc-switch-track-inline-size: calc(36 * var(--win31-unit));
|
|
131
|
+
--rc-switch-track-block-size: var(--win31-control-height);
|
|
132
|
+
--rc-switch-selected-track-bg: var(--win31-color-surface);
|
|
133
|
+
--rc-switch-thumb-translate: calc(16 * var(--win31-unit));
|
|
134
|
+
|
|
135
|
+
--rc-segmented-button-segment-min-block-size: var(--rc-control-block-size);
|
|
136
|
+
--rc-segmented-button-selected-bg: var(--win31-dither-surface);
|
|
137
|
+
|
|
138
|
+
--rc-snackbar-bg: var(--win31-color-surface);
|
|
139
|
+
--rc-snackbar-color: var(--win31-color-frame);
|
|
140
|
+
--rc-snackbar-border: var(--rc-border);
|
|
141
|
+
--rc-snackbar-action-color: var(--win31-color-frame);
|
|
142
|
+
--rc-snackbar-action-border: var(--rc-border);
|
|
143
|
+
--rc-snackbar-action-radius: var(--win31-radius);
|
|
144
|
+
--rc-snackbar-action-padding-block: var(--win31-padding-block);
|
|
145
|
+
--rc-snackbar-action-padding-inline: calc(8 * var(--win31-unit));
|
|
146
|
+
--rc-snackbar-action-bg: var(--win31-color-surface);
|
|
147
|
+
--rc-snackbar-action-font: var(--rc-button-font);
|
|
148
|
+
|
|
149
|
+
--rc-list-item-gap: var(--rc-item-gap);
|
|
150
|
+
--rc-list-item-min-block-size: var(--win31-listbox-row-height);
|
|
151
|
+
--rc-list-item-padding-block: var(--rc-item-padding-block);
|
|
152
|
+
--rc-list-item-padding-inline: var(--rc-item-padding-inline);
|
|
153
|
+
--rc-list-item-selected-bg: var(--win31-color-selection);
|
|
154
|
+
--rc-list-item-selected-color: var(--win31-color-selection-text);
|
|
155
|
+
|
|
156
|
+
/*
|
|
157
|
+
* The scrim is transparent on purpose. Windows 3.1 dimmed nothing behind a
|
|
158
|
+
* modal dialog; the dialog's own frame carried the separation.
|
|
159
|
+
*/
|
|
160
|
+
--rc-dialog-scrim: transparent;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/*
|
|
164
|
+
* Listboxes and menus diverge here, and the divergence is period-correct
|
|
165
|
+
* rather than an oversight: menus highlighted under the pointer, and list
|
|
166
|
+
* rows did not. A list row's resting and hover appearance are the same.
|
|
167
|
+
*/
|
|
168
|
+
.rc-theme-win31 rc-listbox,
|
|
169
|
+
:host(.rc-theme-win31) rc-listbox {
|
|
170
|
+
--rc-listbox-option-gap: var(--win31-gap-tight);
|
|
171
|
+
--rc-listbox-option-min-block-size: var(--win31-listbox-row-height);
|
|
172
|
+
--rc-listbox-option-padding-block: var(--win31-padding-block);
|
|
173
|
+
--rc-listbox-option-padding-inline: var(--win31-padding-inline);
|
|
174
|
+
--rc-listbox-hover-bg: transparent;
|
|
175
|
+
--rc-listbox-hover-color: var(--win31-color-field-text);
|
|
176
|
+
--rc-listbox-active-bg: var(--win31-color-selection);
|
|
177
|
+
--rc-listbox-active-color: var(--win31-color-selection-text);
|
|
178
|
+
--rc-listbox-selected-bg: var(--win31-color-selection);
|
|
179
|
+
--rc-listbox-selected-color: var(--win31-color-selection-text);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.rc-theme-win31 rc-menu,
|
|
183
|
+
:host(.rc-theme-win31) rc-menu {
|
|
184
|
+
--rc-listbox-option-gap: 0;
|
|
185
|
+
--rc-listbox-option-min-block-size: calc(20 * var(--win31-unit));
|
|
186
|
+
--rc-listbox-option-padding-block: 0;
|
|
187
|
+
--rc-listbox-option-padding-inline: var(--win31-padding-inline);
|
|
188
|
+
--rc-listbox-hover-bg: var(--win31-color-selection);
|
|
189
|
+
--rc-listbox-hover-color: var(--win31-color-selection-text);
|
|
190
|
+
--rc-listbox-active-bg: var(--win31-color-selection);
|
|
191
|
+
--rc-listbox-active-color: var(--win31-color-selection-text);
|
|
192
|
+
--rc-listbox-selected-bg: var(--win31-color-selection);
|
|
193
|
+
--rc-listbox-selected-color: var(--win31-color-selection-text);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.rc-theme-win31 rc-select,
|
|
197
|
+
:host(.rc-theme-win31) rc-select,
|
|
198
|
+
.rc-theme-win31 rc-combobox,
|
|
199
|
+
:host(.rc-theme-win31) rc-combobox {
|
|
200
|
+
--rc-select-control-block-size: calc(20 * var(--win31-unit));
|
|
201
|
+
--rc-select-radius: var(--win31-radius);
|
|
202
|
+
--rc-select-shadow: none;
|
|
203
|
+
--rc-select-listbox-radius: var(--win31-radius);
|
|
204
|
+
--rc-select-listbox-border: var(--rc-border);
|
|
205
|
+
--rc-select-chip-radius: var(--win31-radius);
|
|
206
|
+
--rc-combobox-control-block-size: calc(20 * var(--win31-unit));
|
|
207
|
+
--rc-combobox-radius: var(--win31-radius);
|
|
208
|
+
--rc-combobox-shadow: none;
|
|
209
|
+
--rc-combobox-listbox-radius: var(--win31-radius);
|
|
210
|
+
--rc-combobox-listbox-border: var(--rc-border);
|
|
211
|
+
--rc-combobox-chip-radius: var(--win31-radius);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.rc-theme-win31 rc-slider,
|
|
215
|
+
:host(.rc-theme-win31) rc-slider,
|
|
216
|
+
.rc-theme-win31 rc-range-slider,
|
|
217
|
+
:host(.rc-theme-win31) rc-range-slider {
|
|
218
|
+
--rc-slider-track-size: calc(4 * var(--win31-unit));
|
|
219
|
+
--rc-slider-track-background: var(--win31-color-field);
|
|
220
|
+
--rc-slider-progress-background: var(--win31-color-selection);
|
|
221
|
+
--rc-slider-track-radius: var(--win31-radius);
|
|
222
|
+
--rc-range-slider-accent: var(--win31-color-selection);
|
|
223
|
+
--rc-range-slider-track-background: var(--win31-color-field);
|
|
224
|
+
--rc-range-slider-thumb-background: var(--win31-color-surface);
|
|
225
|
+
--rc-range-slider-thumb-border: var(--win31-color-frame);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.rc-theme-win31 rc-progress,
|
|
229
|
+
:host(.rc-theme-win31) rc-progress {
|
|
230
|
+
--rc-progress-track-background: var(--win31-color-field);
|
|
231
|
+
--rc-progress-track-opacity: 1;
|
|
232
|
+
--rc-progress-track-radius: var(--win31-radius);
|
|
233
|
+
--rc-progress-fill-background: var(--win31-color-selection);
|
|
234
|
+
--rc-progress-value-color: var(--win31-color-frame);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.rc-theme-win31 rc-bottom-sheet,
|
|
238
|
+
:host(.rc-theme-win31) rc-bottom-sheet {
|
|
239
|
+
--rc-bottom-sheet-bg: var(--win31-color-surface);
|
|
240
|
+
--rc-bottom-sheet-color: var(--win31-color-frame);
|
|
241
|
+
--rc-bottom-sheet-radius: var(--win31-radius);
|
|
242
|
+
--rc-bottom-sheet-shadow: none;
|
|
243
|
+
--rc-bottom-sheet-scrim: transparent;
|
|
244
|
+
--rc-bottom-sheet-handle-color: var(--win31-color-shadow);
|
|
245
|
+
--rc-bottom-sheet-handle-radius: var(--win31-radius);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -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,35 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-adaptive-menu {
|
|
3
|
+
--rc-adaptive-menu-gap: var(--win31-gap-tight);
|
|
4
|
+
--rc-adaptive-menu-item-gap: var(--win31-gap-tight);
|
|
5
|
+
--rc-adaptive-menu-item-min-block-size: var(--win31-control-height);
|
|
6
|
+
--rc-adaptive-menu-item-padding-block: var(--win31-padding-block);
|
|
7
|
+
--rc-adaptive-menu-item-padding-inline: calc(8 * var(--win31-unit));
|
|
8
|
+
--rc-adaptive-menu-icon-size: var(--win31-check-size);
|
|
9
|
+
--rc-adaptive-menu-trigger-background: var(--win31-color-surface);
|
|
10
|
+
--rc-adaptive-menu-trigger-color: var(--win31-color-frame);
|
|
11
|
+
--rc-adaptive-menu-trigger-border: var(--win31-border);
|
|
12
|
+
--rc-adaptive-menu-trigger-radius: var(--win31-radius);
|
|
13
|
+
--rc-adaptive-menu-trigger-block-size: var(--win31-control-height);
|
|
14
|
+
--rc-adaptive-menu-trigger-inline-size: var(--win31-control-height);
|
|
15
|
+
--rc-adaptive-menu-trigger-padding: 0;
|
|
16
|
+
--rc-adaptive-menu-popup-background: var(--win31-color-menu);
|
|
17
|
+
--rc-adaptive-menu-popup-color: var(--win31-color-menu-text);
|
|
18
|
+
--rc-adaptive-menu-popup-border: var(--win31-border);
|
|
19
|
+
--rc-adaptive-menu-popup-radius: var(--win31-radius);
|
|
20
|
+
--rc-adaptive-menu-popup-shadow: var(--win31-drop-shadow);
|
|
21
|
+
--rc-adaptive-menu-popup-padding-block: var(--win31-unit);
|
|
22
|
+
--rc-adaptive-menu-popup-min-inline-size: calc(142 * var(--win31-unit));
|
|
23
|
+
font-family: var(--win31-font-family);
|
|
24
|
+
font-size: var(--win31-font-size);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-adaptive-menu::part(overflow-trigger) {
|
|
28
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
29
|
+
cursor: default;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-adaptive-menu::part(overflow-trigger):active {
|
|
33
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -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
|
+
}
|