@macawkit/theme 0.0.0-stage → 0.1.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/src/theme.css ADDED
@@ -0,0 +1,325 @@
1
+ :root {
2
+ --key-width: 120px;
3
+ --column-width: 150px;
4
+ --tile-width: calc(var(--column-width) * 2);
5
+ --color: var(--mtt-color-main-highlight);
6
+ --shine-color: var(--mtt-color-line-decorated);
7
+ --background: var(--mtt-color-main-dimmed);
8
+ }
9
+
10
+ .info {
11
+ --background: var(--color-info);
12
+ --color: var(--color-info-highlight);
13
+ --shine-color: var(--color-info-text);
14
+ }
15
+
16
+ .signature {
17
+ --background: var(--color-signature);
18
+ --color: var(--color-signature-highlight);
19
+ --shine-color: var(--color-signature-text);
20
+ }
21
+
22
+ .success {
23
+ --background: var(--color-success);
24
+ --color: var(--color-success-highlight);
25
+ --shine-color: var(--color-success-text);
26
+ }
27
+
28
+ .priority {
29
+ --background: var(--color-priority);
30
+ --color: var(--color-priority-highlight);
31
+ --shine-color: var(--color-priority-text);
32
+ }
33
+
34
+ .warning {
35
+ --background: var(--color-warning);
36
+ --color: var(--color-warning-highlight);
37
+ --shine-color: var(--color-warning-text);
38
+ }
39
+
40
+ .danger {
41
+ --background: var(--color-danger);
42
+ --color: var(--color-danger-highlight);
43
+ --shine-color: var(--color-danger-text);
44
+ }
45
+
46
+ *, ::before, ::after {
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ html {
51
+ -webkit-font-smoothing: antialiased;
52
+ width: 100%;
53
+ height: 100%;
54
+ }
55
+
56
+ body {
57
+ background-color: var(--mtt-color-body);
58
+ color: var(--mtt-color-text);
59
+ font-family: var(--font);
60
+ line-height: var(--line-height);
61
+ }
62
+
63
+ button,
64
+ input,
65
+ select,
66
+ textarea {
67
+ font: inherit;
68
+ }
69
+
70
+ header {
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ gap: var(--margin-tight);
75
+ padding-bottom: var(--margin-tight);
76
+ margin-bottom: var(--margin);
77
+ }
78
+
79
+ header > :is(h1, h2, h3, h4, h5, h6) {
80
+ margin: 0;
81
+ flex: auto;
82
+ }
83
+
84
+ h1, h2, h3, h4, h5, h6, b, strong {
85
+ color: var(--mtt-color-text-bright);
86
+ }
87
+
88
+ h1, h2, h3, h4, small {
89
+ line-height: var(--heading-line-height);
90
+ }
91
+
92
+ body,
93
+ :is(button, .button),
94
+ nav.tabs > a {
95
+ margin: 0;
96
+ padding: 0;
97
+ }
98
+
99
+ :is(button, .button), nav a, .box, input {
100
+ position: relative;
101
+ isolation: isolate;
102
+ }
103
+
104
+ select,
105
+ input {
106
+ outline: 0;
107
+ appearance: none;
108
+ -webkit-appearance: none;
109
+ -moz-appearance: none;
110
+ }
111
+
112
+ /* Firefox draws the open list itself, in desktop colors; Chromium is told to do the same */
113
+ select:not([multiple]) :is(option, optgroup) {
114
+ background-color: Menu;
115
+ color: MenuText;
116
+ font-family: system-ui;
117
+
118
+ &:disabled {
119
+ color: GrayText;
120
+ }
121
+ }
122
+
123
+ nav.tabs > a > svg,
124
+ nav.tabs > a > img,
125
+ :is(button, .button) > svg,
126
+ :is(button, .button) > img {
127
+ width: 1.2em;
128
+ height: 1.2em;
129
+ flex-shrink: 0;
130
+ display: block;
131
+ }
132
+
133
+ nav a,
134
+ :is(button, .button) {
135
+ font-weight: 700;
136
+ white-space: nowrap;
137
+ cursor: pointer;
138
+ align-items: center;
139
+ gap: var(--margin-tight);
140
+ height: var(--element-height);
141
+ }
142
+
143
+ nav.tabs > a,
144
+ :is(button, .button) {
145
+ display: inline-flex;
146
+ justify-content: center;
147
+ padding: 0 var(--margin);
148
+ border: 0;
149
+ color: var(--mtt-color-text-bright);
150
+ background-color: var(--mtt-color-button);
151
+ }
152
+
153
+ nav:not(.tabs) a {
154
+ display: flex;
155
+ color: var(--mtt-color-text);
156
+ padding: var(--margin);
157
+ }
158
+
159
+ .small, small {
160
+ font-size: var(--decrease-font-size);
161
+ }
162
+
163
+ nav.tabs > a.small,
164
+ nav.tabs.small > a,
165
+ [role=tablist] > :is(button, .button)[role=tab].small,
166
+ .small[role=tablist] > :is(button, .button)[role=tab],
167
+ :is(button, .button).small {
168
+ color: var(--mtt-color-text-bright);
169
+ font-weight: 700;
170
+ height: var(--element-height-small);
171
+ padding: 0 var(--margin-tight);
172
+ }
173
+
174
+ nav a {
175
+ text-decoration: none;
176
+ }
177
+
178
+ nav:not(.tabs) {
179
+ display: flex;
180
+ flex-direction: column;
181
+ }
182
+
183
+ nav:not(.tabs) :is(ul, ol) {
184
+ list-style: none;
185
+ margin: 0;
186
+ padding: 0;
187
+ display: flex;
188
+ flex-direction: column;
189
+ }
190
+
191
+ nav:not(.tabs) a small {
192
+ font-family: var(--mono);
193
+ }
194
+
195
+ nav:not(.tabs) a > small:last-child:not(:first-child) {
196
+ margin-left: auto;
197
+ }
198
+
199
+ dl {
200
+ display: grid;
201
+ grid-template-columns: var(--key-width) minmax(0, 1fr);
202
+ gap: var(--margin);
203
+ }
204
+
205
+ dt, dd {
206
+ display: flex;
207
+ flex-direction: column;
208
+ }
209
+
210
+ code {
211
+ font-family: var(--mono);
212
+ color: var(--mtt-color-text-decorated);
213
+ }
214
+
215
+ .hero {
216
+ font-size: 250%;
217
+ color: var(--mtt-color-text-bright);
218
+ font-weight: 700;
219
+ }
220
+
221
+ .stack {
222
+ display: flex;
223
+ flex-direction: column;
224
+ gap: var(--margin);
225
+ }
226
+
227
+ .cols {
228
+ --rows: 1;
229
+ display: grid;
230
+ row-gap: var(--margin-tight);
231
+ column-gap: var(--margin);
232
+ grid-auto-flow: column;
233
+ grid-template-rows: repeat(var(--rows), auto);
234
+ grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
235
+ }
236
+
237
+ .tiles {
238
+ display: grid;
239
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tile-width)), 1fr));
240
+ gap: var(--margin);
241
+ align-items: start;
242
+ }
243
+
244
+ .row {
245
+ display: flex;
246
+ align-items: center;
247
+ flex-wrap: wrap;
248
+ gap: var(--margin-tight);
249
+ }
250
+
251
+ .row.between {
252
+ justify-content: space-between;
253
+ }
254
+
255
+ .tight {
256
+ gap: var(--margin-tight);
257
+ }
258
+
259
+ .well {
260
+ padding: var(--margin-tight);
261
+ background-color: var(--mtt-color-body);
262
+ }
263
+
264
+ .card {
265
+ display: flex;
266
+ flex-direction: column;
267
+ gap: var(--margin);
268
+ min-width: 0;
269
+ }
270
+
271
+ .box {
272
+ padding: var(--margin-tight);
273
+ }
274
+ .box > i.icon {
275
+ display: block;
276
+ }
277
+
278
+ label {
279
+ display: inline-flex;
280
+ align-items: center;
281
+ gap: var(--margin-tight);
282
+ cursor: pointer;
283
+ }
284
+
285
+ label > span {
286
+ display: flex;
287
+ flex-direction: column;
288
+ line-height: var(--heading-line-height);
289
+ }
290
+
291
+ fieldset {
292
+ min-inline-size: 0;
293
+ margin: 0;
294
+ padding: 0;
295
+ border: 0;
296
+ }
297
+
298
+ legend {
299
+ padding: 0;
300
+ }
301
+
302
+ .spark {
303
+ display: flex;
304
+ align-items: flex-end;
305
+ height: var(--element-height-small);
306
+ width: auto;
307
+ }
308
+
309
+ .spark > i {
310
+ display: block;
311
+ width: var(--width, 0);
312
+ background: var(--mtt-color-line-highlight);
313
+ }
314
+
315
+ :is(.info, .signature, .success, .priority, .warning, .danger) {
316
+ color: var(--color);
317
+ }
318
+
319
+ .badge, .tag {
320
+ display: inline-flex;
321
+ align-items: center;
322
+ white-space: nowrap;
323
+ color: var(--shine-color);
324
+ background-color: var(--background);
325
+ }