@rcarls/rc-theme-win31 0.0.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +185 -0
- package/DESIGN.md +195 -0
- package/README.md +157 -5
- package/bridge.css +257 -0
- package/components/accordion.css +21 -0
- package/components/adaptive-menu.css +108 -0
- package/components/app-bar.css +66 -0
- package/components/bottom-sheet.css +41 -0
- package/components/button.css +74 -0
- package/components/card.css +50 -0
- package/components/carousel.css +59 -0
- package/components/chip-group.css +33 -0
- package/components/chip.css +56 -0
- package/components/combobox.css +83 -0
- package/components/dialog.css +156 -0
- package/components/disclosure.css +106 -0
- package/components/fab-menu.css +47 -0
- package/components/fab.css +49 -0
- package/components/field.css +73 -0
- package/components/icons.css +56 -0
- package/components/list-item.css +90 -0
- package/components/listbox.css +39 -0
- package/components/markdown-editor.css +80 -0
- package/components/menu-button.css +39 -0
- package/components/menu.css +64 -0
- package/components/menubar.css +67 -0
- package/components/modes.css +58 -0
- package/components/navigation-bar.css +52 -0
- package/components/navigation-rail.css +57 -0
- package/components/popover.css +13 -0
- package/components/progress.css +47 -0
- package/components/range-slider.css +41 -0
- package/components/scroller.css +91 -0
- package/components/search-bar.css +65 -0
- package/components/segmented-button.css +64 -0
- package/components/select.css +73 -0
- package/components/slider.css +64 -0
- package/components/snackbar.css +50 -0
- package/components/splitter.css +42 -0
- package/components/switch.css +75 -0
- package/components/textarea.css +42 -0
- package/components/toolbar.css +68 -0
- package/components/tooltip.css +23 -0
- package/components/transfer-list.css +74 -0
- package/components/virtual-canvas.css +45 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +45 -0
- package/css-components/button.css +99 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +109 -0
- package/css-components/disclosure.css +34 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +19 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +169 -0
- package/native.css +271 -0
- package/package.json +51 -7
- package/theme.css +3 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip-group::part(root) {
|
|
3
|
+
gap: var(--win31-gap-tight);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip-group::part(toggle) {
|
|
7
|
+
min-block-size: var(--win31-control-height);
|
|
8
|
+
padding-inline: calc(8 * var(--win31-unit));
|
|
9
|
+
color: var(--win31-color-frame);
|
|
10
|
+
background: var(--win31-color-surface);
|
|
11
|
+
border: var(--win31-border);
|
|
12
|
+
border-radius: var(--win31-radius);
|
|
13
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
14
|
+
font-family: var(--win31-font-family);
|
|
15
|
+
font-size: var(--win31-font-size);
|
|
16
|
+
transition: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip-group::part(toggle):active {
|
|
20
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* A separator in a 3.1 strip is a two-pixel ridge, not a hairline. */
|
|
24
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip-group::part(toggle-separator) {
|
|
25
|
+
inline-size: calc(2 * var(--win31-unit));
|
|
26
|
+
background: linear-gradient(
|
|
27
|
+
to right,
|
|
28
|
+
var(--win31-color-shadow) 0 var(--win31-unit),
|
|
29
|
+
var(--win31-color-highlight) var(--win31-unit) 100%
|
|
30
|
+
);
|
|
31
|
+
border: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* There is no 3.1 chip. The closest real control is the latched toolbar
|
|
4
|
+
* toggle: a small beveled square that stays pressed while its state is on.
|
|
5
|
+
* Selected therefore inverts the bevel and dithers the face rather than
|
|
6
|
+
* filling it with an accent color, which is how 3.1 expressed "on" without
|
|
7
|
+
* an alpha channel.
|
|
8
|
+
*/
|
|
9
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip {
|
|
10
|
+
--rc-chip-padding-block: var(--win31-padding-block);
|
|
11
|
+
--rc-chip-disabled-opacity: 1;
|
|
12
|
+
--rc-chip-hover-state-layer-opacity: 0;
|
|
13
|
+
--rc-chip-focus-state-layer-opacity: 0;
|
|
14
|
+
--rc-chip-pressed-state-layer-opacity: 0;
|
|
15
|
+
--rc-chip-state-layer-transition-duration: 0ms;
|
|
16
|
+
--rc-chip-state-layer-transition-easing: step-end;
|
|
17
|
+
--rc-chip-focus-ring: var(--win31-focus-ring);
|
|
18
|
+
--rc-chip-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
19
|
+
--rc-chip-selected-color: var(--win31-color-frame);
|
|
20
|
+
--rc-chip-selected-border-color: var(--win31-color-frame);
|
|
21
|
+
--rc-chip-remove-radius: var(--win31-radius);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip > :is(button, a, span) {
|
|
25
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
26
|
+
cursor: default;
|
|
27
|
+
transition: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* The dithered face arrives through --rc-chip-selected-bg, which the
|
|
32
|
+
* component applies as a background shorthand. Only the bevel is left to set
|
|
33
|
+
* here, because the component does not own one.
|
|
34
|
+
*/
|
|
35
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip[selected] > :is(button, a, span) {
|
|
36
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip > :is(button, a):active:not(:disabled) {
|
|
40
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip > button:disabled {
|
|
44
|
+
color: var(--win31-color-disabled-text);
|
|
45
|
+
text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip::part(state-layer) {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-chip::part(remove) {
|
|
53
|
+
border-radius: var(--win31-radius);
|
|
54
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* The editable sibling of the drop-down list. Windows 3.1 distinguished a
|
|
4
|
+
* "drop-down combo" (typing allowed) from a "drop-down list" (selection
|
|
5
|
+
* only), and the difference was visible: the combo shows a text caret in the
|
|
6
|
+
* well while the list does not.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox {
|
|
9
|
+
display: block;
|
|
10
|
+
min-inline-size: 0;
|
|
11
|
+
--rc-combobox-gap: var(--win31-gap-tight);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(anchor) {
|
|
15
|
+
position: relative;
|
|
16
|
+
min-inline-size: 0;
|
|
17
|
+
min-block-size: calc(20 * var(--win31-unit));
|
|
18
|
+
color: var(--win31-color-field-text);
|
|
19
|
+
background: var(--win31-color-field);
|
|
20
|
+
border: var(--win31-hairline) solid;
|
|
21
|
+
border-color: var(--win31-inset-border-color);
|
|
22
|
+
border-radius: var(--win31-radius);
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(input),
|
|
27
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox > input {
|
|
28
|
+
padding-block: var(--win31-padding-block);
|
|
29
|
+
padding-inline: var(--win31-padding-inline) calc(18 * var(--win31-unit));
|
|
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-combobox > input:focus-visible {
|
|
39
|
+
outline: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox:focus-within::part(anchor) {
|
|
43
|
+
outline: var(--win31-focus-ring);
|
|
44
|
+
outline-offset: var(--win31-focus-ring-offset);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(toggle) {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset-block-start: var(--win31-unit);
|
|
50
|
+
inset-inline-end: var(--win31-unit);
|
|
51
|
+
inline-size: var(--win31-scrollbar-size);
|
|
52
|
+
block-size: calc(100% - (2 * var(--win31-unit)));
|
|
53
|
+
background-color: var(--win31-color-surface);
|
|
54
|
+
background-image: var(--win31-glyph-arrow-down);
|
|
55
|
+
background-position: center;
|
|
56
|
+
background-repeat: no-repeat;
|
|
57
|
+
border: 0;
|
|
58
|
+
border-radius: var(--win31-radius);
|
|
59
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
60
|
+
color: transparent;
|
|
61
|
+
font-size: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(toggle):active {
|
|
65
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(listbox) {
|
|
69
|
+
color: var(--win31-color-field-text);
|
|
70
|
+
background: var(--win31-color-field);
|
|
71
|
+
border: var(--win31-border);
|
|
72
|
+
border-radius: var(--win31-radius);
|
|
73
|
+
box-shadow: none;
|
|
74
|
+
font-family: var(--win31-font-family);
|
|
75
|
+
font-size: var(--win31-font-size);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-combobox::part(chip) {
|
|
79
|
+
border: var(--win31-border);
|
|
80
|
+
border-radius: var(--win31-radius);
|
|
81
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* Window chrome.
|
|
4
|
+
*
|
|
5
|
+
* rc-dialog deliberately keeps the native <dialog> in consumer light DOM and
|
|
6
|
+
* exposes no CSS parts, so the caption bar is authored markup. The component
|
|
7
|
+
* already contracts on that markup through its move-handle selector, and its
|
|
8
|
+
* documented demo shape is a <header> as the first child of the <dialog>.
|
|
9
|
+
* This theme styles that shape, which means a themed window needs no new
|
|
10
|
+
* markers and no upstream change:
|
|
11
|
+
*
|
|
12
|
+
* <rc-dialog movable move-handle="header">
|
|
13
|
+
* <dialog aria-labelledby="t">
|
|
14
|
+
* <header><h2 id="t">Title</h2></header>
|
|
15
|
+
* ...
|
|
16
|
+
* <footer><button>OK</button><button>Cancel</button></footer>
|
|
17
|
+
* </dialog>
|
|
18
|
+
* </rc-dialog>
|
|
19
|
+
*/
|
|
20
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog {
|
|
21
|
+
--rc-dialog-background: var(--win31-color-surface);
|
|
22
|
+
--rc-dialog-color: var(--win31-color-frame);
|
|
23
|
+
--rc-dialog-border: var(--win31-border);
|
|
24
|
+
--rc-dialog-radius: var(--win31-radius);
|
|
25
|
+
--rc-dialog-padding: 0;
|
|
26
|
+
--rc-dialog-shadow: var(--win31-dialog-frame);
|
|
27
|
+
--rc-dialog-scrim: transparent;
|
|
28
|
+
--rc-dialog-fullscreen-background: var(--win31-color-surface);
|
|
29
|
+
--rc-dialog-fullscreen-padding-block: 0;
|
|
30
|
+
--rc-dialog-fullscreen-padding-inline: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog {
|
|
34
|
+
padding: 0;
|
|
35
|
+
color: var(--win31-color-frame);
|
|
36
|
+
background: var(--win31-color-surface);
|
|
37
|
+
border: var(--win31-border);
|
|
38
|
+
border-radius: var(--win31-radius);
|
|
39
|
+
box-shadow: var(--win31-dialog-frame);
|
|
40
|
+
font-family: var(--win31-font-family);
|
|
41
|
+
font-size: var(--win31-font-size);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* 3.1 dimmed nothing behind a modal. The dialog's own frame carried the
|
|
46
|
+
* separation, so the backdrop stays fully transparent.
|
|
47
|
+
*/
|
|
48
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog::backdrop {
|
|
49
|
+
background: transparent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > header {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 0;
|
|
56
|
+
min-block-size: var(--win31-title-height);
|
|
57
|
+
padding: 0;
|
|
58
|
+
color: var(--win31-color-title-active-text);
|
|
59
|
+
background: var(--win31-color-title-active);
|
|
60
|
+
font-size: var(--win31-title-font-size);
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
line-height: 1;
|
|
63
|
+
/* The caption bar is a grab handle, not text to select. */
|
|
64
|
+
cursor: default;
|
|
65
|
+
-webkit-user-select: none;
|
|
66
|
+
user-select: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > header > :is(h1, h2, h3) {
|
|
70
|
+
flex: 1;
|
|
71
|
+
margin: 0;
|
|
72
|
+
padding-inline: var(--win31-padding-inline);
|
|
73
|
+
font-size: inherit;
|
|
74
|
+
font-weight: inherit;
|
|
75
|
+
/* 3.1 centered the window title rather than aligning it to the start. */
|
|
76
|
+
text-align: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > header button {
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
inline-size: var(--win31-title-height);
|
|
82
|
+
block-size: var(--win31-title-height);
|
|
83
|
+
min-inline-size: var(--win31-title-height);
|
|
84
|
+
min-block-size: var(--win31-title-height);
|
|
85
|
+
padding: 0;
|
|
86
|
+
color: var(--win31-color-frame);
|
|
87
|
+
background-color: var(--win31-color-surface);
|
|
88
|
+
border: 0;
|
|
89
|
+
border-inline-start: var(--win31-border);
|
|
90
|
+
border-radius: var(--win31-radius);
|
|
91
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
92
|
+
cursor: default;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > header button:active {
|
|
96
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
* The system-menu box sits at the leading edge and is drawn rather than
|
|
101
|
+
* lettered: a white bar with a black frame and a one-pixel shadow.
|
|
102
|
+
*/
|
|
103
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > header button:first-child {
|
|
104
|
+
border-inline-start: 0;
|
|
105
|
+
border-inline-end: var(--win31-border);
|
|
106
|
+
box-shadow: none;
|
|
107
|
+
font-size: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
111
|
+
rc-dialog
|
|
112
|
+
> dialog
|
|
113
|
+
> header
|
|
114
|
+
button:first-child::before {
|
|
115
|
+
content: '';
|
|
116
|
+
display: block;
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
inline-size: calc(10 * var(--win31-unit));
|
|
119
|
+
block-size: calc(3 * var(--win31-unit));
|
|
120
|
+
margin-inline: auto;
|
|
121
|
+
background-color: var(--win31-color-highlight);
|
|
122
|
+
border: var(--win31-border);
|
|
123
|
+
box-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-shadow);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > footer {
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
gap: var(--win31-gap);
|
|
131
|
+
padding-block: calc(3 * var(--win31-unit)) calc(8 * var(--win31-unit));
|
|
132
|
+
padding-inline: calc(8 * var(--win31-unit));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog > dialog > :not(header, footer) {
|
|
136
|
+
padding: var(--win31-gap-panel);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/*
|
|
140
|
+
* A group box is a sunken frame with its legend notched into the top edge.
|
|
141
|
+
* It is still the most accessible grouping primitive in HTML and it is worth
|
|
142
|
+
* having it look deliberate again.
|
|
143
|
+
*/
|
|
144
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog fieldset {
|
|
145
|
+
margin-block: var(--win31-gap-panel) 0;
|
|
146
|
+
padding-block: calc(5 * var(--win31-unit)) var(--win31-gap-panel);
|
|
147
|
+
padding-inline: var(--win31-gap-panel);
|
|
148
|
+
border: var(--win31-hairline) solid;
|
|
149
|
+
border-color: var(--win31-inset-border-color);
|
|
150
|
+
border-radius: var(--win31-radius);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-dialog fieldset > legend {
|
|
154
|
+
padding-inline: var(--win31-padding-inline);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* The window-shade roll-up: an outset panel whose header carries a small
|
|
4
|
+
* beveled box at its trailing edge holding a triangle. 3.1 shells used this
|
|
5
|
+
* for independently collapsible panes, which is still a better density tool
|
|
6
|
+
* than an accordion when the panes are not mutually exclusive.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure {
|
|
9
|
+
display: block;
|
|
10
|
+
--rc-disclosure-background: var(--win31-color-surface);
|
|
11
|
+
--rc-disclosure-open-background: var(--win31-color-surface);
|
|
12
|
+
--rc-disclosure-color: var(--win31-color-frame);
|
|
13
|
+
--rc-disclosure-border: var(--win31-hairline) solid var(--win31-color-shadow);
|
|
14
|
+
--rc-disclosure-radius: var(--win31-radius);
|
|
15
|
+
--rc-disclosure-open-shadow: none;
|
|
16
|
+
--rc-disclosure-duration: 0ms;
|
|
17
|
+
--rc-disclosure-summary-color: var(--win31-color-frame);
|
|
18
|
+
--rc-disclosure-summary-font: var(--win31-font-weight) var(--win31-font-size) / 1
|
|
19
|
+
var(--win31-font-family);
|
|
20
|
+
--rc-disclosure-summary-min-block-size: calc(18 * var(--win31-unit));
|
|
21
|
+
--rc-disclosure-summary-padding-block: var(--win31-padding-block);
|
|
22
|
+
--rc-disclosure-summary-padding-inline: var(--win31-padding-inline);
|
|
23
|
+
--rc-disclosure-summary-gap: var(--win31-gap-tight);
|
|
24
|
+
--rc-disclosure-summary-hover-background: var(--win31-color-surface);
|
|
25
|
+
--rc-disclosure-summary-marker-color: var(--win31-color-frame);
|
|
26
|
+
--rc-disclosure-content-color: var(--win31-color-frame);
|
|
27
|
+
--rc-disclosure-content-font: var(--win31-font-weight) var(--win31-font-size) /
|
|
28
|
+
var(--win31-line-height) var(--win31-font-family);
|
|
29
|
+
--rc-disclosure-content-padding-block: var(--win31-gap-tight);
|
|
30
|
+
--rc-disclosure-content-padding-inline: var(--win31-gap-tight);
|
|
31
|
+
--rc-disclosure-focus-ring: var(--win31-focus-ring);
|
|
32
|
+
--rc-disclosure-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details {
|
|
36
|
+
padding: 0;
|
|
37
|
+
background: var(--win31-color-surface);
|
|
38
|
+
border: var(--win31-hairline) solid;
|
|
39
|
+
border-color: var(--win31-outset-border-color);
|
|
40
|
+
border-radius: var(--win31-radius);
|
|
41
|
+
box-shadow: none;
|
|
42
|
+
font-size: var(--win31-font-size);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details > summary {
|
|
46
|
+
display: block;
|
|
47
|
+
position: relative;
|
|
48
|
+
min-block-size: calc(18 * var(--win31-unit));
|
|
49
|
+
padding-block: var(--win31-padding-block);
|
|
50
|
+
padding-inline: var(--win31-padding-inline) calc(18 * var(--win31-unit));
|
|
51
|
+
background-color: var(--win31-color-surface);
|
|
52
|
+
border: var(--win31-hairline) solid;
|
|
53
|
+
border-color: var(--win31-outset-border-color);
|
|
54
|
+
border-radius: var(--win31-radius);
|
|
55
|
+
box-shadow: none;
|
|
56
|
+
font-weight: var(--win31-font-weight);
|
|
57
|
+
line-height: calc(16 * var(--win31-unit));
|
|
58
|
+
/* 3.1 centered a pane caption rather than aligning it to the start. */
|
|
59
|
+
text-align: center;
|
|
60
|
+
list-style: none;
|
|
61
|
+
cursor: default;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
65
|
+
rc-disclosure
|
|
66
|
+
> details
|
|
67
|
+
> summary::-webkit-details-marker {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details > summary::marker {
|
|
72
|
+
content: '';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details > summary::after {
|
|
76
|
+
content: '';
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset-block-start: var(--win31-gap-tight);
|
|
79
|
+
inset-inline-end: var(--win31-gap-tight);
|
|
80
|
+
inline-size: var(--win31-check-size);
|
|
81
|
+
block-size: var(--win31-check-size);
|
|
82
|
+
background-color: var(--win31-color-surface);
|
|
83
|
+
background-image: var(--win31-glyph-collapse);
|
|
84
|
+
background-position: center;
|
|
85
|
+
background-repeat: no-repeat;
|
|
86
|
+
border: var(--win31-hairline) solid;
|
|
87
|
+
border-color: var(--win31-outset-border-color);
|
|
88
|
+
box-shadow: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
92
|
+
rc-disclosure
|
|
93
|
+
> details:not([open])
|
|
94
|
+
> summary::after {
|
|
95
|
+
background-image: var(--win31-glyph-expand);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details > summary:focus-visible {
|
|
99
|
+
outline: var(--win31-focus-ring);
|
|
100
|
+
outline-offset: var(--win31-focus-ring-offset);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-disclosure > details > :not(summary) {
|
|
104
|
+
margin: var(--win31-gap-tight);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/* The same knowing anachronism as rc-fab, with a menu hung off it. */
|
|
3
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab-menu {
|
|
4
|
+
--rc-fab-menu-bg: var(--win31-color-surface);
|
|
5
|
+
--rc-fab-menu-bg-hover: var(--win31-color-surface);
|
|
6
|
+
--rc-fab-menu-bg-open: var(--win31-color-selection);
|
|
7
|
+
--rc-fab-menu-color: var(--win31-color-frame);
|
|
8
|
+
--rc-fab-menu-border: var(--win31-border);
|
|
9
|
+
--rc-fab-menu-radius: var(--win31-radius);
|
|
10
|
+
--rc-fab-menu-size: var(--win31-toolbar-height);
|
|
11
|
+
--rc-fab-menu-padding-block: var(--win31-padding-block);
|
|
12
|
+
--rc-fab-menu-padding-inline: calc(8 * var(--win31-unit));
|
|
13
|
+
--rc-fab-menu-font-family: var(--win31-font-family);
|
|
14
|
+
--rc-fab-menu-font-size: var(--win31-font-size);
|
|
15
|
+
--rc-fab-menu-font-weight: var(--win31-font-weight);
|
|
16
|
+
--rc-fab-menu-letter-spacing: normal;
|
|
17
|
+
--rc-fab-menu-text-decoration: none;
|
|
18
|
+
--rc-fab-menu-shadow: none;
|
|
19
|
+
--rc-fab-menu-shadow-hover: none;
|
|
20
|
+
--rc-fab-menu-shadow-active: none;
|
|
21
|
+
--rc-fab-menu-shadow-open: none;
|
|
22
|
+
--rc-fab-menu-disabled-shadow: none;
|
|
23
|
+
--rc-fab-menu-disabled-opacity: 1;
|
|
24
|
+
--rc-fab-menu-active-transform: none;
|
|
25
|
+
--rc-fab-menu-transition: none;
|
|
26
|
+
--rc-fab-menu-popup-duration: 0ms;
|
|
27
|
+
--rc-fab-menu-trigger-gap: var(--win31-gap-tight);
|
|
28
|
+
--rc-fab-menu-focus-ring: var(--win31-focus-ring);
|
|
29
|
+
--rc-fab-menu-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab-menu > button {
|
|
33
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
34
|
+
cursor: default;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab-menu > button:active:not(:disabled) {
|
|
38
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab-menu::part(popup) {
|
|
42
|
+
background: var(--win31-color-menu);
|
|
43
|
+
border: var(--win31-border);
|
|
44
|
+
border-radius: var(--win31-radius);
|
|
45
|
+
box-shadow: var(--win31-drop-shadow);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* A knowing anachronism, and the only one in this theme.
|
|
4
|
+
*
|
|
5
|
+
* Windows 3.1 had no floating action button and no concept that would have
|
|
6
|
+
* produced one: nothing hovered above the window, and there was no primary
|
|
7
|
+
* action promoted out of the command set. Rather than leave the component
|
|
8
|
+
* unstyled in a themed page, it is drawn as the nearest period object, a
|
|
9
|
+
* floating tool-palette button, and labelled here as the deviation it is.
|
|
10
|
+
*/
|
|
11
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab {
|
|
12
|
+
--rc-fab-bg: var(--win31-color-surface);
|
|
13
|
+
--rc-fab-bg-hover: var(--win31-color-surface);
|
|
14
|
+
--rc-fab-color: var(--win31-color-frame);
|
|
15
|
+
--rc-fab-border: var(--win31-border);
|
|
16
|
+
--rc-fab-radius: var(--win31-radius);
|
|
17
|
+
--rc-fab-size: var(--win31-toolbar-height);
|
|
18
|
+
--rc-fab-gap: var(--win31-gap-tight);
|
|
19
|
+
--rc-fab-padding-block: var(--win31-padding-block);
|
|
20
|
+
--rc-fab-padding-inline: calc(8 * var(--win31-unit));
|
|
21
|
+
--rc-fab-font-family: var(--win31-font-family);
|
|
22
|
+
--rc-fab-font-size: var(--win31-font-size);
|
|
23
|
+
--rc-fab-font-weight: var(--win31-font-weight);
|
|
24
|
+
--rc-fab-letter-spacing: normal;
|
|
25
|
+
--rc-fab-shadow: none;
|
|
26
|
+
--rc-fab-shadow-hover: none;
|
|
27
|
+
--rc-fab-shadow-active: none;
|
|
28
|
+
--rc-fab-disabled-shadow: none;
|
|
29
|
+
--rc-fab-disabled-opacity: 1;
|
|
30
|
+
--rc-fab-active-transform: none;
|
|
31
|
+
--rc-fab-transition: none;
|
|
32
|
+
--rc-fab-focus-ring: var(--win31-focus-ring);
|
|
33
|
+
--rc-fab-focus-ring-offset: var(--win31-focus-ring-offset);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab > button {
|
|
37
|
+
box-shadow: var(--win31-bevel-outset-1);
|
|
38
|
+
cursor: default;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab > button:active:not(:disabled) {
|
|
42
|
+
box-shadow: var(--win31-bevel-inset-1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-fab > button:disabled {
|
|
46
|
+
color: var(--win31-color-disabled-text);
|
|
47
|
+
text-shadow: var(--win31-unit) var(--win31-unit) 0 var(--win31-color-disabled-emboss);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* A 3.1 edit control is a sunken white well with a hard one-pixel frame. The
|
|
4
|
+
* label sits outside it as plain text; there is no floating-label behavior to
|
|
5
|
+
* reproduce because the idiom did not exist yet.
|
|
6
|
+
*/
|
|
7
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field::part(field) {
|
|
8
|
+
min-block-size: var(--win31-control-height);
|
|
9
|
+
padding-block: var(--win31-padding-block);
|
|
10
|
+
padding-inline: var(--win31-padding-inline);
|
|
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-field::part(label) {
|
|
23
|
+
position: static;
|
|
24
|
+
transform: none;
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin-block-end: var(--win31-gap-tight);
|
|
27
|
+
color: var(--win31-color-frame);
|
|
28
|
+
background: transparent;
|
|
29
|
+
font-size: var(--win31-font-size);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* A grouped field's legend reads like the label above a single field. */
|
|
33
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field[data-group] > fieldset > legend {
|
|
34
|
+
margin-block-end: var(--win31-gap-tight);
|
|
35
|
+
color: var(--win31-color-frame);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field::part(supporting-text),
|
|
39
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field::part(hint),
|
|
40
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field::part(counter) {
|
|
41
|
+
color: var(--win31-color-frame);
|
|
42
|
+
font-size: var(--win31-font-size);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* 3.1 had no inline validation styling, so an error is stated in text rather
|
|
47
|
+
* than colored. The frame is left alone deliberately.
|
|
48
|
+
*/
|
|
49
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field::part(error) {
|
|
50
|
+
color: var(--win31-color-frame);
|
|
51
|
+
font-size: var(--win31-font-size);
|
|
52
|
+
font-weight: 700;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field :is(input, textarea, select) {
|
|
56
|
+
color: var(--win31-color-field-text);
|
|
57
|
+
background: transparent;
|
|
58
|
+
border: 0;
|
|
59
|
+
border-radius: var(--win31-radius);
|
|
60
|
+
font-family: var(--win31-font-family);
|
|
61
|
+
font-size: var(--win31-font-size);
|
|
62
|
+
line-height: var(--win31-line-height);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field :is(input, textarea):focus-visible {
|
|
66
|
+
outline: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31)) rc-field:focus-within::part(field) {
|
|
70
|
+
outline: var(--win31-focus-ring);
|
|
71
|
+
outline-offset: var(--win31-focus-ring-offset);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@layer rc-theme-win31.components {
|
|
2
|
+
/*
|
|
3
|
+
* Not an icon font.
|
|
4
|
+
*
|
|
5
|
+
* 3.1 iconography was one-bit and two-bit bitmap art at 16 and 32 pixels,
|
|
6
|
+
* so this sizes icon slots to those grids and turns off smoothing rather
|
|
7
|
+
* than wiring a variable font. Component-drawn affordances (scrollbar
|
|
8
|
+
* arrows, the disclosure triangle, the checkbox tick) come from the
|
|
9
|
+
* --win31-glyph-* data URIs in defaults.css instead.
|
|
10
|
+
*/
|
|
11
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
12
|
+
:where([data-rc-icon], [data-rc-navigation-icon]) {
|
|
13
|
+
display: inline-grid;
|
|
14
|
+
place-items: center;
|
|
15
|
+
inline-size: var(--rc-icon-font-size, var(--win31-check-size));
|
|
16
|
+
block-size: var(--rc-icon-font-size, var(--win31-check-size));
|
|
17
|
+
font-size: var(--rc-icon-font-size, var(--win31-check-size));
|
|
18
|
+
/*
|
|
19
|
+
* Unlayered icon-font boilerplate otherwise beats this layered theme rule.
|
|
20
|
+
* Keep the geometry invariant important, but let consumers override the
|
|
21
|
+
* normally-cascaded custom property.
|
|
22
|
+
*/
|
|
23
|
+
line-height: var(--rc-icon-font-line-height, var(--win31-check-size)) !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
27
|
+
:where([data-rc-button-icon], [data-rc-button-selected-icon], [data-rc-chip-icon]) {
|
|
28
|
+
display: inline-grid;
|
|
29
|
+
place-items: center;
|
|
30
|
+
/* Reserve the icon square while an SVG icon element is still empty. */
|
|
31
|
+
min-inline-size: 1em;
|
|
32
|
+
min-block-size: 1em;
|
|
33
|
+
font-size: var(--rc-compact-icon-font-size, var(--win31-check-size));
|
|
34
|
+
line-height: var(
|
|
35
|
+
--rc-compact-icon-font-line-height,
|
|
36
|
+
var(--rc-compact-icon-font-size, var(--win31-check-size))
|
|
37
|
+
) !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
41
|
+
rc-button[icon-only]
|
|
42
|
+
:where([data-rc-button-icon], [data-rc-button-selected-icon]) {
|
|
43
|
+
font-size: var(--rc-icon-button-icon-font-size, var(--win31-scrollbar-size));
|
|
44
|
+
line-height: var(--rc-icon-button-icon-font-size, var(--win31-scrollbar-size)) !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Period art is pixel art. Never let the UA smooth it. */
|
|
48
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
49
|
+
:where([data-rc-icon], [data-rc-navigation-icon])
|
|
50
|
+
img,
|
|
51
|
+
:where(.rc-theme-win31, :host(.rc-theme-win31))
|
|
52
|
+
:where([data-rc-icon], [data-rc-navigation-icon])
|
|
53
|
+
svg {
|
|
54
|
+
image-rendering: pixelated;
|
|
55
|
+
}
|
|
56
|
+
}
|