@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.
Files changed (60) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/DESIGN.md +195 -0
  3. package/README.md +157 -5
  4. package/bridge.css +257 -0
  5. package/components/accordion.css +21 -0
  6. package/components/adaptive-menu.css +108 -0
  7. package/components/app-bar.css +66 -0
  8. package/components/bottom-sheet.css +41 -0
  9. package/components/button.css +74 -0
  10. package/components/card.css +50 -0
  11. package/components/carousel.css +59 -0
  12. package/components/chip-group.css +33 -0
  13. package/components/chip.css +56 -0
  14. package/components/combobox.css +83 -0
  15. package/components/dialog.css +156 -0
  16. package/components/disclosure.css +106 -0
  17. package/components/fab-menu.css +47 -0
  18. package/components/fab.css +49 -0
  19. package/components/field.css +73 -0
  20. package/components/icons.css +56 -0
  21. package/components/list-item.css +90 -0
  22. package/components/listbox.css +39 -0
  23. package/components/markdown-editor.css +80 -0
  24. package/components/menu-button.css +39 -0
  25. package/components/menu.css +64 -0
  26. package/components/menubar.css +67 -0
  27. package/components/modes.css +58 -0
  28. package/components/navigation-bar.css +52 -0
  29. package/components/navigation-rail.css +57 -0
  30. package/components/popover.css +13 -0
  31. package/components/progress.css +47 -0
  32. package/components/range-slider.css +41 -0
  33. package/components/scroller.css +91 -0
  34. package/components/search-bar.css +65 -0
  35. package/components/segmented-button.css +64 -0
  36. package/components/select.css +73 -0
  37. package/components/slider.css +64 -0
  38. package/components/snackbar.css +50 -0
  39. package/components/splitter.css +42 -0
  40. package/components/switch.css +75 -0
  41. package/components/textarea.css +42 -0
  42. package/components/toolbar.css +68 -0
  43. package/components/tooltip.css +23 -0
  44. package/components/transfer-list.css +74 -0
  45. package/components/virtual-canvas.css +45 -0
  46. package/components/virtual-scroller.css +7 -0
  47. package/components.css +45 -0
  48. package/css-components/button.css +99 -0
  49. package/css-components/card.css +14 -0
  50. package/css-components/chip-group.css +9 -0
  51. package/css-components/chip.css +109 -0
  52. package/css-components/disclosure.css +34 -0
  53. package/css-components/list.css +34 -0
  54. package/css-components/select.css +19 -0
  55. package/css-components/textarea.css +22 -0
  56. package/css-components.css +31 -0
  57. package/defaults.css +169 -0
  58. package/native.css +271 -0
  59. package/package.json +51 -7
  60. package/theme.css +3 -0
@@ -0,0 +1,91 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * Scrollbars.
4
+ *
5
+ * Windows 3.1 had exactly one scrollbar design and applied it system-wide,
6
+ * so this styles every scrollable descendant inside the theme scope rather
7
+ * than only rc-scroller. A 16-pixel gutter, beveled arrow buttons at each
8
+ * end, a beveled thumb, and a one-bit dithered track between them.
9
+ *
10
+ * The detailed treatment is Chromium and WebKit only: Firefox exposes just
11
+ * scrollbar-width and scrollbar-color, so it gets the two-color fallback set
12
+ * on the standard properties below. That is a real portability limit, not an
13
+ * oversight, and the theme's tests assert the fallback rather than the
14
+ * pseudo-elements.
15
+ */
16
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
17
+ scrollbar-width: auto;
18
+ scrollbar-color: var(--win31-color-surface) var(--win31-color-shadow);
19
+ }
20
+
21
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-scroller {
22
+ --rc-scroller-scrollbar-width: auto;
23
+ --rc-scroller-scrollbar-color: var(--win31-color-surface) var(--win31-color-shadow);
24
+ --rc-scroller-content-row-gap: var(--win31-gap-tight);
25
+ --rc-scroller-content-padding-inline: 0;
26
+ }
27
+
28
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar,
29
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-scroller::part(content)::-webkit-scrollbar {
30
+ inline-size: var(--win31-scrollbar-size);
31
+ block-size: var(--win31-scrollbar-size);
32
+ background: none;
33
+ }
34
+
35
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-thumb,
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button,
37
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
38
+ rc-scroller::part(content)::-webkit-scrollbar-thumb,
39
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
40
+ rc-scroller::part(content)::-webkit-scrollbar-button {
41
+ inline-size: var(--win31-scrollbar-size);
42
+ block-size: var(--win31-scrollbar-size);
43
+ background: var(--win31-color-surface);
44
+ border: var(--win31-hairline) solid;
45
+ border-color: var(--win31-color-surface) var(--win31-color-frame) var(--win31-color-frame)
46
+ var(--win31-color-surface);
47
+ box-shadow: var(--win31-bevel-outset-1);
48
+ }
49
+
50
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button:vertical:decrement {
51
+ background-image: var(--win31-glyph-arrow-up);
52
+ background-position: center;
53
+ background-repeat: no-repeat;
54
+ }
55
+
56
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button:vertical:increment {
57
+ background-image: var(--win31-glyph-arrow-down);
58
+ background-position: center;
59
+ background-repeat: no-repeat;
60
+ }
61
+
62
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button:horizontal:decrement {
63
+ background-image: var(--win31-glyph-arrow-left);
64
+ background-position: center;
65
+ background-repeat: no-repeat;
66
+ }
67
+
68
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button:horizontal:increment {
69
+ background-image: var(--win31-glyph-arrow-right);
70
+ background-position: center;
71
+ background-repeat: no-repeat;
72
+ }
73
+
74
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-button:active,
75
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-thumb:active {
76
+ box-shadow: var(--win31-bevel-inset-1);
77
+ }
78
+
79
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-track,
80
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
81
+ rc-scroller::part(content)::-webkit-scrollbar-track {
82
+ background-image: var(--win31-dither-track);
83
+ background-repeat: repeat;
84
+ background-size: var(--win31-dither-size);
85
+ image-rendering: pixelated;
86
+ }
87
+
88
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::-webkit-scrollbar-corner {
89
+ background: var(--win31-color-surface);
90
+ }
91
+ }
@@ -0,0 +1,65 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * There was no search bar in 3.1. The nearest real control is the Find
4
+ * dialog's edit field beside its Find Next button, so that is what this
5
+ * renders: a sunken well with beveled affordances at its edges.
6
+ */
7
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar::part(root) {
8
+ min-block-size: var(--win31-control-height);
9
+ padding-block: 0;
10
+ padding-inline: var(--win31-gap-tight);
11
+ color: var(--win31-color-field-text);
12
+ background: var(--win31-color-field);
13
+ border: var(--win31-hairline) solid;
14
+ border-color: var(--win31-inset-border-color);
15
+ border-radius: var(--win31-radius);
16
+ box-shadow: none;
17
+ font-family: var(--win31-font-family);
18
+ font-size: var(--win31-font-size);
19
+ transition: none;
20
+ }
21
+
22
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar:focus-within::part(root) {
23
+ outline: var(--win31-focus-ring);
24
+ outline-offset: var(--win31-focus-ring-offset);
25
+ }
26
+
27
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar > input {
28
+ color: var(--win31-color-field-text);
29
+ background: transparent;
30
+ border: 0;
31
+ font-family: var(--win31-font-family);
32
+ font-size: var(--win31-font-size);
33
+ }
34
+
35
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar > input:focus-visible {
36
+ outline: none;
37
+ }
38
+
39
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar::part(clear) {
40
+ min-block-size: calc(18 * var(--win31-unit));
41
+ min-inline-size: calc(18 * var(--win31-unit));
42
+ background: var(--win31-color-surface);
43
+ border: 0;
44
+ border-radius: var(--win31-radius);
45
+ box-shadow: var(--win31-bevel-outset-1);
46
+ }
47
+
48
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar::part(clear):active {
49
+ box-shadow: var(--win31-bevel-inset-1);
50
+ }
51
+
52
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar::part(suggestions) {
53
+ color: var(--win31-color-field-text);
54
+ background: var(--win31-color-field);
55
+ border: var(--win31-border);
56
+ border-radius: var(--win31-radius);
57
+ box-shadow: none;
58
+ }
59
+
60
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-search-bar::part(suggestion) {
61
+ min-block-size: var(--win31-listbox-row-height);
62
+ border-radius: var(--win31-radius);
63
+ transition: none;
64
+ }
65
+ }
@@ -0,0 +1,64 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * The 3.1 analogue is a run of latched toolbar toggles sharing an edge. The
4
+ * selected segment stays pressed: inverted bevel plus a dithered face.
5
+ *
6
+ * One property turns on the component's own segmented recipe; without it the
7
+ * fieldset and radios keep their browser appearance.
8
+ */
9
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-segmented-button {
10
+ /* One switch turns on the component-owned segmented recipe. */
11
+ --rc-segmented-button-appearance: segmented;
12
+ /* Windows 3.1 never showed a text cursor over a control. */
13
+ --rc-segmented-button-cursor: default;
14
+ --rc-segmented-button-disabled-cursor: default;
15
+ /* A latched 3.1 toggle showed state by staying pressed, not by a tick. */
16
+ --rc-segmented-button-selected-icon-display: none;
17
+
18
+ --rc-segmented-button-bg: var(--win31-color-surface);
19
+ --rc-segmented-button-color: var(--win31-color-frame);
20
+ --rc-segmented-button-border: var(--win31-border);
21
+ --rc-segmented-button-radius: var(--win31-radius);
22
+ --rc-segmented-button-divider: 0;
23
+ --rc-segmented-button-segment-gap: var(--win31-gap-tight);
24
+ --rc-segmented-button-segment-min-block-size: var(--win31-control-height);
25
+ --rc-segmented-button-segment-padding-block: var(--win31-padding-block);
26
+ --rc-segmented-button-segment-padding-inline: calc(8 * var(--win31-unit));
27
+ --rc-segmented-button-selected-bg: var(--win31-dither-surface);
28
+ --rc-segmented-button-selected-color: var(--win31-color-frame);
29
+ --rc-segmented-button-selected-icon-size: var(--win31-check-size);
30
+ --rc-segmented-button-disabled-opacity: 1;
31
+ --rc-segmented-button-focus-ring: var(--win31-focus-ring);
32
+ --rc-segmented-button-focus-ring-offset: var(--win31-focus-ring-offset);
33
+ font-family: var(--win31-font-family);
34
+ font-size: var(--win31-font-size);
35
+ }
36
+
37
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-segmented-button > fieldset > label {
38
+ box-shadow: var(--win31-bevel-outset-1);
39
+ transition: none;
40
+ }
41
+
42
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
43
+ rc-segmented-button
44
+ > fieldset
45
+ > label:has(input[type='radio']:checked) {
46
+ box-shadow: var(--win31-bevel-inset-1);
47
+ }
48
+
49
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
50
+ rc-segmented-button
51
+ > fieldset
52
+ > label:active:not(:has(input[type='radio']:disabled)) {
53
+ box-shadow: var(--win31-bevel-inset-1);
54
+ }
55
+
56
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
57
+ rc-segmented-button
58
+ > fieldset
59
+ > label:has(input[type='radio']:disabled),
60
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-segmented-button[disabled] > fieldset > label {
61
+ color: var(--win31-color-disabled-text);
62
+ text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
63
+ }
64
+ }
@@ -0,0 +1,73 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select {
3
+ display: block;
4
+ min-inline-size: 0;
5
+ --rc-select-padding-block: var(--win31-padding-block);
6
+ --rc-select-padding-inline: var(--win31-padding-inline);
7
+ --rc-select-gap: var(--win31-gap-tight);
8
+ --rc-select-listbox-padding-block: 0;
9
+ --rc-select-toggle-indicator-size: var(--win31-scrollbar-size);
10
+ }
11
+
12
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(anchor) {
13
+ min-inline-size: 0;
14
+ }
15
+
16
+ /*
17
+ * A drop-down list is a sunken white field with a beveled arrow button
18
+ * attached to its trailing edge, sized to match a scrollbar button.
19
+ */
20
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(trigger) {
21
+ position: relative;
22
+ min-block-size: calc(20 * var(--win31-unit));
23
+ padding-inline: var(--win31-padding-inline) calc(18 * var(--win31-unit));
24
+ color: var(--win31-color-field-text);
25
+ background: var(--win31-color-field);
26
+ border: var(--win31-hairline) solid;
27
+ border-color: var(--win31-inset-border-color);
28
+ border-radius: var(--win31-radius);
29
+ box-shadow: none;
30
+ font-family: var(--win31-font-family);
31
+ font-size: var(--win31-font-size);
32
+ cursor: default;
33
+ transition: none;
34
+ }
35
+
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(trigger):focus-visible {
37
+ outline: var(--win31-focus-ring);
38
+ outline-offset: var(--win31-focus-ring-offset);
39
+ }
40
+
41
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(toggle-indicator) {
42
+ position: absolute;
43
+ inset-block-start: var(--win31-unit);
44
+ inset-inline-end: var(--win31-unit);
45
+ display: block;
46
+ inline-size: var(--win31-scrollbar-size);
47
+ block-size: calc(100% - (2 * var(--win31-unit)));
48
+ background-color: var(--win31-color-surface);
49
+ background-image: var(--win31-glyph-arrow-down);
50
+ background-position: center;
51
+ background-repeat: no-repeat;
52
+ border: 0;
53
+ box-shadow: var(--win31-bevel-outset-1);
54
+ color: transparent;
55
+ font-size: 0;
56
+ }
57
+
58
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(listbox) {
59
+ color: var(--win31-color-field-text);
60
+ background: var(--win31-color-field);
61
+ border: var(--win31-border);
62
+ border-radius: var(--win31-radius);
63
+ box-shadow: none;
64
+ font-family: var(--win31-font-family);
65
+ font-size: var(--win31-font-size);
66
+ }
67
+
68
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-select::part(chip) {
69
+ border: var(--win31-border);
70
+ border-radius: var(--win31-radius);
71
+ box-shadow: var(--win31-bevel-outset-1);
72
+ }
73
+ }
@@ -0,0 +1,64 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * The trackbar arrived with Windows 95, so there is no 3.1 original to copy.
4
+ * The construction here is assembled from parts that did exist: a sunken
5
+ * channel and a beveled thumb, which is how 3.1 applications drew their own
6
+ * slider-shaped controls before the common control shipped.
7
+ */
8
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-slider {
9
+ --rc-slider-track-size: calc(4 * var(--win31-unit));
10
+ --rc-slider-track-background: var(--win31-color-field);
11
+ --rc-slider-track-radius: var(--win31-radius);
12
+ --rc-slider-track-opacity: 1;
13
+ --rc-slider-progress-background: var(--win31-color-selection);
14
+ --rc-slider-value-color: var(--win31-color-frame);
15
+ --rc-slider-control-size: var(--win31-control-height);
16
+ --rc-slider-gap: var(--win31-gap);
17
+ --rc-thumb-radius: var(--win31-radius);
18
+ font-family: var(--win31-font-family);
19
+ font-size: var(--win31-font-size);
20
+ }
21
+
22
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-slider::part(track) {
23
+ border: var(--win31-hairline) solid;
24
+ border-color: var(--win31-inset-border-color);
25
+ border-radius: var(--win31-radius);
26
+ }
27
+
28
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-slider::part(progress) {
29
+ border-radius: var(--win31-radius);
30
+ transition: none;
31
+ }
32
+
33
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-slider::part(value-display) {
34
+ color: var(--win31-color-frame);
35
+ font-size: var(--win31-font-size);
36
+ }
37
+
38
+ /*
39
+ * The native thumb stays consumer-owned, as the component intends, but the
40
+ * beveled face is the whole point of the look so it is supplied here for the
41
+ * slotted input.
42
+ */
43
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
44
+ rc-slider
45
+ > input[type='range']::-webkit-slider-thumb {
46
+ inline-size: calc(11 * var(--win31-unit));
47
+ block-size: var(--win31-control-height);
48
+ background: var(--win31-color-surface);
49
+ border: var(--win31-border);
50
+ border-radius: var(--win31-radius);
51
+ box-shadow: var(--win31-bevel-outset-1);
52
+ appearance: none;
53
+ }
54
+
55
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
56
+ rc-slider
57
+ > input[type='range']::-moz-range-thumb {
58
+ inline-size: calc(11 * var(--win31-unit));
59
+ block-size: var(--win31-control-height);
60
+ background: var(--win31-color-surface);
61
+ border: var(--win31-border);
62
+ border-radius: var(--win31-radius);
63
+ }
64
+ }
@@ -0,0 +1,50 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * A deliberate deviation, stated rather than hidden.
4
+ *
5
+ * 3.1 had no transient toast. Its equivalent channel was the status bar: a
6
+ * sunken strip along the bottom edge that reported what just happened and
7
+ * what the focused command would do. This renders the snackbar as that
8
+ * strip rather than as a floating card, so it reads as part of the window
9
+ * instead of hovering above it.
10
+ */
11
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-snackbar {
12
+ --rc-snackbar-bg: var(--win31-color-surface);
13
+ --rc-snackbar-color: var(--win31-color-frame);
14
+ --rc-snackbar-border: var(--win31-hairline) solid;
15
+ --rc-snackbar-radius: var(--win31-radius);
16
+ --rc-snackbar-shadow: none;
17
+ --rc-snackbar-gap: var(--win31-gap);
18
+ --rc-snackbar-min-block-size: var(--win31-control-height);
19
+ --rc-snackbar-padding-block: var(--win31-padding-block);
20
+ --rc-snackbar-padding-inline: var(--win31-padding-inline);
21
+ --rc-snackbar-inset-block-end: 0;
22
+ --rc-snackbar-inset-inline: 0;
23
+ --rc-snackbar-max-inline-size: none;
24
+ --rc-snackbar-action-bg: var(--win31-color-surface);
25
+ --rc-snackbar-action-color: var(--win31-color-frame);
26
+ --rc-snackbar-action-border: var(--win31-border);
27
+ --rc-snackbar-action-radius: var(--win31-radius);
28
+ --rc-snackbar-action-padding-block: var(--win31-padding-block);
29
+ --rc-snackbar-action-padding-inline: calc(8 * var(--win31-unit));
30
+ --rc-snackbar-action-font: var(--rc-button-font);
31
+ --rc-snackbar-focus-ring: var(--win31-focus-ring);
32
+ --rc-snackbar-focus-ring-offset: var(--win31-focus-ring-offset);
33
+ }
34
+
35
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-snackbar::part(surface) {
36
+ border-color: var(--win31-inset-border-color);
37
+ box-shadow: none;
38
+ font-family: var(--win31-font-family);
39
+ font-size: var(--win31-font-size);
40
+ }
41
+
42
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-snackbar::part(action) {
43
+ box-shadow: var(--win31-bevel-outset-1);
44
+ cursor: default;
45
+ }
46
+
47
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-snackbar::part(action):active {
48
+ box-shadow: var(--win31-bevel-inset-1);
49
+ }
50
+ }
@@ -0,0 +1,42 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * The split bar between panes in File Manager and the MDI shells: a surface
4
+ * strip carrying one highlight edge and one shadow edge, with no grab dots.
5
+ */
6
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-splitter {
7
+ --rc-splitter-separator-size: calc(5 * var(--win31-unit));
8
+ --rc-splitter-separator-color: var(--win31-color-surface);
9
+ --rc-splitter-separator-border-inline-start: var(--win31-hairline) solid
10
+ var(--win31-color-highlight);
11
+ --rc-splitter-separator-border-inline-end: var(--win31-hairline) solid var(--win31-color-shadow);
12
+ --rc-splitter-separator-border-block-start: var(--win31-hairline) solid
13
+ var(--win31-color-highlight);
14
+ --rc-splitter-separator-border-block-end: var(--win31-hairline) solid var(--win31-color-shadow);
15
+ --rc-splitter-separator-handle-size: 100%;
16
+ --rc-splitter-handle-color: transparent;
17
+ --rc-splitter-handle-fill: transparent;
18
+ --rc-splitter-handle-hover-fill: transparent;
19
+ --rc-splitter-handle-border-radius: var(--win31-radius);
20
+ --rc-splitter-handle-transition: none;
21
+ --rc-splitter-snap-duration: 0ms;
22
+ --rc-splitter-keyline: var(--win31-hairline) solid var(--win31-color-shadow);
23
+ --rc-splitter-collapse-button-bg: var(--win31-color-surface);
24
+ --rc-splitter-collapse-button-color: var(--win31-color-frame);
25
+ --rc-splitter-collapse-button-border: var(--win31-border);
26
+ --rc-splitter-collapse-button-hover-bg: var(--win31-color-surface);
27
+ --rc-splitter-collapse-button-size: var(--win31-scrollbar-size);
28
+ }
29
+
30
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-splitter::part(separator-handle) {
31
+ border-radius: var(--win31-radius);
32
+ }
33
+
34
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-splitter::part(collapse-button) {
35
+ border-radius: var(--win31-radius);
36
+ box-shadow: var(--win31-bevel-outset-1);
37
+ }
38
+
39
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-splitter::part(collapse-button):active {
40
+ box-shadow: var(--win31-bevel-inset-1);
41
+ }
42
+ }
@@ -0,0 +1,75 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * Windows 3.1 had no switch. Its two-state control was the checkbox: a 13 by
4
+ * 13 sunken white box that draws a check when set. That is the default here,
5
+ * because it is the honest mapping and it keeps the native input's own
6
+ * semantics intact.
7
+ *
8
+ * Consumers who want a sliding control can opt into the beveled two-position
9
+ * variant with the documented data-rc-win31-toggle marker below.
10
+ */
11
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch {
12
+ --rc-switch-track-inline-size: var(--win31-check-size);
13
+ --rc-switch-track-block-size: var(--win31-check-size);
14
+ --rc-switch-thumb-translate: 0;
15
+ }
16
+
17
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch::part(track) {
18
+ inline-size: var(--win31-check-size);
19
+ block-size: var(--win31-check-size);
20
+ background: var(--win31-color-field);
21
+ border: var(--win31-hairline) solid;
22
+ border-color: var(--win31-inset-border-color);
23
+ border-radius: var(--win31-radius);
24
+ box-shadow: none;
25
+ transition: none;
26
+ }
27
+
28
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch::part(thumb) {
29
+ inline-size: var(--win31-check-size);
30
+ block-size: var(--win31-check-size);
31
+ background-color: transparent;
32
+ background-image: none;
33
+ border: 0;
34
+ border-radius: var(--win31-radius);
35
+ box-shadow: none;
36
+ translate: none;
37
+ transition: none;
38
+ }
39
+
40
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch[checked]::part(thumb) {
41
+ background-image: var(--win31-glyph-check);
42
+ background-position: center;
43
+ background-repeat: no-repeat;
44
+ }
45
+
46
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch::part(selected-icon),
47
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch::part(deselected-icon) {
48
+ display: none;
49
+ }
50
+
51
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch:focus-within::part(track) {
52
+ outline: var(--win31-focus-ring);
53
+ outline-offset: var(--win31-unit);
54
+ }
55
+
56
+ /* Opt-in sliding variant: a beveled thumb travelling in a sunken channel. */
57
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch[data-rc-win31-toggle] {
58
+ --rc-switch-track-inline-size: calc(36 * var(--win31-unit));
59
+ --rc-switch-track-block-size: var(--win31-control-height);
60
+ --rc-switch-thumb-translate: calc(16 * var(--win31-unit));
61
+ }
62
+
63
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch[data-rc-win31-toggle]::part(track) {
64
+ inline-size: calc(36 * var(--win31-unit));
65
+ block-size: var(--win31-control-height);
66
+ }
67
+
68
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-switch[data-rc-win31-toggle]::part(thumb) {
69
+ inline-size: calc(18 * var(--win31-unit));
70
+ block-size: calc(100% - (2 * var(--win31-unit)));
71
+ background-color: var(--win31-color-surface);
72
+ background-image: none;
73
+ box-shadow: var(--win31-bevel-outset-1);
74
+ }
75
+ }
@@ -0,0 +1,42 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea::part(root) {
3
+ color: var(--win31-color-field-text);
4
+ background: var(--win31-color-field);
5
+ border: var(--win31-hairline) solid;
6
+ border-color: var(--win31-inset-border-color);
7
+ border-radius: var(--win31-radius);
8
+ box-shadow: none;
9
+ font-family: var(--win31-font-family);
10
+ font-size: var(--win31-font-size);
11
+ }
12
+
13
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea::part(editor),
14
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea::part(editor-area) {
15
+ padding: var(--win31-gap-tight);
16
+ line-height: var(--win31-line-height);
17
+ }
18
+
19
+ /*
20
+ * The gutter reads as a separate sunken strip, the way a 3.1 editor split
21
+ * line numbers from text.
22
+ */
23
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea::part(gutter) {
24
+ color: var(--win31-color-shadow);
25
+ background: var(--win31-color-surface);
26
+ border-inline-end: var(--win31-hairline) solid var(--win31-color-shadow);
27
+ }
28
+
29
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea > textarea {
30
+ color: var(--win31-color-field-text);
31
+ background: transparent;
32
+ border: 0;
33
+ border-radius: var(--win31-radius);
34
+ font-family: var(--win31-font-family);
35
+ font-size: var(--win31-font-size);
36
+ }
37
+
38
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-textarea:focus-within::part(root) {
39
+ outline: var(--win31-focus-ring);
40
+ outline-offset: var(--win31-focus-ring-offset);
41
+ }
42
+ }
@@ -0,0 +1,68 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar {
3
+ --rc-toolbar-gap-inline: calc(3 * var(--win31-unit));
4
+ --rc-toolbar-padding-inline: calc(3 * var(--win31-unit));
5
+ --rc-toolbar-padding-block: var(--win31-gap-tight);
6
+ --rc-toolbar-radius: var(--win31-radius);
7
+ --rc-toolbar-vertical-radius: var(--win31-radius);
8
+ }
9
+
10
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar::part(root) {
11
+ min-block-size: var(--win31-toolbar-height);
12
+ color: var(--win31-color-frame);
13
+ background: var(--win31-color-surface);
14
+ border-block-end: var(--win31-border);
15
+ font-family: var(--win31-font-family);
16
+ font-size: var(--win31-font-size);
17
+ }
18
+
19
+ /* Toolbar buttons are square icon wells at the 3.1 toolbar size. */
20
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar button {
21
+ display: block;
22
+ inline-size: var(--win31-toolbar-button-size);
23
+ block-size: var(--win31-toolbar-button-size);
24
+ min-inline-size: var(--win31-toolbar-button-size);
25
+ min-block-size: var(--win31-toolbar-button-size);
26
+ padding: 0;
27
+ color: var(--win31-color-frame);
28
+ background-color: var(--win31-color-surface);
29
+ border: var(--win31-border);
30
+ border-radius: var(--win31-radius);
31
+ box-shadow: var(--win31-bevel-outset-1);
32
+ cursor: default;
33
+ transition: none;
34
+ }
35
+
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar button:active:not(:disabled) {
37
+ box-shadow: var(--win31-bevel-inset-1);
38
+ }
39
+
40
+ /*
41
+ * A latched toolbar button stays pressed and takes the dithered face, which
42
+ * is how 3.1 showed a mode that is currently on.
43
+ */
44
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
45
+ rc-toolbar
46
+ :is([data-active], [aria-pressed='true']) {
47
+ background-image: var(--win31-dither-track);
48
+ background-size: var(--win31-dither-size);
49
+ box-shadow: var(--win31-bevel-inset-1);
50
+ }
51
+
52
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar button:disabled {
53
+ color: var(--win31-color-disabled-text);
54
+ text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
55
+ }
56
+
57
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar hr,
58
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-toolbar [role='separator'] {
59
+ inline-size: calc(2 * var(--win31-unit));
60
+ margin-inline: var(--win31-gap-tight);
61
+ background: linear-gradient(
62
+ to right,
63
+ var(--win31-color-shadow) 0 var(--win31-unit),
64
+ var(--win31-color-highlight) var(--win31-unit) 100%
65
+ );
66
+ border: 0;
67
+ }
68
+ }
@@ -0,0 +1,23 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * A deliberate deviation, stated rather than hidden.
4
+ *
5
+ * 3.1 had no tooltips; they arrived with later toolbars. Its nearest
6
+ * equivalent is the WinHelp definition popup: a plain window-colored box
7
+ * with a hard one-pixel frame and a hard drop shadow, opened to explain a
8
+ * term. Tooltips borrow that look rather than the yellow balloon of later
9
+ * releases. Tokens are declared on the theme root so tooltips inside other
10
+ * shadow roots inherit them.
11
+ */
12
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
13
+ --rc-tooltip-padding-block: calc(2 * var(--win31-unit));
14
+ --rc-tooltip-padding-inline: var(--win31-padding-inline);
15
+ --rc-tooltip-border: var(--win31-border);
16
+ --rc-tooltip-radius: var(--win31-radius);
17
+ --rc-tooltip-background: var(--win31-color-field);
18
+ --rc-tooltip-color: var(--win31-color-field-text);
19
+ --rc-tooltip-shadow: var(--win31-drop-shadow);
20
+ --rc-tooltip-font: var(--win31-font-weight) var(--win31-font-size) / var(--win31-line-height)
21
+ var(--win31-font-family);
22
+ }
23
+ }