solarite 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.
Files changed (63) hide show
  1. package/build/build.bat +3 -0
  2. package/build/build.js +139 -0
  3. package/build/lib/rollup.min.js +11 -0
  4. package/build/lib/source-map.min.js +1 -0
  5. package/build/lib/terser.min.js +1 -0
  6. package/dist/Solarite-debug.js +4143 -0
  7. package/dist/Solarite.js +3740 -0
  8. package/dist/Solarite.min.js +4 -0
  9. package/docs/index.md +423 -0
  10. package/docs/js/Playground.js +184 -0
  11. package/docs/js/codemirror/codemirror6.js +32036 -0
  12. package/docs/js/codemirror/themeSolarIce.js +312 -0
  13. package/docs/js/documentation.js +32 -0
  14. package/docs/js/ui/CodeEditor.js +840 -0
  15. package/docs/js/ui/DarkToggle.js +52 -0
  16. package/docs/js/ui/FlexResizer.js +142 -0
  17. package/docs/js/util/Draggable2.js +151 -0
  18. package/docs/js/util/Errors.js +9 -0
  19. package/docs/js/util/Html.js +147 -0
  20. package/docs/js/util/Icons.js +623 -0
  21. package/docs/js/util/Input.js +253 -0
  22. package/docs/js/util/Util.js +88 -0
  23. package/docs/js/util/delve.js +43 -0
  24. package/docs/media/FiraCode400.woff2 +0 -0
  25. package/docs/media/cabin-latin-700.woff2 +0 -0
  26. package/docs/media/documentation.css +93 -0
  27. package/docs/media/eternium.css +1123 -0
  28. package/docs/media/solarite-machine.webp +0 -0
  29. package/index.html +325 -0
  30. package/package.json +33 -0
  31. package/readme.md +3 -0
  32. package/src/solarite/ExprPath.js +554 -0
  33. package/src/solarite/MultiValueMap.js +65 -0
  34. package/src/solarite/NodeGroup.js +706 -0
  35. package/src/solarite/NodeGroupManager.js +582 -0
  36. package/src/solarite/Shell.js +307 -0
  37. package/src/solarite/Solarite.js +19 -0
  38. package/src/solarite/Template.js +85 -0
  39. package/src/solarite/Util.js +264 -0
  40. package/src/solarite/createSolarite.js +267 -0
  41. package/src/solarite/getArg.js +99 -0
  42. package/src/solarite/hash.js +101 -0
  43. package/src/solarite/r.js +143 -0
  44. package/src/solarite/udomdiff.js +233 -0
  45. package/src/solarite/watch.js +302 -0
  46. package/src/solarite/watch2.js +439 -0
  47. package/src/unused/FastLookupArray.js +54 -0
  48. package/src/unused/Hashes.js +339 -0
  49. package/src/unused/InUse.test.js +92 -0
  50. package/src/unused/InUseMap.js +98 -0
  51. package/src/unused/LinkedList.js +117 -0
  52. package/src/unused/LinkedList.test.js +115 -0
  53. package/src/unused/Perf.js +47 -0
  54. package/src/unused/Template.js +108 -0
  55. package/src/util/Errors.js +9 -0
  56. package/src/util/Util.js +88 -0
  57. package/src/util/delve.js +43 -0
  58. package/tests/Benchmark.test.js +319 -0
  59. package/tests/NodeGroup.test.js +115 -0
  60. package/tests/Shell.test.js +75 -0
  61. package/tests/Solarite.test.js +2896 -0
  62. package/tests/Testimony.js +602 -0
  63. package/tests/index.html +75 -0
@@ -0,0 +1,1123 @@
1
+ /**
2
+ * Eternium CSS framework.
3
+ * License: MIT
4
+ * https://github.com/Vorticode/eternium
5
+ *
6
+ * Provide custom layout and form element styles ONLY for elements inside the .eternium class.
7
+ * And colorizes elements with a light and dark style.
8
+ * Add 'light' or 'dark' attributes to the <html> tag.
9
+ * It's recommended to use javascript to set this attribute from prefers-color-scheme on page load.
10
+ *
11
+ * TODO: Make input sizes and gap/pad sizes match?
12
+ * TODO: Support more elements from https://preview.tabler.io/form-elements.html
13
+ * TODO: Phase out pad-tiny-small in projects.
14
+ * TODO: Remove old eternium-forms class.
15
+ */
16
+
17
+
18
+ /* ┌─────────────────╮
19
+ * |Variables |
20
+ * └─────────────────╯*/
21
+
22
+ /* Light Colors */
23
+ :root:not([dark]):is(.eternium, .eternium-style, .eternium-forms),
24
+ :root:not([dark]) :is(.eternium, .eternium-style, .eternium-forms) {
25
+ /* Palette */
26
+ --text: #333;
27
+ --background: white;
28
+ --invert: black;
29
+
30
+ --shade1: #e4e8ed;
31
+ --shade2: #cbcfd7;
32
+ --shade3: #b6bac1; /* Unused? */
33
+ --shade4: #aeb3be;
34
+ --invalid: #900;
35
+ --shadow: 0 0 5px #0006;
36
+
37
+ /* Primary Colors */
38
+ --primary: #07c;
39
+ --primary2: #08e;
40
+ --primary-text: white;
41
+ --primary-border-focus: black;
42
+
43
+ /* Elements */
44
+ --secondary: var(--shade2);
45
+ --secondary-background-hover: var(--shade4);
46
+ --secondary-border-hover: var(--shade4);
47
+ --input-background: white;
48
+ --input-border: var(--shade2);
49
+
50
+ --card-background: white;
51
+ --card-border: var(--border-width) solid transparent; /* same width as visible border on dark mode. */
52
+
53
+ --border: var(--border-width) solid var(--shade2);
54
+ --border-focus: var(--border-width) solid var(--primary2);
55
+
56
+ /* Table */
57
+ --table-header-background: var(--shade1);
58
+ --table-border: 1px solid var(--shade1);
59
+ --table-background: white;
60
+ }
61
+
62
+ /* Dark Colors */
63
+ :root[dark]:is(.eternium, .eternium-style, .eternium-forms),
64
+ :root[dark] :is(.eternium, .eternium-style, .eternium-forms) {
65
+
66
+ /* Palette */
67
+ --text: #bcc3c8;
68
+ --background: black;
69
+ --invert: white;
70
+
71
+ --shade1: #06090c;
72
+ --shade2: #0f1318;
73
+ --shade3: #2a3239;
74
+ --shade4: #3d474f;
75
+
76
+ --invalid: #900;
77
+ --shadow: 0 0 12px #000f;
78
+
79
+ /* Primary Buttons */
80
+ --primary: #048;
81
+ --primary2: #05a;
82
+ --primary-text: white;
83
+ --primary-border-focus: white;
84
+
85
+ /** Elements */
86
+ --secondary: var(--shade3);
87
+ --secondary-background-hover: var(--shade4);
88
+ --secondary-border-hover: var(--shade4);
89
+ --input-background: var(--shade1);
90
+ --input-border: var(--shade3);
91
+
92
+ --card-background: var(--shade2);
93
+ --card-border: var(--border);
94
+
95
+ --border: var(--border-width) solid var(--shade3);
96
+ --border-focus: var(--border-width) solid var(--primary2);
97
+
98
+ /* Table */
99
+ --table-header-background:var(--shade3);
100
+ --table-border: 1px solid var(--shade3);
101
+ --table-background: var(--shade2);
102
+ }
103
+
104
+
105
+ .eternium, .eternium-style, .eternium-forms {
106
+ --input-small: 18px;
107
+ --input-normal: 24px;
108
+ --input-big: 32px;
109
+ --input-huge: 44px;
110
+
111
+ --border-width: 1px;
112
+ --border-radius: 3px;
113
+ --icon-size: 20px;
114
+
115
+ --table-padding: 4px 8px;
116
+
117
+ /* Buttons */
118
+ --primary-background: var(--primary);
119
+ --primary-border: var(--border-width) solid var(--primary);
120
+
121
+ --primary-background-hover: var(--primary2);
122
+ --primary-border-hover: var(--border-width) solid var(--primary2);
123
+
124
+ --secondary-background: var(--secondary);
125
+ --secondary-border: var(--border-width) solid var(--secondary);
126
+ }
127
+
128
+
129
+ /* ┌─────────────────╮
130
+ * |Scrollbars |
131
+ * └─────────────────╯*/
132
+ :root[dark]:is(.eternium, .eternium-style, .eternium-forms),
133
+ :root[dark] :is(.eternium, .eternium-style, .eternium-forms) {
134
+ /*noinspection CssInvalidPropertyValue*/scrollbar-color: dark;
135
+
136
+ ::-webkit-scrollbar { background: transparent }
137
+ ::-webkit-scrollbar-track,
138
+ ::-webkit-scrollbar-corner { background: transparent }
139
+ ::-webkit-scrollbar-thumb { background: var(--shade4); border-radius: var(--border-radius) }
140
+ }
141
+
142
+ /* Form validation. Hide fields used by validate.js */
143
+ .eternium, .eternium-forms {
144
+
145
+ /* ┌─────────────────╮
146
+ * |Normalize |
147
+ * └─────────────────╯*/
148
+ body { background: var(--background); color: var(--text) }
149
+ button, input, optgroup, select, textarea { font-family: inherit; font-size: 100% }
150
+
151
+ /**
152
+ * Prevent `sub` and `sup` elements from affecting the line height in all browsers. */
153
+ sub, sup {line-height: 0 }
154
+
155
+ dialog { z-index: 1000;
156
+ &::backdrop { background: #0008 }
157
+ }
158
+
159
+ :focus-visible { outline: none } /* Remove browser's default outline */
160
+ hr { border: none; border-bottom: var(--border) }
161
+
162
+
163
+
164
+ /* ┌─────────────────╮
165
+ * |Misc |
166
+ * └─────────────────╯*/
167
+
168
+ /* Labels */
169
+ .label { font-size :85%; font-weight: bold; user-select: none }
170
+
171
+ /* Misc */
172
+ .little { font-size: 80%; line-height: 1.1 }
173
+ :is(.muted,.faint) { opacity: .66; } /* faint is deprecated */
174
+
175
+
176
+
177
+ a:focus-visible:not(.no-outline) { outline: var(--border-focus) }
178
+ .no-select { user-select: none }
179
+
180
+ /* Placeholder + Contenteditable placeholder */
181
+ ::placeholder { color: inherit; opacity: .6 }
182
+ [placeholder]:empty {
183
+ &:before { content: attr(placeholder); opacity: .6; white-space: nowrap; cursor: text }
184
+ &:is(:focus,.focus):before { content: '' }
185
+ }
186
+
187
+ /* Card
188
+ * Must appear before row/col so those can override the display to be flex. */
189
+ .card { box-sizing: border-box; background: var(--card-background); box-shadow: var(--shadow);
190
+ &:not(.square) { border-radius: var(--border-radius) }
191
+ &:not(.flat) { border: var(--card-border) }
192
+ }
193
+
194
+
195
+
196
+ /* ┌─────────────────╮
197
+ * |Alerts |
198
+ * └─────────────────╯*/
199
+ .info-alert { background: #cdf; color: #347; padding: 8px 16px } /* TODO Have user add padding manually? Or match input box size? */
200
+ .success-alert { background: #cfd; color: #374; padding: 8px 16px }
201
+ .warning-alert { background: #fec; color: #863; padding: 8px 16px }
202
+ .error-alert { background: #fcc; color: #833; padding: 8px 16px }
203
+
204
+
205
+
206
+ /* ┌─────────────────╮
207
+ * |Form Validation |
208
+ * └─────────────────╯*/
209
+
210
+ /* Form Validation */
211
+ .invalid { border-color: var(--invalid) !important; outline-color: var(--invalid) !important }
212
+
213
+ /* Hide validation messages by default. */
214
+ [data-pattern], [data-min], [data-max], [data-minlength], [data-maxlength], [data-required], [data-step], [data-type],
215
+ [data-validate]:not(input, .input, select, textarea), [data-validate2], [data-validate3], [data-validate4] {
216
+ color: var(--invalid); display: none
217
+ }
218
+
219
+
220
+
221
+ /* ┌─────────────────╮
222
+ * |Input+Btn Height |
223
+ * └─────────────────╯*/
224
+ /* Height */
225
+ input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range]),
226
+ .input:not([contenteditable]), select, button, .button {
227
+ box-sizing: border-box; padding-top: 0; padding-bottom: 0;
228
+ min-height: var(--input-normal)
229
+ }
230
+
231
+ textarea, [contenteditable].input {
232
+ box-sizing: border-box;
233
+ min-height: var(--input-normal);
234
+ padding-top: calc((var(--input-normal) - 1lh) / 2 - var(--border-width)) /* Make text line up vertically with inputs. Top half of the diff between input height and text height*/
235
+ }
236
+
237
+ /* ┌─────────────────╮
238
+ * |Input |
239
+ * └─────────────────╯*/
240
+ .input, select, textarea,
241
+ input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range],[type=button],[type=reset],[type=submit]) {
242
+ min-width: 0; color: var(--text);
243
+ &:not(.square, .flat) { border-radius: var(--border-radius); }
244
+ &:not(.flat) {
245
+ background: var(--input-background);
246
+ border: var(--border-width) solid var(--input-border); vertical-align: top; padding-left: var(--tiny); padding-right: var(--tiny);
247
+ }
248
+ }
249
+
250
+ /* Input focus */
251
+ :is(
252
+ input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range],[type=button],[type=reset],[type=submit]),
253
+ .input, select, textarea):not(.flat,.no-outline):is(:focus-within,.focus) {
254
+ outline: var(--border-focus); outline-offset: -1px; z-index: 2 /* z-index lets it the border be on top when inside .group */
255
+ }
256
+ input[type=file]:not(.no-outline):is(:focus-within, .focus) { outline: var(--border-focus) } /* Can't style file, but at least make the focus look similar. */
257
+
258
+ /* Input focus:invalid */
259
+ :is(
260
+ input:not([type=checkbox],[type=hidden],[type=image],[type=radio],[type=range],[type=button],[type=reset],[type=submit]),
261
+ .input, select, textarea):not(.flat):is(:focus-within,.focus):invalid {
262
+ outline-color: red
263
+ }
264
+
265
+
266
+
267
+ /* ┌─────────────────╮
268
+ * |Buttons |
269
+ * └─────────────────╯*/
270
+ :is(.button, button, input:is([type=button],[type=submit],[type=reset])) {
271
+ & {
272
+ box-sizing: border-box; display: inline-flex; user-select: none; text-align: center; color: var(--text); align-items: center }
273
+ &:not([disabled]) {
274
+ cursor: pointer }
275
+ &:not(.square, .flat) {
276
+ border-radius: var(--border-radius) }
277
+ &:not(.flat) {
278
+ line-height: normal;
279
+ border: var(--secondary-border); background: var(--secondary-background);
280
+ padding-left: var(--normal);
281
+ padding-right: var(--normal);
282
+ }
283
+
284
+ /* Button Hover/Focus */
285
+ &:not([disabled],.flat):is(:hover,.hover,.selected) {
286
+ background: var(--secondary-background-hover); border: var(--border-width) solid var(--secondary-border-hover);
287
+ color: var(--invert)}
288
+ &:not(.no-outline):is(:focus-visible,.focus) { outline: var(--border-focus); outline-offset: -1px; z-index: 2 }
289
+ &:is([disabled]) { cursor: default; opacity: .5 }
290
+
291
+ /* Button Primary */
292
+ &.primary {
293
+ &:not(.flat) { background: var(--primary-background); border: var(--primary-border) }
294
+ &:not(.flat) { color: var(--primary-text) }
295
+ &:is(:active,:hover,.active,.hover,.selected):not([disabled]) {
296
+ background: var(--primary-background-hover); border: var(--primary-border-hover); color: var(--primary-text) }
297
+ &:not(.no-outline):is(:focus-visible,.focus){
298
+ outline: var(--border-width) solid var(--primary-border-focus); outline-offset: -1px; z-index: 2 }
299
+ }
300
+ a:is(.button, .button:hover) { text-decoration: none }
301
+
302
+
303
+
304
+ /* ┌─────────────────╮
305
+ * |Button Status |
306
+ * └─────────────────╯*/
307
+ /* TODO: Let inputs have status also. */
308
+ &:is(.loading,.error,.complete) { position: relative;
309
+ &:after { position: relative; margin-right: -16px; top: 1px; left: 1px; }
310
+ &.primary:after { filter: invert(100%) }
311
+ }
312
+
313
+ &.loading:after {
314
+ content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path style="transform-origin: center" fill="currentColor" d="M13 2v2c4.39.54 7.5 4.53 6.96 8.92A8.014 8.014 0 0 1 13 19.88v2c5.5-.6 9.45-5.54 8.85-11.03C21.33 6.19 17.66 2.5 13 2m-2 0c-1.96.18-3.81.95-5.33 2.2L7.1 5.74c1.12-.9 2.47-1.48 3.9-1.68V2M4.26 5.67A9.81 9.81 0 0 0 2.05 11h2c.19-1.42.75-2.77 1.64-3.9L4.26 5.67M2.06 13c.2 1.96.97 3.81 2.21 5.33l1.42-1.43A8.002 8.002 0 0 1 4.06 13h-2m5 5.37l-1.39 1.37A9.994 9.994 0 0 0 11 22v-2a8.002 8.002 0 0 1-3.9-1.63h-.04Z"><animateTransform attributeName="transform" type="rotate" from="0 0 0" to="360 0 0" dur="2s" repeatCount="indefinite" /></path></svg>');
315
+ }
316
+ &.complete:after {
317
+ content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M13 2.03v2.02c4.39.54 7.5 4.53 6.96 8.92c-.46 3.64-3.32 6.53-6.96 6.96v2c5.5-.55 9.5-5.43 8.95-10.93c-.45-4.75-4.22-8.5-8.95-8.97m-2 .03c-1.95.19-3.81.94-5.33 2.2L7.1 5.74c1.12-.9 2.47-1.48 3.9-1.68v-2M4.26 5.67A9.885 9.885 0 0 0 2.05 11h2c.19-1.42.75-2.77 1.64-3.9L4.26 5.67M15.5 8.5l-4.88 4.88l-2.12-2.12l-1.06 1.06l3.18 3.18l5.94-5.94L15.5 8.5M2.06 13c.2 1.96.97 3.81 2.21 5.33l1.42-1.43A8.002 8.002 0 0 1 4.06 13h-2m5.04 5.37l-1.43 1.37A9.994 9.994 0 0 0 11 22v-2a8.002 8.002 0 0 1-3.9-1.63Z"/></svg>');
318
+ }
319
+ &.error:after {
320
+ content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M13 2v2c4.39.54 7.5 4.53 6.96 8.92A8.014 8.014 0 0 1 13 19.88v2c5.5-.6 9.45-5.54 8.85-11.03C21.33 6.19 17.66 2.5 13 2m-2 0c-1.96.18-3.81.95-5.33 2.2L7.1 5.74c1.12-.9 2.47-1.48 3.9-1.68v-2M4.26 5.67A9.81 9.81 0 0 0 2.05 11h2c.19-1.42.75-2.77 1.64-3.9L4.26 5.67M2.06 13c.2 1.96.97 3.81 2.21 5.33l1.42-1.43A8.002 8.002 0 0 1 4.06 13h-2m5 5.37l-1.39 1.37A9.994 9.994 0 0 0 11 22v-2a8.002 8.002 0 0 1-3.9-1.63h-.04M13 13V7h-2v6h2m0 4v-2h-2v2h2Z"/></svg>');
321
+ }
322
+
323
+
324
+
325
+ /* ┌─────────────────╮
326
+ * |Button Sizes |
327
+ * └─────────────────╯*/
328
+
329
+ /* Small buttons. */
330
+ /* We calculate how much vertical padding space is left after using line height and border: */
331
+ &.small {
332
+ min-height: var(--input-small); padding: calc((var(--input-small) - 1lh) / 2 - var(--border-width)) calc(var(--input-small) / 2)
333
+ }
334
+
335
+ /* Big buttons . */
336
+ &.big:not(.wt) {
337
+ height: var(--input-big); padding: calc((var(--input-big) - 1lh) / 2 - var(--border-width)) calc(var(--input-big))
338
+ }
339
+
340
+ /* Huge buttons */
341
+ &.huge:not(.wt) {
342
+ height: var(--input-huge); padding: calc((var(--input-huge) - 1lh) / 2 - var(--border-width)) calc(var(--input-huge))
343
+ }
344
+ }
345
+
346
+
347
+
348
+ /* ┌─────────────────╮
349
+ * |Input Sizes |
350
+ * └─────────────────╯*/
351
+ :is(button, .button, input, select).small {
352
+ height: var(--input-small); /* Needed for <select> to get it to shrink its height. */
353
+ }
354
+
355
+ input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range],[type=button],[type=reset],[type=submit]),
356
+ .input, select, textarea {
357
+
358
+ &.small { min-height: var(--input-small); padding: calc((var(--input-small) - 1lh) / 2 - var(--border-width)) calc(var(--input-small) / 4) }
359
+ &.big { min-height: var(--input-big); padding: calc((var(--input-big) - 1lh) / 2 - var(--border-width)) calc(var(--input-big) / 3) }
360
+ &.huge { min-height: var(--input-huge); padding: calc((var(--input-huge) - 1lh) / 2 - var(--border-width)) calc(var(--input-huge) / 3) }
361
+ }
362
+
363
+
364
+
365
+ /* ┌─────────────────╮
366
+ * |Flat |
367
+ * └─────────────────╯*/
368
+ /* Flat Buttons + Inputs have no bg, border, or padding. Good for toolbars. */
369
+ :is(input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range]),
370
+ .input, select, textarea, button, .button).flat {
371
+ border: var(--border-width) solid transparent; background: transparent;
372
+ }
373
+ :is(input:not([type=checkbox],[type=file],[type=hidden],[type=image],[type=radio],[type=range],[type=button],[type=reset],[type=submit]),
374
+ .input, select, textarea, button, .button).flat:is(:focus-visible,.focus) {
375
+ outline: var(--border-focus)
376
+ }
377
+
378
+ :is(button, .button, [type=button],[type=reset],[type=submit]):not([disabled]).flat:is(.selected, :hover) {
379
+ border: var(--border-width) solid var(--secondary-background-hover); background: var(--secondary-background-hover);
380
+ color: var(--invert)
381
+ }
382
+ .input:focus-within :focus-within { outline: none !important }
383
+
384
+
385
+
386
+ /* ┌─────────────────╮
387
+ * |Grouped |
388
+ * └─────────────────╯*/
389
+ /* Grouped inputs + buttons share borders */
390
+ .group { display: flex }
391
+ .group > :is(:not(:first-child), .group-left),
392
+ .group > :is(:not(:first-child), .group-left) :is(input, .input, select, textarea, button),
393
+ .group > input[type=checkbox]:is(.normal,.big,.huge):is(:not(:first-child), .group-left):before,
394
+ .group > :is(:not(:first-child), .group-left) input[type=checkbox]:is(.normal,.big,.huge):before {
395
+ margin-left: -1px; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;
396
+ }
397
+ .group > :is(:not(:last-child), .group-right),
398
+ .group > :is(:not(:last-child), .group-right) :is(input, .input, select, textarea, button),
399
+ .group > input[type=checkbox]:is(.normal,.big,.huge):is(:not(:last-child), .group-right):before,
400
+ .group > :is(:not(:last-child), .group-right) input[type=checkbox]:is(.normal,.big,.huge):before {
401
+ border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important;
402
+ }
403
+
404
+
405
+
406
+ /* ┌─────────────────╮
407
+ * |Checkboxes |
408
+ * └─────────────────╯*/
409
+ /* Allow us to customize the border on checkboxes when they're invalid. */
410
+ [type=checkbox] {
411
+ appearance:none; outline: none; content: none; margin: 0; vertical-align: text-top;
412
+ &:before { content: "✓"; box-sizing: border-box;
413
+ align-items: center; justify-content: center; color: transparent; background: var(--input-background);
414
+ display: inline-flex; width: .9rem; height: .9rem; font: bold .75rem Arial; line-height: 0;}
415
+ &:not(.flat,.square):before { border-radius: var(--border-radius) }
416
+ &:not(.flat):before { border: var(--border-width) solid var(--input-border) }
417
+ &:not(.no-outline):is(:focus-visible,.focus):before { outline: var(--border-focus); outline-offset: -1px; z-index: 2; position: relative } /* relative needed for z-index to work */
418
+
419
+ /* Checkbox gets primary style when checked. */
420
+ &:checked:before { color: white; background: var(--primary-background) }
421
+ &:checked:is(:focus-visible,.focus):before { outline: var(--border-width) solid var(--primary-border-focus) }
422
+
423
+ /* Various sizes of checkboxes */
424
+ &.small:before {
425
+ width: var(--input-small);
426
+ height: var(--input-small);
427
+ font-size: calc(var(--input-small) * .75) }
428
+ &.normal:before {
429
+ width: var(--input-normal);
430
+ height: var(--input-normal);
431
+ font-size: calc(var(--input-normal) * .75) }
432
+ &.big:before {
433
+ width: var(--input-big);
434
+ height: var(--input-big);
435
+ font-size: calc(var(--input-big) * .75) }
436
+ &.huge:before {
437
+ width: var(--input-huge);
438
+ height: var(--input-huge);
439
+ font-size: calc(var(--input-huge) * .75) }
440
+ }
441
+
442
+
443
+
444
+ /* ┌─────────────────╮
445
+ * |Data table |
446
+ * └─────────────────╯*/
447
+ /* One border around the whole table, and then right and bottom borders on each cell that's not the last in the row/column.
448
+ * To quickly give a table a different padding size, you can set style="--table-padding: 2px 10px" */
449
+ .data-table {
450
+ border-collapse: collapse; background: var(--table-background); border: var(--table-border); font-size: inherit;
451
+
452
+ :is(thead,.thead,tfoot,.tfoot) { background: var(--table-header-background) }
453
+ :is(th,.th) { padding: var(--table-padding); border-bottom: var(--table-border);
454
+ text-align: left; user-select: none; font-weight: 500; white-space: nowrap }
455
+ :is(thead,.thead) :is(th,.th) { vertical-align: bottom } /* column headers */
456
+ :is(tbody,.tbody,tfoot,.tfoot) :is(th,.th) { vertical-align: top } /* row headers, footer */
457
+
458
+ :is(td,.td) { padding: var(--table-padding) }
459
+ :is(th,.th,td,.td):not(:last-child) { border-right: var(--table-border) }
460
+ :is(tr,.tr):not(:last-child) :is(td,.td) { border-bottom: var(--table-border) }
461
+ }
462
+
463
+
464
+
465
+ /* ┌─────────────────╮
466
+ * |Experimental |
467
+ * └─────────────────╯*/
468
+ /* These may change in the future. */
469
+
470
+ /* drop-menu */
471
+ /* A menu with expandable sub-items. */
472
+ .drop-menu ul {
473
+ list-style: none; margin: 0; padding: 0;
474
+ &:not(:hover) ul { transition: visibility 0s; transition-delay: .6s }
475
+ &:hover > ul:not(:hover) { transition: visibility 0s; transition-delay: 0s; display: none }
476
+ a { display: block }
477
+ li { position: relative }
478
+ ul { visibility: hidden; position: absolute; top: 100%; left: 0; z-index: 1 }
479
+ ul ul { top: 0; left: 100% }
480
+ li:hover > ul { visibility: visible; transition-delay: 0s }
481
+ }
482
+
483
+ /* menu-item */
484
+ /* A combination of: class="row pad-h-small pad-v-micro gap-small button center-v" */
485
+ .menu-item {
486
+ display: flex; align-items: center; padding: 4px 8px; gap: 8px; color: var(--text);
487
+ user-select: none; cursor: pointer;
488
+ &:hover { background: var(--primary-background); color: var(--primary-text) }
489
+ }
490
+
491
+ /* Icon */
492
+ .icon { font-size: var(--icon-size);
493
+ min-width: var(--icon-size); max-width: var(--icon-size); min-height: var(--icon-size); max-height: var(--icon-size);
494
+ &:not([disabled]) { cursor: pointer;
495
+ &.selected { color: var(--primary2) }
496
+ }
497
+ }
498
+ }
499
+
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+ /* ┌─────────────────╮
509
+ * |Grid |
510
+ * └─────────────────╯*/
511
+ .eternium, .eternium-layout {
512
+
513
+ /* Dimensions */
514
+ --micro: 2px;
515
+ --tiny: 4px;
516
+ --small: 8px;
517
+ --normal: 16px;
518
+ --big: 24px;
519
+ --huge: 48px;
520
+
521
+ /* Rows and column layout. These can occor on the same element with :is(.eternium, .eternium-style)
522
+ * Unlike bootstrap, a col class will stack each of its children into a column,
523
+ * and having a col class for each item in a row isn't necessary.*/
524
+ .row { display: flex; align-items: start } /* align-items: start prevents stretching to available height */
525
+ .col { display: flex; flex-direction: column; align-items: start;
526
+ > * { max-width: 100% } /* Don't let children be wider than the column */
527
+ }
528
+
529
+ /* Gaps */
530
+ .gap-micro { gap: var(--micro) }
531
+ .gap-tiny { gap: var(--tiny) }
532
+ .gap-small { gap: var(--small) }
533
+ .gap { gap: var(--normal) }
534
+ .gap-big { gap: var(--big) }
535
+ .gap-huge { gap: var(--huge) }
536
+
537
+
538
+ /* Pad */
539
+ /* We need :not(#wt) to override the css weight of input pad-left and pad-right above.*/
540
+ :not(#wt).pad-micro { padding: var(--micro) }
541
+ :not(#wt).pad-tiny { padding: var(--tiny) }
542
+ :not(#wt).pad-small { padding: var(--small) }
543
+ :not(#wt).pad { padding: var(--normal) }
544
+ :not(#wt).pad-big { padding: var(--big) }
545
+ :not(#wt).pad-huge { padding: var(--huge) }
546
+
547
+ :not(#wt).pad-h-micro { padding-left: var(--micro); padding-right: var(--micro) }
548
+ :not(#wt).pad-h-tiny { padding-left: var(--tiny); padding-right: var(--tiny) }
549
+ :not(#wt).pad-h-small { padding-left: var(--small); padding-right: var(--small) }
550
+ :not(#wt).pad-h { padding-left: var(--normal); padding-right: var(--normal) }
551
+ :not(#wt).pad-h-big { padding-left: var(--big); padding-right: var(--big) }
552
+ :not(#wt).pad-h-huge { padding-left: var(--huge); padding-right: var(--huge) }
553
+
554
+ :not(#wt).pad-v-micro { padding-top: var(--micro); padding-bottom: var(--micro) }
555
+ :not(#wt).pad-v-tiny { padding-top: var(--tiny); padding-bottom: var(--tiny) }
556
+ :not(#wt).pad-v-small { padding-top: var(--small); padding-bottom: var(--small) }
557
+ :not(#wt).pad-v { padding-top: var(--normal); padding-bottom: var(--normal) }
558
+ :not(#wt).pad-v-big { padding-top: var(--big); padding-bottom: var(--big) }
559
+ :not(#wt).pad-v-huge { padding-top: var(--huge); padding-bottom: var(--huge) }
560
+
561
+
562
+ /* Alignment */
563
+ .row.left { justify-content: start }
564
+ .col.left { align-items: start }
565
+
566
+ .row.right { justify-content: end }
567
+ .col.right { align-items: end }
568
+
569
+ .row.top { align-items: start }
570
+ .col.top { justify-content: start }
571
+
572
+ .row.bottom { align-items: end }
573
+ .col.bottom { justify-content: end }
574
+
575
+ :is(.row,.col).stretch { align-items: stretch }
576
+ :is(.row,.col).stretch > * { flex: 1 }
577
+
578
+ .row.stretch-h > * { flex: 1 }
579
+ .row.stretch-v { align-items: stretch }
580
+
581
+ .col.stretch-h { align-items: stretch }
582
+ .col.stretch-v > * { flex: 1 }
583
+
584
+ .row:is(.center, .center-h) { justify-content: center }
585
+ .col:is(.center, .center-h) { align-items: center }
586
+
587
+ .row:is(.center, .center-v) { align-items: center }
588
+ .col:is(.center, .center-v) { justify-content: center }
589
+
590
+ /* Spacing */
591
+ .space-between { justify-content: space-between }
592
+ .space-around { justify-content: space-around }
593
+ .space-evenly { justify-content: space-evenly }
594
+
595
+ /* Wrap */
596
+ .wrap { flex-wrap: wrap }
597
+ :is(.no-wrap, .nowrap) { flex-wrap: nowrap; white-space: nowrap }
598
+
599
+
600
+ /* ┌─────────────────╮
601
+ * |Dimensions |
602
+ * └─────────────────╯*/
603
+
604
+ /* Fixed
605
+ * using width: clamp(1rem, 1rem 1rem); doesn't do the same thing as setting-min-width and max-width.
606
+ * A flex: 1 will still override the former.
607
+ */
608
+ .rem1 { min-width: 1rem; max-width: 1rem }
609
+ .rem2 { min-width: 2rem; max-width: 2rem }
610
+ .rem3 { min-width: 3rem; max-width: 3rem }
611
+ .rem4 { min-width: 4rem; max-width: 4rem }
612
+ .rem5 { min-width: 5rem; max-width: 5rem }
613
+ .rem6 { min-width: 6rem; max-width: 6rem }
614
+ .rem7 { min-width: 7rem; max-width: 7rem }
615
+ .rem8 { min-width: 8rem; max-width: 8rem }
616
+ .rem9 { min-width: 9rem; max-width: 9rem }
617
+ .rem10 { min-width: 10rem; max-width: 10rem }
618
+ .rem11 { min-width: 11rem; max-width: 11rem }
619
+ .rem12 { min-width: 12rem; max-width: 12rem }
620
+ .rem13 { min-width: 13rem; max-width: 13rem }
621
+ .rem14 { min-width: 14rem; max-width: 14rem }
622
+ .rem15 { min-width: 15rem; max-width: 15rem }
623
+ .rem16 { min-width: 16rem; max-width: 16rem }
624
+
625
+ /* Experimental - replace .rem's? */
626
+ .px10 { min-width: 10px; max-width: 10px }
627
+ .px20 { min-width: 20px; max-width: 20px }
628
+ .px30 { min-width: 30px; max-width: 30px }
629
+ .px40 { min-width: 40px; max-width: 40px }
630
+ .px50 { min-width: 50px; max-width: 50px }
631
+ .px60 { min-width: 60px; max-width: 60px }
632
+ .px70 { min-width: 70px; max-width: 70px }
633
+ .px80 { min-width: 80px; max-width: 80px }
634
+ .px90 { min-width: 90px; max-width: 90px }
635
+ .px100 { min-width: 100px; max-width: 100px }
636
+ .px120 { min-width: 120px; max-width: 120px }
637
+ .px150 { min-width: 150px; max-width: 150px }
638
+ .px200 { min-width: 200px; max-width: 200px }
639
+ .px250 { min-width: 250px; max-width: 250px }
640
+ .px300 { min-width: 300px; max-width: 300px }
641
+ .px350 { min-width: 350px; max-width: 350px }
642
+ .px400 { min-width: 400px; max-width: 400px }
643
+ .px450 { min-width: 450px; max-width: 450px }
644
+ .px500 { min-width: 500px; max-width: 500px }
645
+ .px550 { min-width: 550px; max-width: 550px }
646
+ .px600 { min-width: 800px; max-width: 800px }
647
+ .px650 { min-width: 850px; max-width: 850px }
648
+ .px700 { min-width: 700px; max-width: 700px }
649
+ .px750 { min-width: 750px; max-width: 750px }
650
+ .px800 { min-width: 800px; max-width: 800px }
651
+ .px850 { min-width: 850px; max-width: 850px }
652
+ .px900 { min-width: 900px; max-width: 900px }
653
+ .px950 { min-width: 950px; max-width: 950px }
654
+ .px1000 { min-width: 1000px; max-width: 1000px }
655
+
656
+ /* Percents in thirds, fourths, and tenths. */
657
+ .pc10 { width: 10% }
658
+ .pc20 { width: 20% }
659
+ .pc25 { width: 25% }
660
+ .pc30 { width: 30% }
661
+ .pc33 { width: 33.333% }
662
+ .pc40 { width: 40% }
663
+ .pc50 { width: 50% }
664
+ .pc60 { width: 60% }
665
+ .pc66 { width: 66.666% }
666
+ .pc70 { width: 70% }
667
+ .pc75 { width: 70% }
668
+ .pc80 { width: 80% }
669
+ .pc90 { width: 90% }
670
+ .pc100 { width: 100% }
671
+
672
+ /* Flex */
673
+ .flex1, .expand { flex: 1 }
674
+ .flex2 { flex: 2 }
675
+ .flex3 { flex: 3 }
676
+ .flex4 { flex: 4 }
677
+ .flex5 { flex: 5 }
678
+ .flex6 { flex: 6 }
679
+ .flex7 { flex: 7 }
680
+ .flex8 { flex: 8 }
681
+ .flex9 { flex: 9 }
682
+ .flex10 { flex: 10 }
683
+ .flex11 { flex: 11 }
684
+ .flex12 { flex: 12 }
685
+ }
686
+
687
+
688
+ /* ┌─────────────────╮
689
+ * |Grid Mobile |
690
+ * └─────────────────╯*/
691
+ @media (width < 512px) {
692
+
693
+ .eternium, .eternium-layout {
694
+
695
+
696
+ /* Row/Col */
697
+ .row-mobile { display: flex; flex-direction: row; align-items: start; justify-content: start }
698
+ .col-mobile { display: flex; flex-direction: column; align-items: start; justify-content: start }
699
+
700
+ /* Gaps */
701
+ .gap-micro-mobile { gap: var(--micro) }
702
+ .gap-tiny-mobile { gap: var(--tiny) }
703
+ .gap-small-mobile { gap: var(--small) }
704
+ .gap-mobile { gap: var(--normal) }
705
+ .gap-big-mobile { gap: var(--big) }
706
+ .gap-huge-mobile { gap: var(--huge) }
707
+
708
+ /* Pad */
709
+ :not(#wt).pad-micro-mobile { padding: var(--micro) }
710
+ :not(#wt).pad-tiny-mobile { padding: var(--tiny) }
711
+ :not(#wt).pad-small-mobile { padding: var(--small) }
712
+ :not(#wt).pad-mobile { padding: var(--normal) }
713
+ :not(#wt).pad-big-mobile { padding: var(--big) }
714
+ :not(#wt).pad-huge-mobile { padding: var(--huge) }
715
+
716
+ :not(#wt).pad-h-micro-mobile { padding-left: var(--micro); padding-right: var(--micro) }
717
+ :not(#wt).pad-h-tiny-mobile { padding-left: var(--tiny); padding-right: var(--tiny) }
718
+ :not(#wt).pad-h-small-mobile { padding-left: var(--small); padding-right: var(--small) }
719
+ :not(#wt).pad-h-mobile { padding-left: var(--normal); padding-right: var(--normal) }
720
+ :not(#wt).pad-h-big-mobile { padding-left: var(--big); padding-right: var(--big) }
721
+ :not(#wt).pad-h-huge-mobile { padding-left: var(--huge); padding-right: var(--huge) }
722
+
723
+ :not(#wt).pad-v-micro-mobile { padding-top: var(--micro); padding-bottom: var(--micro) }
724
+ :not(#wt).pad-v-tiny-mobile { padding-top: var(--tiny); padding-bottom: var(--tiny) }
725
+ :not(#wt).pad-v-small-mobile { padding-top: var(--small); padding-bottom: var(--small) }
726
+ :not(#wt).pad-v-mobile { padding-top: var(--normal); padding-bottom: var(--normal) }
727
+ :not(#wt).pad-v-big-mobile { padding-top: var(--big); padding-bottom: var(--big) }
728
+ :not(#wt).pad-v-huge-mobile { padding-top: var(--huge); padding-bottom: var(--huge) }
729
+
730
+ /* Alignment */
731
+ .row-mobile.left-mobile { justify-content: start }
732
+ .col-mobile.left-mobile { align-items: start }
733
+
734
+ .row-mobile.right-mobile { justify-content: end }
735
+ .col-mobile.right-mobile { align-items: end }
736
+
737
+ .row-mobile.top-mobile { align-items: start }
738
+ .col-mobile.top-mobile { justify-content: start }
739
+
740
+ .row-mobile.bottom-mobile { align-items: end }
741
+ .col-mobile.bottom-mobile { justify-content: end }
742
+
743
+ :is(.row-mobile,.col-mobile).stretch-mobile { align-items: stretch }
744
+ :is(.row-mobile,.col-mobile).stretch-mobile > * { flex: 1 }
745
+
746
+ .row-mobile.stretch-h-mobile > * { flex: 1 }
747
+ .row-mobile.stretch-v-mobile { align-items: stretch }
748
+
749
+ .col-mobile.stretch-h-mobile { align-items: stretch }
750
+ .col-mobile.stretch-v-mobile > * { flex: 1 }
751
+
752
+ .row-mobile:is(.center-mobile, .center-h-mobile) { justify-content: center }
753
+ .col-mobile:is(.center-mobile, .center-h-mobile) { align-items: center }
754
+
755
+ .row-mobile:is(.center-mobile, .center-v-mobile) { align-items: center }
756
+ .col-mobile:is(.center-mobile, .center-v-mobile) { justify-content: center }
757
+
758
+ /* Spacing */
759
+ /* We use :not(.wt) so this can override .col.center w/ a selector weight of 3 above. */
760
+ .space-between-mobile:not(.wt) { justify-content: space-between }
761
+ .space-around-mobile:not(.wt) { justify-content: space-around }
762
+ .space-evenly-mobile:not(.wt) { justify-content: space-evenly }
763
+
764
+ /* Wrap */
765
+ .wrap-mobile { flex-wrap: wrap }
766
+ :is(.no-wrap-mobile, .nowrap-mobile) { flex-wrap: nowrap; white-space: nowrap }
767
+
768
+
769
+
770
+
771
+ /* ┌─────────────────╮
772
+ * |Dimensions |
773
+ * └─────────────────╯*/
774
+
775
+ /* Fixed */
776
+ .rem1-mobile { min-width: 1rem; max-width: 1rem }
777
+ .rem2-mobile { min-width: 2rem; max-width: 2rem }
778
+ .rem3-mobile { min-width: 3rem; max-width: 3rem }
779
+ .rem4-mobile { min-width: 4rem; max-width: 4rem }
780
+ .rem5-mobile { min-width: 5rem; max-width: 5rem }
781
+ .rem6-mobile { min-width: 6rem; max-width: 6rem }
782
+ .rem7-mobile { min-width: 7rem; max-width: 7rem }
783
+ .rem8-mobile { min-width: 8rem; max-width: 8rem }
784
+ .rem9-mobile { min-width: 9rem; max-width: 9rem }
785
+ .rem10-mobile { min-width: 10rem; max-width: 10rem }
786
+ .rem11-mobile { min-width: 11rem; max-width: 11rem }
787
+ .rem12-mobile { min-width: 12rem; max-width: 12rem }
788
+ .rem13-mobile { min-width: 13rem; max-width: 13rem }
789
+ .rem14-mobile { min-width: 14rem; max-width: 14rem }
790
+ .rem15-mobile { min-width: 15rem; max-width: 15rem }
791
+ .rem16-mobile { min-width: 16rem; max-width: 16rem }
792
+
793
+
794
+ /* Percents in thirds, fourths, and tenths. */
795
+ .pc10-mobile { width: 10% }
796
+ .pc20-mobile { width: 20% }
797
+ .pc25-mobile { width: 25% }
798
+ .pc30-mobile { width: 30% }
799
+ .pc33-mobile { width: 33.333% }
800
+ .pc40-mobile { width: 40% }
801
+ .pc50-mobile { width: 50% }
802
+ .pc60-mobile { width: 60% }
803
+ .pc66-mobile { width: 66.666% }
804
+ .pc70-mobile { width: 70% }
805
+ .pc75-mobile { width: 70% }
806
+ .pc80-mobile { width: 80% }
807
+ .pc90-mobile { width: 90% }
808
+ .pc100-mobile { width: 100% }
809
+
810
+ /* Flex */
811
+ .flex1-mobile { flex: 1 }
812
+ .flex2-mobile { flex: 2 }
813
+ .flex3-mobile { flex: 3 }
814
+ .flex4-mobile { flex: 4 }
815
+ .flex5-mobile { flex: 5 }
816
+ .flex6-mobile { flex: 6 }
817
+ .flex7-mobile { flex: 7 }
818
+ .flex8-mobile { flex: 8 }
819
+ .flex9-mobile { flex: 9 }
820
+ .flex10-mobile { flex: 10 }
821
+ .flex11-mobile { flex: 11 }
822
+ .flex12-mobile { flex: 12 }
823
+ }
824
+ }
825
+
826
+
827
+
828
+ /* ┌─────────────────╮
829
+ * |Grid Tablet |
830
+ * └─────────────────╯*/
831
+ @media (512px <= width < 992px) {
832
+ .eternium, .eternium-layout {
833
+
834
+ /* Row/Col */
835
+ .row-tablet { display: flex; flex-direction: row; align-items: start; justify-content: start }
836
+ .col-tablet { display: flex; flex-direction: column; align-items: start; justify-content: start }
837
+
838
+ /* Gaps */
839
+ .gap-micro-tablet { gap: var(--micro) }
840
+ .gap-tiny-tablet { gap: var(--tiny) }
841
+ .gap-small-tablet { gap: var(--small) }
842
+ .gap-tablet { gap: var(--normal) }
843
+ .gap-big-tablet { gap: var(--big) }
844
+ .gap-huge-tablet { gap: var(--huge) }
845
+
846
+ /* Pad */
847
+ :not(#wt).pad-micro-tablet { padding: var(--micro) }
848
+ :not(#wt).pad-tiny-tablet { padding: var(--tiny) }
849
+ :not(#wt).pad-small-tablet { padding: var(--small) }
850
+ :not(#wt).pad-tablet { padding: var(--normal) }
851
+ :not(#wt).pad-big-tablet { padding: var(--big) }
852
+ :not(#wt).pad-huge-tablet { padding: var(--huge) }
853
+
854
+ :not(#wt).pad-h-micro-tablet { padding-left: var(--micro); padding-right: var(--micro) }
855
+ :not(#wt).pad-h-tiny-tablet { padding-left: var(--tiny); padding-right: var(--tiny) }
856
+ :not(#wt).pad-h-small-tablet { padding-left: var(--small); padding-right: var(--small) }
857
+ :not(#wt).pad-h-tablet { padding-left: var(--normal); padding-right: var(--normal) }
858
+ :not(#wt).pad-h-big-tablet { padding-left: var(--big); padding-right: var(--big) }
859
+ :not(#wt).pad-h-huge-tablet { padding-left: var(--huge); padding-right: var(--huge) }
860
+
861
+ :not(#wt).pad-v-micro-tablet { padding-top: var(--micro); padding-bottom: var(--micro) }
862
+ :not(#wt).pad-v-tiny-tablet { padding-top: var(--tiny); padding-bottom: var(--tiny) }
863
+ :not(#wt).pad-v-small-tablet { padding-top: var(--small); padding-bottom: var(--small) }
864
+ :not(#wt).pad-v-tablet { padding-top: var(--normal); padding-bottom: var(--normal) }
865
+ :not(#wt).pad-v-big-tablet { padding-top: var(--big); padding-bottom: var(--big) }
866
+ :not(#wt).pad-v-huge-tablet { padding-top: var(--huge); padding-bottom: var(--huge) }
867
+
868
+ /* Alignment */
869
+ .row-tablet.left-tablet { justify-content: start }
870
+ .col-tablet.left-tablet { align-items: start }
871
+
872
+ .row-tablet.right-tablet { justify-content: end }
873
+ .col-tablet.right-tablet { align-items: end }
874
+
875
+ .row-tablet.top-tablet { align-items: start }
876
+ .col-tablet.top-tablet { justify-content: start }
877
+
878
+ .row-tablet.bottom-tablet { align-items: end }
879
+ .col-tablet.bottom-tablet { justify-content: end }
880
+
881
+ :is(.row-tablet,.col-tablet).stretch-tablet { align-items: stretch }
882
+ :is(.row-tablet,.col-tablet).stretch-tablet > * { flex: 1 }
883
+
884
+ .row-tablet.stretch-h-tablet > * { flex: 1 }
885
+ .row-tablet.stretch-v-tablet { align-items: stretch }
886
+
887
+ .col-tablet.stretch-h-tablet { align-items: stretch }
888
+ .col-tablet.stretch-v-tablet > * { flex: 1 }
889
+
890
+ .row-tablet:is(.center-tablet, .center-h-tablet) { justify-content: center }
891
+ .col-tablet:is(.center-tablet, .center-h-tablet) { align-items: center }
892
+
893
+ .row-tablet:is(.center-tablet, .center-v-tablet) { align-items: center }
894
+ .col-tablet:is(.center-tablet, .center-v-tablet) { justify-content: center }
895
+
896
+ /* Spacing */
897
+ /* We use :not(.wt) so this can override .col.center w/ a selector weight of 3 above. */
898
+ .space-between-tablet:not(.wt) { justify-content: space-between }
899
+ .space-around-tablet:not(.wt) { justify-content: space-around }
900
+ .space-evenly-tablet:not(.wt) { justify-content: space-evenly }
901
+
902
+ /* Wrap */
903
+ .wrap-tablet { flex-wrap: wrap }
904
+ :is(.no-wrap-tablet, .nowrap-tablet) { flex-wrap: nowrap; white-space: nowrap }
905
+
906
+
907
+
908
+ /* ┌─────────────────╮
909
+ * |Dimensions |
910
+ * └─────────────────╯*/
911
+
912
+ /* Fixed */
913
+ .rem1-tablet { min-width: 1rem; max-width: 1rem }
914
+ .rem2-tablet { min-width: 2rem; max-width: 2rem }
915
+ .rem3-tablet { min-width: 3rem; max-width: 3rem }
916
+ .rem4-tablet { min-width: 4rem; max-width: 4rem }
917
+ .rem5-tablet { min-width: 5rem; max-width: 5rem }
918
+ .rem6-tablet { min-width: 6rem; max-width: 6rem }
919
+ .rem7-tablet { min-width: 7rem; max-width: 7rem }
920
+ .rem8-tablet { min-width: 8rem; max-width: 8rem }
921
+ .rem9-tablet { min-width: 9rem; max-width: 9rem }
922
+ .rem10-tablet { min-width: 10rem; max-width: 10rem }
923
+ .rem11-tablet { min-width: 11rem; max-width: 11rem }
924
+ .rem12-tablet { min-width: 12rem; max-width: 12rem }
925
+ .rem13-tablet { min-width: 13rem; max-width: 13rem }
926
+ .rem14-tablet { min-width: 14rem; max-width: 14rem }
927
+ .rem15-tablet { min-width: 15rem; max-width: 15rem }
928
+ .rem16-tablet { min-width: 16rem; max-width: 16rem }
929
+
930
+ /* Percents in thirds, fourths, and tenths. */
931
+ .pc10-tablet { width: 10% }
932
+ .pc20-tablet { width: 20% }
933
+ .pc25-tablet { width: 25% }
934
+ .pc30-tablet { width: 30% }
935
+ .pc33-tablet { width: 33.333% }
936
+ .pc40-tablet { width: 40% }
937
+ .pc50-tablet { width: 50% }
938
+ .pc60-tablet { width: 60% }
939
+ .pc66-tablet { width: 66.666% }
940
+ .pc70-tablet { width: 70% }
941
+ .pc75-tablet { width: 70% }
942
+ .pc80-tablet { width: 80% }
943
+ .pc90-tablet { width: 90% }
944
+ .pc100-tablet { width: 100% }
945
+
946
+ /* Flex */
947
+ .flex1-tablet { flex: 1 }
948
+ .flex2-tablet { flex: 2 }
949
+ .flex3-tablet { flex: 3 }
950
+ .flex4-tablet { flex: 4 }
951
+ .flex5-tablet { flex: 5 }
952
+ .flex6-tablet { flex: 6 }
953
+ .flex7-tablet { flex: 7 }
954
+ .flex8-tablet { flex: 8 }
955
+ .flex9-tablet { flex: 9 }
956
+ .flex10-tablet { flex: 10 }
957
+ .flex11-tablet { flex: 11 }
958
+ .flex12-tablet { flex: 12 }
959
+ }
960
+ }
961
+
962
+
963
+
964
+ /* ┌─────────────────╮
965
+ * |Grid Desktop+ |
966
+ * └─────────────────╯*/
967
+ @media (992px <= width) {
968
+ .eternium, .eternium-layout {
969
+
970
+ /* Row/Col */
971
+ .row-desktop { display: flex; flex-direction: row; align-items: start; justify-content: start }
972
+ .col-desktop { display: flex; flex-direction: column; align-items: start; justify-content: start }
973
+
974
+ /* Gaps */
975
+ .gap-micro-desktop { gap: var(--micro) }
976
+ .gap-tiny-desktop { gap: var(--tiny) }
977
+ .gap-small-desktop { gap: var(--small) }
978
+ .gap-desktop { gap: var(--normal) }
979
+ .gap-big-desktop { gap: var(--big) }
980
+ .gap-huge-desktop { gap: var(--huge) }
981
+
982
+ /* Pad */
983
+ :not(#wt).pad-micro-desktop { padding: var(--micro) }
984
+ :not(#wt).pad-tiny-desktop { padding: var(--tiny) }
985
+ :not(#wt).pad-small-desktop { padding: var(--small) }
986
+ :not(#wt).pad-desktop { padding: var(--normal) }
987
+ :not(#wt).pad-big-desktop { padding: var(--big) }
988
+ :not(#wt).pad-huge-desktop { padding: var(--huge) }
989
+
990
+ :not(#wt).pad-h-micro-desktop { padding-left: var(--micro); padding-right: var(--micro) }
991
+ :not(#wt).pad-h-tiny-desktop { padding-left: var(--tiny); padding-right: var(--tiny) }
992
+ :not(#wt).pad-h-small-desktop { padding-left: var(--small); padding-right: var(--small) }
993
+ :not(#wt).pad-h-desktop { padding-left: var(--normal); padding-right: var(--normal) }
994
+ :not(#wt).pad-h-big-desktop { padding-left: var(--big); padding-right: var(--big) }
995
+ :not(#wt).pad-h-huge-desktop { padding-left: var(--huge); padding-right: var(--huge) }
996
+
997
+ :not(#wt).pad-v-micro-desktop { padding-top: var(--micro); padding-bottom: var(--micro) }
998
+ :not(#wt).pad-v-tiny-desktop { padding-top: var(--tiny); padding-bottom: var(--tiny) }
999
+ :not(#wt).pad-v-small-desktop { padding-top: var(--small); padding-bottom: var(--small) }
1000
+ :not(#wt).pad-v-desktop { padding-top: var(--normal); padding-bottom: var(--normal) }
1001
+ :not(#wt).pad-v-big-desktop { padding-top: var(--big); padding-bottom: var(--big) }
1002
+ :not(#wt).pad-v-huge-desktop { padding-top: var(--huge); padding-bottom: var(--huge) }
1003
+
1004
+ /* Alignment */
1005
+ .row-desktop.left-desktop { justify-content: start }
1006
+ .col-desktop.left-desktop { align-items: start }
1007
+
1008
+ .row-desktop.right-desktop { justify-content: end }
1009
+ .col-desktop.right-desktop { align-items: end }
1010
+
1011
+ .row-desktop.top-desktop { align-items: start }
1012
+ .col-desktop.top-desktop { justify-content: start }
1013
+
1014
+ .row-desktop.bottom-desktop { align-items: end }
1015
+ .col-desktop.bottom-desktop { justify-content: end }
1016
+
1017
+ :is(.row-desktop,.col-desktop).stretch-desktop { align-items: stretch }
1018
+ :is(.row-desktop,.col-desktop).stretch-desktop > * { flex: 1 }
1019
+
1020
+ .row-desktop.stretch-h-desktop > * { flex: 1 }
1021
+ .row-desktop.stretch-v-desktop { align-items: stretch }
1022
+
1023
+ .col-desktop.stretch-h-desktop { align-items: stretch }
1024
+ .col-desktop.stretch-v-desktop > * { flex: 1 }
1025
+
1026
+ .row-desktop:is(.center-desktop, .center-h-desktop) { justify-content: center }
1027
+ .col-desktop:is(.center-desktop, .center-h-desktop) { align-items: center }
1028
+
1029
+ .row-desktop:is(.center-desktop, .center-v-desktop) { align-items: center }
1030
+ .col-desktop:is(.center-desktop, .center-v-desktop) { justify-content: center }
1031
+
1032
+ /* Spacing */
1033
+ /* We use .sel-weight so this can override .col.center w/ a selector weight of 3 above. */
1034
+ .space-between-desktop:not(.wt) { justify-content: space-between }
1035
+ .space-around-desktop:not(.wt) { justify-content: space-around }
1036
+ .space-evenly-desktop:not(.wt) { justify-content: space-evenly }
1037
+
1038
+ /* Wrap */
1039
+ .wrap-desktop { flex-wrap: wrap }
1040
+ :is(.no-wrap-desktop, .nowrap-desktop) { flex-wrap: nowrap; white-space: nowrap }
1041
+
1042
+
1043
+
1044
+ /* ┌─────────────────╮
1045
+ * |Dimensions |
1046
+ * └─────────────────╯*/
1047
+
1048
+ /* Fixed */
1049
+ .rem1-desktop { min-width: 1rem; max-width: 1rem }
1050
+ .rem2-desktop { min-width: 2rem; max-width: 2rem }
1051
+ .rem3-desktop { min-width: 3rem; max-width: 3rem }
1052
+ .rem4-desktop { min-width: 4rem; max-width: 4rem }
1053
+ .rem5-desktop { min-width: 5rem; max-width: 5rem }
1054
+ .rem6-desktop { min-width: 6rem; max-width: 6rem }
1055
+ .rem7-desktop { min-width: 7rem; max-width: 7rem }
1056
+ .rem8-desktop { min-width: 8rem; max-width: 8rem }
1057
+ .rem9-desktop { min-width: 9rem; max-width: 9rem }
1058
+ .rem10-desktop { min-width: 10rem; max-width: 10rem }
1059
+ .rem11-desktop { min-width: 11rem; max-width: 11rem }
1060
+ .rem12-desktop { min-width: 12rem; max-width: 12rem }
1061
+ .rem13-desktop { min-width: 13rem; max-width: 13rem }
1062
+ .rem14-desktop { min-width: 14rem; max-width: 14rem }
1063
+ .rem15-desktop { min-width: 15rem; max-width: 15rem }
1064
+ .rem16-desktop { min-width: 16rem; max-width: 16rem }
1065
+
1066
+ /* Percents in thirds, fourths, and tenths. */
1067
+ .pc10-desktop { width: 10% }
1068
+ .pc20-desktop { width: 20% }
1069
+ .pc25-desktop { width: 25% }
1070
+ .pc30-desktop { width: 30% }
1071
+ .pc33-desktop { width: 33.333% }
1072
+ .pc40-desktop { width: 40% }
1073
+ .pc50-desktop { width: 50% }
1074
+ .pc60-desktop { width: 60% }
1075
+ .pc66-desktop { width: 66.666% }
1076
+ .pc70-desktop { width: 70% }
1077
+ .pc75-desktop { width: 70% }
1078
+ .pc80-desktop { width: 80% }
1079
+ .pc90-desktop { width: 90% }
1080
+ .pc100-desktop { width: 100% }
1081
+
1082
+ /* Flex */
1083
+ .flex1-desktop { flex: 1 }
1084
+ .flex2-desktop { flex: 2 }
1085
+ .flex3-desktop { flex: 3 }
1086
+ .flex4-desktop { flex: 4 }
1087
+ .flex5-desktop { flex: 5 }
1088
+ .flex6-desktop { flex: 6 }
1089
+ .flex7-desktop { flex: 7 }
1090
+ .flex8-desktop { flex: 8 }
1091
+ .flex9-desktop { flex: 9 }
1092
+ .flex10-desktop { flex: 10 }
1093
+ .flex11-desktop { flex: 11 }
1094
+ .flex12-desktop { flex: 12 }
1095
+ }
1096
+ }
1097
+
1098
+ /* ┌─────────────────╮
1099
+ * |Grid Visibility |
1100
+ * └─────────────────╯*/
1101
+
1102
+ /* Show only for specific sizes. */
1103
+ /* TODO: Use this method for other -desktop and -mobile styles above? Having that will override the default style only for that size. */
1104
+ @media (width < 512px) {
1105
+ :is(.eternium, .eternium-layout) :is(.tablet, .desktop):not(.mobile) { display: none !important }
1106
+ }
1107
+ @media (512px <= width < 992px) {
1108
+ :is(.eternium, .eternium-layout) :is(.mobile, .desktop):not(.tablet) { display: none !important }
1109
+ }
1110
+ @media (992px <= width) {
1111
+ :is(.eternium, .eternium-layout) :is(.mobile, .tablet):not(.desktop) { display: none !important }
1112
+ }
1113
+
1114
+
1115
+ /* ┌─────────────────╮
1116
+ * |Deprecated |
1117
+ * └─────────────────╯*/
1118
+ /* These are deprecated, use pad-h and pad-v */
1119
+ :is(.eternium, .eternium-forms) .pad-tiny-small, :is(.eternium, .eternium-forms).pad-tiny-small { padding: var(--tiny) var(--small) }
1120
+ :is(.eternium, .eternium-forms) .pad-small-normal, :is(.eternium, .eternium-forms).pad-small-normal { padding: var(--small) var(--normal) }
1121
+
1122
+ :is(.eternium, .eternium-forms) :is(small, :is(a,b,i,s,p,u,span,div,ul,ol,li,.label):not([contenteditable]).small) {
1123
+ font-size: 80%; opacity: .65; line-height: 1.1 } /* .small is deprecated for .little and .muted */