@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,90 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
3
+ --rc-list-item-gap: var(--win31-gap-tight);
4
+ --rc-list-item-min-block-size: var(--win31-listbox-row-height);
5
+ --rc-list-item-padding-block: var(--win31-padding-block);
6
+ --rc-list-item-padding-inline: var(--win31-padding-inline);
7
+ /*
8
+ * No hover wash. Windows 3.1 highlighted menu items under the pointer and
9
+ * left list rows alone, so a row's resting and hovered appearance match.
10
+ */
11
+ --rc-list-item-hover-bg: transparent;
12
+ --rc-list-item-active-bg: var(--win31-color-selection);
13
+ --rc-list-item-selected-bg: var(--win31-color-selection);
14
+ --rc-list-item-selected-color: var(--win31-color-selection-text);
15
+ --rc-list-item-disabled-opacity: 1;
16
+ }
17
+
18
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list {
19
+ --rc-list-padding-inline: 0;
20
+ --rc-list-leading-gap: var(--win31-gap);
21
+ --rc-list-trailing-gap: var(--win31-gap);
22
+ --rc-list-row-gap: 0;
23
+ --rc-list-item-min-block-size: var(--win31-listbox-row-height);
24
+ --rc-list-item-padding-block: var(--win31-padding-block);
25
+ --rc-list-item-color: var(--win31-color-field-text);
26
+ --rc-list-item-background: transparent;
27
+ --rc-list-item-selected-color: var(--win31-color-selection-text);
28
+ --rc-list-item-selected-background: var(--win31-color-selection);
29
+ --rc-list-item-divider: 0;
30
+ --rc-list-item-hover-state-layer-opacity: 0;
31
+ --rc-list-item-focus-state-layer-opacity: 0;
32
+ --rc-list-item-pressed-state-layer-opacity: 0;
33
+ --rc-list-item-disabled-opacity: 1;
34
+ --rc-list-item-transition-duration: 0ms;
35
+ color: var(--win31-color-field-text);
36
+ background: var(--win31-color-field);
37
+ font-family: var(--win31-font-family);
38
+ font-size: var(--win31-font-size);
39
+ }
40
+
41
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list[variant='segmented'] {
42
+ --rc-list-row-gap: var(--win31-gap-tight);
43
+ --rc-list-item-background: var(--win31-color-surface);
44
+ --rc-list-item-border: var(--win31-hairline) solid;
45
+ --rc-list-item-border-radius: var(--win31-radius);
46
+ }
47
+
48
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list::part(state-layer) {
49
+ display: none;
50
+ }
51
+
52
+ /*
53
+ * Focus and selection are two separate marks. A 3.1 list could hold a
54
+ * selected row that was not the focused row, so the dotted rectangle is drawn
55
+ * in addition to the inverse-video selection, switching to white inside it so
56
+ * it stays visible against the navy.
57
+ */
58
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list-item:focus-visible {
59
+ outline: var(--win31-focus-ring);
60
+ outline-offset: calc(-1 * var(--win31-unit));
61
+ }
62
+
63
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list-item[selected]:focus-visible {
64
+ outline: var(--win31-focus-ring-selected);
65
+ }
66
+
67
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
68
+ rc-list-item
69
+ > :where([data-rc-list-supporting], small) {
70
+ display: block;
71
+ color: inherit;
72
+ }
73
+
74
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-list-item > img[slot='leading'] {
75
+ image-rendering: pixelated;
76
+ }
77
+
78
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-listbox,
79
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) [part~='listbox'] {
80
+ --rc-listbox-option-gap: var(--rc-list-item-gap);
81
+ --rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size);
82
+ --rc-listbox-option-padding-block: var(--rc-list-item-padding-block);
83
+ --rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline);
84
+ --rc-listbox-hover-bg: var(--rc-list-item-hover-bg);
85
+ --rc-listbox-active-bg: var(--rc-list-item-active-bg);
86
+ --rc-listbox-selected-bg: var(--rc-list-item-selected-bg);
87
+ --rc-listbox-selected-color: var(--rc-list-item-selected-color);
88
+ --rc-listbox-disabled-opacity: 1;
89
+ }
90
+ }
@@ -0,0 +1,39 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-listbox {
3
+ display: block;
4
+ padding: var(--win31-gap-tight);
5
+ overflow: auto;
6
+ color: var(--win31-color-field-text);
7
+ background: var(--win31-color-field);
8
+ border: var(--win31-hairline) solid;
9
+ border-color: var(--win31-inset-border-color);
10
+ border-radius: var(--win31-radius);
11
+ box-shadow: none;
12
+ font-family: var(--win31-font-family);
13
+ font-size: var(--win31-font-size);
14
+ --rc-listbox-option-transition: none;
15
+ --rc-listbox-disabled-opacity: 1;
16
+ }
17
+
18
+ /*
19
+ * Selection is full-row inverse video and it persists whether or not the
20
+ * listbox has focus, which is why focus needs its own dotted mark below.
21
+ */
22
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-listbox::part(option) {
23
+ border-radius: var(--win31-radius);
24
+ transition: none;
25
+ }
26
+
27
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-listbox::part(option):focus-visible {
28
+ outline: var(--win31-focus-ring);
29
+ outline-offset: calc(-1 * var(--win31-unit));
30
+ }
31
+
32
+ /*
33
+ * A 3.1 listbox marked selection by inverting the row, never by adding a
34
+ * checkmark, so the indicator is removed rather than restyled.
35
+ */
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-listbox::part(option-checkmark) {
37
+ display: none;
38
+ }
39
+ }
@@ -0,0 +1,80 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * Write, essentially: a strip of latched toolbar buttons over a sunken text
4
+ * well, in the one typeface the shell had.
5
+ */
6
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-markdown-editor {
7
+ --rc-markdown-editor-background: var(--win31-color-field);
8
+ --rc-markdown-editor-color: var(--win31-color-field-text);
9
+ --rc-markdown-editor-border: var(--win31-hairline) solid var(--win31-color-shadow);
10
+ --rc-markdown-editor-border-radius: var(--win31-radius);
11
+ --rc-markdown-editor-padding: var(--win31-gap-tight);
12
+ --rc-markdown-editor-font-family: var(--win31-font-family);
13
+ --rc-markdown-editor-font-size: var(--win31-font-size);
14
+ --rc-markdown-editor-line-height: var(--win31-line-height);
15
+ --rc-markdown-editor-src-font-family: var(--win31-font-family);
16
+ --rc-markdown-editor-src-dim-color: var(--win31-color-shadow);
17
+ --rc-markdown-editor-src-heading-color: var(--win31-color-frame);
18
+ --rc-markdown-editor-src-link-color: var(--win31-color-selection);
19
+ --rc-markdown-editor-src-code-color: var(--win31-color-frame);
20
+ --rc-markdown-editor-src-list-color: var(--win31-color-frame);
21
+ --rc-markdown-editor-src-blockquote-color: var(--win31-color-shadow);
22
+ --rc-markdown-editor-focus-outline: var(--win31-focus-ring);
23
+ --rc-markdown-editor-toolbar-background: var(--win31-color-surface);
24
+ --rc-markdown-editor-toolbar-color: var(--win31-color-frame);
25
+ --rc-markdown-editor-toolbar-border: var(--win31-border);
26
+ --rc-markdown-editor-toolbar-radius: var(--win31-radius);
27
+ --rc-markdown-editor-toolbar-padding: var(--win31-gap-tight);
28
+ --rc-markdown-editor-toolbar-gap: calc(3 * var(--win31-unit));
29
+ --rc-markdown-editor-toolbar-button-size: var(--win31-toolbar-button-size);
30
+ --rc-markdown-editor-toolbar-button-background: var(--win31-color-surface);
31
+ --rc-markdown-editor-toolbar-button-color: var(--win31-color-frame);
32
+ --rc-markdown-editor-toolbar-button-border: var(--win31-border);
33
+ --rc-markdown-editor-toolbar-button-radius: var(--win31-radius);
34
+ --rc-markdown-editor-toolbar-button-active-background: var(--win31-color-surface);
35
+ --rc-markdown-editor-toolbar-button-active-color: var(--win31-color-frame);
36
+ --rc-markdown-editor-toolbar-button-active-border: var(--win31-color-frame);
37
+ --rc-markdown-editor-toolbar-button-hover-opacity: 0;
38
+ --rc-markdown-editor-toolbar-button-focus-opacity: 0;
39
+ --rc-markdown-editor-toolbar-button-pressed-opacity: 0;
40
+ --rc-markdown-editor-toolbar-input-background: var(--win31-color-field);
41
+ --rc-markdown-editor-toolbar-input-color: var(--win31-color-field-text);
42
+ --rc-markdown-editor-toolbar-input-border: var(--win31-hairline) solid var(--win31-color-shadow);
43
+ --rc-markdown-editor-toolbar-input-radius: var(--win31-radius);
44
+ --rc-markdown-editor-toolbar-select-background: var(--win31-color-field);
45
+ --rc-markdown-editor-toolbar-select-color: var(--win31-color-field-text);
46
+ --rc-markdown-editor-toolbar-select-border: var(--win31-hairline) solid
47
+ var(--win31-color-shadow);
48
+ --rc-markdown-editor-toolbar-select-radius: var(--win31-radius);
49
+ --rc-markdown-editor-toolbar-select-active-background: var(--win31-color-field);
50
+ --rc-markdown-editor-toolbar-select-active-color: var(--win31-color-field-text);
51
+ --rc-markdown-editor-toolbar-select-active-border-color: var(--win31-color-frame);
52
+ --rc-markdown-editor-toolbar-focus-outline: var(--win31-focus-ring);
53
+ --rc-markdown-editor-toolbar-focus-outline-offset: var(--win31-focus-ring-offset);
54
+ }
55
+
56
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-markdown-editor::part(toolbar) {
57
+ min-block-size: var(--win31-toolbar-height);
58
+ border-block-end: var(--win31-border);
59
+ }
60
+
61
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-markdown-editor::part(toolbar) button {
62
+ box-shadow: var(--win31-bevel-outset-1);
63
+ cursor: default;
64
+ transition: none;
65
+ }
66
+
67
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
68
+ rc-markdown-editor::part(toolbar)
69
+ button[aria-pressed='true'] {
70
+ background-image: var(--win31-dither-track);
71
+ background-size: var(--win31-dither-size);
72
+ box-shadow: var(--win31-bevel-inset-1);
73
+ }
74
+
75
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-markdown-editor::part(rich-view) {
76
+ border: var(--win31-hairline) solid;
77
+ border-color: var(--win31-inset-border-color);
78
+ border-radius: var(--win31-radius);
79
+ }
80
+ }
@@ -0,0 +1,39 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu-button {
3
+ --rc-menu-button-trigger-background: var(--win31-color-surface);
4
+ --rc-menu-button-trigger-color: var(--win31-color-frame);
5
+ --rc-menu-button-trigger-border: var(--win31-border);
6
+ --rc-menu-button-trigger-radius: var(--win31-radius);
7
+ --rc-menu-button-trigger-block-size: var(--win31-control-height);
8
+ --rc-menu-button-trigger-padding-block: var(--win31-padding-block);
9
+ --rc-menu-button-trigger-padding-inline: calc(8 * var(--win31-unit));
10
+ --rc-menu-button-trigger-gap: var(--win31-gap-tight);
11
+ --rc-menu-button-trigger-transition: none;
12
+ --rc-menu-button-popup-duration: 0ms;
13
+ --rc-menu-button-trigger-hover-background: var(--win31-color-surface);
14
+ --rc-menu-button-trigger-hover-color: var(--win31-color-frame);
15
+ --rc-menu-button-trigger-hover-border-color: var(--win31-color-frame);
16
+ --rc-menu-button-trigger-open-background: var(--win31-color-selection);
17
+ --rc-menu-button-trigger-open-color: var(--win31-color-selection-text);
18
+ --rc-menu-button-trigger-open-border-color: transparent;
19
+ --rc-menu-button-indicator-color: var(--win31-color-frame);
20
+ --rc-menu-button-indicator-size: var(--win31-check-size);
21
+ --rc-menu-button-icon-size: var(--win31-check-size);
22
+ }
23
+
24
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu-button > button[slot='trigger'] {
25
+ box-shadow: var(--win31-bevel-outset-1);
26
+ cursor: default;
27
+ }
28
+
29
+ /*
30
+ * While the menu is open the trigger stays inverted, which is how 3.1 showed
31
+ * which menu owned the open panel.
32
+ */
33
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu-button[open] > button[slot='trigger'],
34
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu-button > button[slot='trigger']:active {
35
+ color: var(--win31-color-selection-text);
36
+ background-color: var(--win31-color-selection);
37
+ box-shadow: none;
38
+ }
39
+ }
@@ -0,0 +1,64 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * A 3.1 menu is a flat surface panel with a hard one-pixel frame and a hard
4
+ * one-pixel drop shadow. Menus are the one place 3.1 did highlight under the
5
+ * pointer, so the hover tokens are live here where they are transparent for
6
+ * list rows. Tokens are declared on the theme root so menus inside other
7
+ * shadow roots inherit them.
8
+ */
9
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
10
+ --rc-menu-min-width: calc(142 * var(--win31-unit));
11
+ --rc-menu-item-min-block-size: calc(20 * var(--win31-unit));
12
+ --rc-menu-item-padding-block: 0;
13
+ --rc-menu-item-padding-inline: calc(18 * var(--win31-unit)) calc(34 * var(--win31-unit));
14
+ --rc-menu-item-gap: var(--win31-gap);
15
+ --rc-menu-item-transition: none;
16
+ --rc-menu-hover-bg: var(--win31-color-selection);
17
+ --rc-menu-hover-color: var(--win31-color-selection-text);
18
+ --rc-menu-active-bg: var(--win31-color-selection);
19
+ --rc-menu-active-color: var(--win31-color-selection-text);
20
+ --rc-menu-disabled-color: var(--win31-color-disabled-text);
21
+ --rc-menu-disabled-opacity: 1;
22
+ --rc-menu-check-color: var(--win31-color-menu-text);
23
+ --rc-menu-check-size: var(--win31-check-size);
24
+ --rc-menu-group-label-color: var(--win31-color-menu-text);
25
+ --rc-menu-shortcut-color: inherit;
26
+ --rc-menu-shortcut-size: var(--win31-font-size);
27
+ /* Two-pixel ridge, the way 3.1 drew every divider. */
28
+ --rc-menu-separator-border: var(--win31-hairline) solid var(--win31-color-shadow);
29
+ --rc-menu-separator-margin-block: var(--win31-unit);
30
+ --rc-menu-separator-margin-inline: 0;
31
+ }
32
+
33
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu {
34
+ font-family: var(--win31-font-family);
35
+ font-size: var(--win31-font-size);
36
+ line-height: 1;
37
+ }
38
+
39
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu [role^='menuitem'] {
40
+ border-radius: var(--win31-radius);
41
+ cursor: default;
42
+ transition: none;
43
+ }
44
+
45
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu [role^='menuitem']:focus-visible {
46
+ outline: none;
47
+ }
48
+
49
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu [role^='menuitem']:disabled,
50
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu [role^='menuitem'][aria-disabled='true'] {
51
+ color: var(--win31-color-disabled-text);
52
+ text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
53
+ opacity: 1;
54
+ }
55
+
56
+ /*
57
+ * The shortcut column is right-aligned plain text at the same size as the
58
+ * label. 3.1 did not dim it; the spacing carried the distinction.
59
+ */
60
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu [data-rc-menu-shortcut] {
61
+ color: inherit;
62
+ font-size: var(--win31-font-size);
63
+ }
64
+ }
@@ -0,0 +1,67 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * The menu bar runs at its own larger type size, which is one of the few
4
+ * places 3.1 varied it. An open top-level item inverts to the selection
5
+ * colors rather than opening a highlighted container.
6
+ */
7
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menubar {
8
+ --rc-menubar-gap: 0;
9
+ --rc-menubar-padding-inline: 0;
10
+ --rc-menubar-padding-block: 0;
11
+ --rc-menubar-border: 0;
12
+ --rc-menubar-radius: var(--win31-radius);
13
+ --rc-menubar-background: var(--win31-color-menu);
14
+ --rc-menubar-color: var(--win31-color-menu-text);
15
+ --rc-menubar-item-block-size: var(--win31-menu-height);
16
+ --rc-menubar-item-padding-block: 0;
17
+ --rc-menubar-item-padding-inline: calc(9 * var(--win31-unit));
18
+ --rc-menubar-item-gap: 0;
19
+ --rc-menubar-item-border: 0;
20
+ --rc-menubar-item-radius: var(--win31-radius);
21
+ --rc-menubar-item-background: transparent;
22
+ --rc-menubar-item-color: var(--win31-color-menu-text);
23
+ --rc-menubar-item-transition: none;
24
+ --rc-menubar-item-hover-border-color: transparent;
25
+ --rc-menubar-item-hover-background: var(--win31-color-selection);
26
+ --rc-menubar-item-hover-color: var(--win31-color-selection-text);
27
+ --rc-menubar-item-open-border-color: transparent;
28
+ --rc-menubar-item-open-background: var(--win31-color-selection);
29
+ --rc-menubar-item-open-color: var(--win31-color-selection-text);
30
+ }
31
+
32
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menubar::part(root) {
33
+ min-block-size: var(--win31-menu-height);
34
+ background: var(--win31-color-menu);
35
+ border-block-end: var(--win31-border);
36
+ box-shadow: none;
37
+ font-family: var(--win31-font-family);
38
+ font-size: var(--win31-menu-font-size);
39
+ }
40
+
41
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
42
+ rc-menubar
43
+ rc-menu-button
44
+ > button[slot='trigger'] {
45
+ min-block-size: var(--win31-menu-height);
46
+ padding-block: 0;
47
+ padding-inline: calc(9 * var(--win31-unit));
48
+ border: 0;
49
+ border-radius: var(--win31-radius);
50
+ box-shadow: none;
51
+ font-size: var(--win31-menu-font-size);
52
+ line-height: 1;
53
+ cursor: default;
54
+ }
55
+
56
+ /*
57
+ * Mnemonics are authored markup, not a component feature: the underlined
58
+ * letter is a <u> inside the label. Keeping the underline visible is the
59
+ * whole point of the convention, so it is stated explicitly here rather than
60
+ * left to a UA default that a reset may have removed.
61
+ */
62
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menubar u,
63
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-menu u {
64
+ text-decoration: underline;
65
+ text-underline-offset: var(--win31-unit);
66
+ }
67
+ }
@@ -0,0 +1,58 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * Reduced motion is already satisfied: every duration in this theme is zero
4
+ * because 3.1 animated nothing. Declared anyway so the guarantee is explicit
5
+ * rather than incidental, and so a consumer override cannot reintroduce
6
+ * motion under the preference.
7
+ */
8
+ @media (prefers-reduced-motion: reduce) {
9
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *,
10
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::before,
11
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) *::after {
12
+ transition-duration: 0s !important;
13
+ animation-duration: 0s !important;
14
+ }
15
+ }
16
+
17
+ /*
18
+ * Forced colors: total surrender.
19
+ *
20
+ * Every bevel in this theme is an inset box-shadow, a four-value
21
+ * border-color, or a dither image, and forced colors deletes or overrides
22
+ * all three. There is no version of a 3.1 bevel that survives High Contrast,
23
+ * and a user who has turned it on has asked for exactly the decoration this
24
+ * theme is made of to go away. So it goes away completely and the system
25
+ * palette takes over.
26
+ *
27
+ * The result is closer to stock, pre-CTL3D Windows 3.1 than the beveled
28
+ * default is: flat, system-colored, one-pixel-outlined controls.
29
+ */
30
+ @media (forced-colors: active) {
31
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) * {
32
+ forced-color-adjust: auto;
33
+ box-shadow: none !important;
34
+ background-image: none !important;
35
+ text-shadow: none !important;
36
+ }
37
+
38
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) :is(button, [role='button'], summary) {
39
+ border: 1px solid ButtonBorder;
40
+ }
41
+
42
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
43
+ :is(button, [role='button'], [role^='menuitem'], summary):focus-visible {
44
+ outline: 2px solid Highlight;
45
+ outline-offset: 0;
46
+ }
47
+
48
+ /*
49
+ * The dotted focus rectangle is too thin to survive as the only indicator
50
+ * once the bevels are gone, so it thickens rather than disappearing.
51
+ */
52
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
53
+ --win31-focus-ring: 2px solid Highlight;
54
+ --win31-focus-ring-selected: 2px solid HighlightText;
55
+ --win31-focus-ring-offset: 0;
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,52 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * No 3.1 analogue. The closest period construction is a docked strip of
4
+ * latched icon buttons, the way Program Manager showed groups and a toolbar
5
+ * showed modes, so the active destination reads as pressed rather than as
6
+ * tinted.
7
+ */
8
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-bar {
9
+ --rc-navigation-bar-bg: var(--win31-color-surface);
10
+ --rc-navigation-bar-color: var(--win31-color-frame);
11
+ --rc-navigation-bar-item-color: var(--win31-color-frame);
12
+ --rc-navigation-bar-active-color: var(--win31-color-frame);
13
+ --rc-navigation-bar-block-size: var(--win31-toolbar-height);
14
+ --rc-navigation-bar-gap: calc(3 * var(--win31-unit));
15
+ --rc-navigation-bar-padding-block: var(--win31-gap-tight);
16
+ --rc-navigation-bar-padding-inline: calc(3 * var(--win31-unit));
17
+ --rc-navigation-bar-item-gap: var(--win31-gap-tight);
18
+ --rc-navigation-bar-item-min-block-size: var(--win31-toolbar-button-size);
19
+ --rc-navigation-bar-item-padding-block: 0;
20
+ --rc-navigation-bar-item-padding-inline: var(--win31-gap-tight);
21
+ --rc-navigation-bar-item-text-decoration: none;
22
+ --rc-navigation-bar-indicator-bg: transparent;
23
+ --rc-navigation-bar-indicator-border: 0;
24
+ --rc-navigation-bar-indicator-radius: var(--win31-radius);
25
+ --rc-navigation-bar-indicator-duration: 0ms;
26
+ --rc-navigation-bar-focus-ring: var(--win31-focus-ring);
27
+ --rc-navigation-bar-focus-ring-offset: var(--win31-focus-ring-offset);
28
+ font-family: var(--win31-font-family);
29
+ font-size: var(--win31-font-size);
30
+ }
31
+
32
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-bar::part(nav) {
33
+ border-block-start: var(--win31-border);
34
+ }
35
+
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-bar :is(a, button) {
37
+ background-color: var(--win31-color-surface);
38
+ border: var(--win31-border);
39
+ border-radius: var(--win31-radius);
40
+ box-shadow: var(--win31-bevel-outset-1);
41
+ cursor: default;
42
+ transition: none;
43
+ }
44
+
45
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
46
+ rc-navigation-bar
47
+ :is([aria-current], [aria-selected='true']) {
48
+ background-image: var(--win31-dither-track);
49
+ background-size: var(--win31-dither-size);
50
+ box-shadow: var(--win31-bevel-inset-1);
51
+ }
52
+ }
@@ -0,0 +1,57 @@
1
+ @layer rc-theme-win31.components {
2
+ /* The vertical form of the docked latched-button strip above. */
3
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-rail {
4
+ --rc-navigation-rail-bg: var(--win31-color-surface);
5
+ --rc-navigation-rail-color: var(--win31-color-frame);
6
+ --rc-navigation-rail-item-color: var(--win31-color-frame);
7
+ --rc-navigation-rail-active-color: var(--win31-color-frame);
8
+ --rc-navigation-rail-inline-size: var(--win31-toolbar-height);
9
+ --rc-navigation-rail-expanded-inline-size: calc(160 * var(--win31-unit));
10
+ --rc-navigation-rail-gap: calc(3 * var(--win31-unit));
11
+ --rc-navigation-rail-padding-block: calc(3 * var(--win31-unit));
12
+ --rc-navigation-rail-padding-inline: var(--win31-gap-tight);
13
+ --rc-navigation-rail-item-gap: var(--win31-gap-tight);
14
+ --rc-navigation-rail-item-min-block-size: var(--win31-toolbar-button-size);
15
+ --rc-navigation-rail-item-padding-block: 0;
16
+ --rc-navigation-rail-item-padding-inline: var(--win31-gap-tight);
17
+ --rc-navigation-rail-item-text-decoration: none;
18
+ --rc-navigation-rail-expanded-item-min-block-size: var(--win31-control-height);
19
+ --rc-navigation-rail-expanded-item-padding-inline: var(--win31-padding-inline);
20
+ --rc-navigation-rail-indicator-bg: transparent;
21
+ --rc-navigation-rail-indicator-border: 0;
22
+ --rc-navigation-rail-indicator-radius: var(--win31-radius);
23
+ --rc-navigation-rail-indicator-duration: 0ms;
24
+ --rc-navigation-rail-duration: 0ms;
25
+ --rc-navigation-rail-toggle-size: var(--win31-control-height);
26
+ --rc-navigation-rail-focus-ring: var(--win31-focus-ring);
27
+ --rc-navigation-rail-focus-ring-offset: var(--win31-focus-ring-offset);
28
+ font-family: var(--win31-font-family);
29
+ font-size: var(--win31-font-size);
30
+ }
31
+
32
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-rail::part(nav) {
33
+ border-inline-end: var(--win31-border);
34
+ }
35
+
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-rail :is(a, button) {
37
+ background-color: var(--win31-color-surface);
38
+ border: var(--win31-border);
39
+ border-radius: var(--win31-radius);
40
+ box-shadow: var(--win31-bevel-outset-1);
41
+ cursor: default;
42
+ transition: none;
43
+ }
44
+
45
+ :where(.rc-theme-win31, :host(.rc-theme-win31))
46
+ rc-navigation-rail
47
+ :is([aria-current], [aria-selected='true']) {
48
+ background-image: var(--win31-dither-track);
49
+ background-size: var(--win31-dither-size);
50
+ box-shadow: var(--win31-bevel-inset-1);
51
+ }
52
+
53
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-navigation-rail::part(toggle) {
54
+ border-radius: var(--win31-radius);
55
+ box-shadow: var(--win31-bevel-outset-1);
56
+ }
57
+ }
@@ -0,0 +1,13 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * A popover is a 3.1 popup panel: the bridge's --rc-popup-* tokens already
4
+ * give it the menu surface, hard one-pixel frame, square corners, and hard
5
+ * drop shadow. Only its padding needs the theme's panel spacing instead of
6
+ * the component's roomier default. Declared on the theme root so popovers
7
+ * inside other shadow roots inherit it.
8
+ */
9
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) {
10
+ --rc-popover-padding-block: var(--win31-gap-panel);
11
+ --rc-popover-padding-inline: var(--win31-gap-panel);
12
+ }
13
+ }
@@ -0,0 +1,47 @@
1
+ @layer rc-theme-win31.components {
2
+ /*
3
+ * There was no progress common control in 3.1; Setup drew its own. The
4
+ * period form is a sunken well filled with discrete blocks rather than a
5
+ * continuous bar, which also happens to communicate "step N of M" better
6
+ * than a smooth fill does.
7
+ */
8
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-progress {
9
+ --rc-progress-track-background: var(--win31-color-field);
10
+ --rc-progress-track-opacity: 1;
11
+ --rc-progress-track-radius: var(--win31-radius);
12
+ --rc-progress-fill-background: var(--win31-color-selection);
13
+ --rc-progress-value-color: var(--win31-color-frame);
14
+ --rc-progress-control-size: var(--win31-check-size);
15
+ --rc-progress-gap: var(--win31-gap);
16
+ font-family: var(--win31-font-family);
17
+ font-size: var(--win31-font-size);
18
+ }
19
+
20
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-progress::part(track) {
21
+ border: var(--win31-hairline) solid;
22
+ border-color: var(--win31-inset-border-color);
23
+ border-radius: var(--win31-radius);
24
+ }
25
+
26
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-progress::part(fill) {
27
+ border-radius: var(--win31-radius);
28
+ /*
29
+ * The gradient paints the blocks on its own, so the solid fill color has to
30
+ * go: leaving it set fills the gaps behind the transparent stops and the
31
+ * bar reads as continuous. Forced colors drops the image and restores a
32
+ * plain bar, which is the right degradation.
33
+ */
34
+ background-color: transparent;
35
+ background-image: repeating-linear-gradient(
36
+ to right,
37
+ var(--win31-color-selection) 0 calc(8 * var(--win31-unit)),
38
+ transparent calc(8 * var(--win31-unit)) calc(10 * var(--win31-unit))
39
+ );
40
+ transition: none;
41
+ }
42
+
43
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-progress::part(value-display) {
44
+ color: var(--win31-color-frame);
45
+ font-size: var(--win31-font-size);
46
+ }
47
+ }
@@ -0,0 +1,41 @@
1
+ @layer rc-theme-win31.components {
2
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider {
3
+ --rc-range-slider-accent: var(--win31-color-selection);
4
+ --rc-range-slider-track-background: var(--win31-color-field);
5
+ --rc-range-slider-thumb-background: var(--win31-color-surface);
6
+ --rc-range-slider-thumb-border: var(--win31-color-frame);
7
+ --rc-thumb-radius: var(--win31-radius);
8
+ font-family: var(--win31-font-family);
9
+ font-size: var(--win31-font-size);
10
+ }
11
+
12
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(track) {
13
+ border: var(--win31-hairline) solid;
14
+ border-color: var(--win31-inset-border-color);
15
+ border-radius: var(--win31-radius);
16
+ }
17
+
18
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(range) {
19
+ border-radius: var(--win31-radius);
20
+ transition: none;
21
+ }
22
+
23
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(thumb),
24
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(low-thumb),
25
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(high-thumb) {
26
+ inline-size: calc(11 * var(--win31-unit));
27
+ block-size: var(--win31-control-height);
28
+ background: var(--win31-color-surface);
29
+ border: var(--win31-border);
30
+ border-radius: var(--win31-radius);
31
+ box-shadow: var(--win31-bevel-outset-1);
32
+ transition: none;
33
+ }
34
+
35
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(value-display),
36
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(low-value-display),
37
+ :where(.rc-theme-win31, :host(.rc-theme-win31)) rc-range-slider::part(high-value-display) {
38
+ color: var(--win31-color-frame);
39
+ font-size: var(--win31-font-size);
40
+ }
41
+ }