@nordcode/ui 1.0.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 (66) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/LICENSE.md +661 -0
  3. package/README.md +90 -0
  4. package/index.html +1169 -0
  5. package/out/bundle.css +1400 -0
  6. package/out/bundle_configless.css +1135 -0
  7. package/out/colors.css +87 -0
  8. package/out/complete.css +2647 -0
  9. package/out/complete_configless.css +2382 -0
  10. package/package.json +73 -0
  11. package/src/assets/fonts/DMMono-Regular.woff +0 -0
  12. package/src/assets/fonts/DMMono-Regular.woff2 +0 -0
  13. package/src/assets/fonts/fonts.css +7 -0
  14. package/src/assets/icons/ArrowRightSolid.svelte +1 -0
  15. package/src/assets/icons/arrow-right-solid.svg +1 -0
  16. package/src/assets/icons/favicon.png +0 -0
  17. package/src/assets/icons/favicon.svg +8 -0
  18. package/src/assets/logos/nordcode-logo-icon.svg +3 -0
  19. package/src/assets/logos/nordcode-logo.svg +17 -0
  20. package/src/modules/copyButtons/ts/copyButtons.ts +9 -0
  21. package/src/modules/dialogs/svelte/dialog.svelte +27 -0
  22. package/src/modules/dialogs/ts/LICENCE +171 -0
  23. package/src/modules/dialogs/ts/dialogs.ts +111 -0
  24. package/src/modules/notifications/js/notifications.js +294 -0
  25. package/src/modules/notifications/svelte/NotificationCenter.svelte +18 -0
  26. package/src/modules/notifications/svelte/NotificationTemplate.svelte +16 -0
  27. package/src/modules/sectionObserver/ts/sectionOberserver.ts +34 -0
  28. package/src/styles/bundle.css +7 -0
  29. package/src/styles/bundle_configless.css +5 -0
  30. package/src/styles/complete.css +5 -0
  31. package/src/styles/complete_configless.css +5 -0
  32. package/src/styles/components/badges.css +14 -0
  33. package/src/styles/components/breadcrumbs.css +37 -0
  34. package/src/styles/components/bundle.css +12 -0
  35. package/src/styles/components/buttons.css +256 -0
  36. package/src/styles/components/card.css +55 -0
  37. package/src/styles/components/dialogs.css +116 -0
  38. package/src/styles/components/forms.css +47 -0
  39. package/src/styles/components/gallery.css +66 -0
  40. package/src/styles/components/icons.css +60 -0
  41. package/src/styles/components/inputs/base.css +258 -0
  42. package/src/styles/components/inputs/bundle.css +5 -0
  43. package/src/styles/components/inputs/fields.css +79 -0
  44. package/src/styles/components/inputs/segmented.css +123 -0
  45. package/src/styles/components/inputs/switch.css +42 -0
  46. package/src/styles/components/inputs/tag-select.css +44 -0
  47. package/src/styles/components/lists.css +40 -0
  48. package/src/styles/components/notifications.css +137 -0
  49. package/src/styles/components/tables.css +7 -0
  50. package/src/styles/config/bundle.css +2 -0
  51. package/src/styles/config/config.css +828 -0
  52. package/src/styles/config/extras.css +18 -0
  53. package/src/styles/exceptions/bundle.css +3 -0
  54. package/src/styles/exceptions/misc.css +21 -0
  55. package/src/styles/exceptions/spacings.css +15 -0
  56. package/src/styles/exceptions/typography.css +57 -0
  57. package/src/styles/theme/colors.css +178 -0
  58. package/src/styles/theme/colors_processed.css +87 -0
  59. package/src/styles/utils/base.css +406 -0
  60. package/src/styles/utils/bundle.css +6 -0
  61. package/src/styles/utils/easings.css +364 -0
  62. package/src/styles/utils/layouts.css +298 -0
  63. package/src/styles/utils/media.css +55 -0
  64. package/src/styles/utils/reset.css +128 -0
  65. package/src/styles/utils/theme.css +120 -0
  66. package/transform.js +71 -0
@@ -0,0 +1,364 @@
1
+ @layer config.easings {
2
+ :where(html) {
3
+ --ease-1: cubic-bezier(0.25, 0, 0.5, 1);
4
+ --ease-2: cubic-bezier(0.25, 0, 0.4, 1);
5
+ --ease-3: cubic-bezier(0.25, 0, 0.3, 1);
6
+ --ease-4: cubic-bezier(0.25, 0, 0.2, 1);
7
+ --ease-5: cubic-bezier(0.25, 0, 0.1, 1);
8
+ --ease-in-1: cubic-bezier(0.25, 0, 1, 1);
9
+ --ease-in-2: cubic-bezier(0.5, 0, 1, 1);
10
+ --ease-in-3: cubic-bezier(0.7, 0, 1, 1);
11
+ --ease-in-4: cubic-bezier(0.9, 0, 1, 1);
12
+ --ease-in-5: cubic-bezier(1, 0, 1, 1);
13
+ --ease-out-1: cubic-bezier(0, 0, 0.75, 1);
14
+ --ease-out-2: cubic-bezier(0, 0, 0.5, 1);
15
+ --ease-out-3: cubic-bezier(0, 0, 0.3, 1);
16
+ --ease-out-4: cubic-bezier(0, 0, 0.1, 1);
17
+ --ease-out-5: cubic-bezier(0, 0, 0, 1);
18
+ --ease-in-out-1: cubic-bezier(0.1, 0, 0.9, 1);
19
+ --ease-in-out-2: cubic-bezier(0.3, 0, 0.7, 1);
20
+ --ease-in-out-3: cubic-bezier(0.5, 0, 0.5, 1);
21
+ --ease-in-out-4: cubic-bezier(0.7, 0, 0.3, 1);
22
+ --ease-in-out-5: cubic-bezier(0.9, 0, 0.1, 1);
23
+ --ease-elastic-out-1: cubic-bezier(0.5, 0.75, 0.75, 1.25);
24
+ --ease-elastic-out-2: cubic-bezier(0.5, 1, 0.75, 1.25);
25
+ --ease-elastic-out-3: cubic-bezier(0.5, 1.25, 0.75, 1.25);
26
+ --ease-elastic-out-4: cubic-bezier(0.5, 1.5, 0.75, 1.25);
27
+ --ease-elastic-out-5: cubic-bezier(0.5, 1.75, 0.75, 1.25);
28
+ --ease-elastic-in-1: cubic-bezier(0.5, -0.25, 0.75, 1);
29
+ --ease-elastic-in-2: cubic-bezier(0.5, -0.5, 0.75, 1);
30
+ --ease-elastic-in-3: cubic-bezier(0.5, -0.75, 0.75, 1);
31
+ --ease-elastic-in-4: cubic-bezier(0.5, -1, 0.75, 1);
32
+ --ease-elastic-in-5: cubic-bezier(0.5, -1.25, 0.75, 1);
33
+ --ease-elastic-in-out-1: cubic-bezier(0.5, -0.1, 0.1, 1.5);
34
+ --ease-elastic-in-out-2: cubic-bezier(0.5, -0.3, 0.1, 1.5);
35
+ --ease-elastic-in-out-3: cubic-bezier(0.5, -0.5, 0.1, 1.5);
36
+ --ease-elastic-in-out-4: cubic-bezier(0.5, -0.7, 0.1, 1.5);
37
+ --ease-elastic-in-out-5: cubic-bezier(0.5, -0.9, 0.1, 1.5);
38
+ --ease-step-1: steps(2);
39
+ --ease-step-2: steps(3);
40
+ --ease-step-3: steps(4);
41
+ --ease-step-4: steps(7);
42
+ --ease-step-5: steps(10);
43
+ --ease-elastic-1: var(--ease-elastic-out-1);
44
+ --ease-elastic-2: var(--ease-elastic-out-2);
45
+ --ease-elastic-3: var(--ease-elastic-out-3);
46
+ --ease-elastic-4: var(--ease-elastic-out-4);
47
+ --ease-elastic-5: var(--ease-elastic-out-5);
48
+ --ease-squish-1: var(--ease-elastic-in-out-1);
49
+ --ease-squish-2: var(--ease-elastic-in-out-2);
50
+ --ease-squish-3: var(--ease-elastic-in-out-3);
51
+ --ease-squish-4: var(--ease-elastic-in-out-4);
52
+ --ease-squish-5: var(--ease-elastic-in-out-5);
53
+ --ease-spring-1: linear(0,
54
+ 0.006,
55
+ 0.025 2.8%,
56
+ 0.101 6.1%,
57
+ 0.539 18.9%,
58
+ 0.721 25.3%,
59
+ 0.849 31.5%,
60
+ 0.937 38.1%,
61
+ 0.968 41.8%,
62
+ 0.991 45.7%,
63
+ 1.006 50.1%,
64
+ 1.015 55%,
65
+ 1.017 63.9%,
66
+ 1.001);
67
+ --ease-spring-2: linear(0,
68
+ 0.007,
69
+ 0.029 2.2%,
70
+ 0.118 4.7%,
71
+ 0.625 14.4%,
72
+ 0.826 19%,
73
+ 0.902,
74
+ 0.962,
75
+ 1.008 26.1%,
76
+ 1.041 28.7%,
77
+ 1.064 32.1%,
78
+ 1.07 36%,
79
+ 1.061 40.5%,
80
+ 1.015 53.4%,
81
+ 0.999 61.6%,
82
+ 0.995 71.2%,
83
+ 1);
84
+ --ease-spring-3: linear(0,
85
+ 0.009,
86
+ 0.035 2.1%,
87
+ 0.141 4.4%,
88
+ 0.723 12.9%,
89
+ 0.938 16.7%,
90
+ 1.017,
91
+ 1.077,
92
+ 1.121,
93
+ 1.149 24.3%,
94
+ 1.159,
95
+ 1.163,
96
+ 1.161,
97
+ 1.154 29.9%,
98
+ 1.129 32.8%,
99
+ 1.051 39.6%,
100
+ 1.017 43.1%,
101
+ 0.991,
102
+ 0.977 51%,
103
+ 0.974 53.8%,
104
+ 0.975 57.1%,
105
+ 0.997 69.8%,
106
+ 1.003 76.9%,
107
+ 1);
108
+ --ease-spring-4: linear(0,
109
+ 0.009,
110
+ 0.037 1.7%,
111
+ 0.153 3.6%,
112
+ 0.776 10.3%,
113
+ 1.001,
114
+ 1.142 16%,
115
+ 1.185,
116
+ 1.209 19%,
117
+ 1.215 19.9% 20.8%,
118
+ 1.199,
119
+ 1.165 25%,
120
+ 1.056 30.3%,
121
+ 1.008 33%,
122
+ 0.973,
123
+ 0.955 39.2%,
124
+ 0.953 41.1%,
125
+ 0.957 43.3%,
126
+ 0.998 53.3%,
127
+ 1.009 59.1% 63.7%,
128
+ 0.998 78.9%,
129
+ 1);
130
+ --ease-spring-5: linear(0,
131
+ 0.01,
132
+ 0.04 1.6%,
133
+ 0.161 3.3%,
134
+ 0.816 9.4%,
135
+ 1.046,
136
+ 1.189 14.4%,
137
+ 1.231,
138
+ 1.254 17%,
139
+ 1.259,
140
+ 1.257 18.6%,
141
+ 1.236,
142
+ 1.194 22.3%,
143
+ 1.057 27%,
144
+ 0.999 29.4%,
145
+ 0.955 32.1%,
146
+ 0.942,
147
+ 0.935 34.9%,
148
+ 0.933,
149
+ 0.939 38.4%,
150
+ 1 47.3%,
151
+ 1.011,
152
+ 1.017 52.6%,
153
+ 1.016 56.4%,
154
+ 1 65.2%,
155
+ 0.996 70.2%,
156
+ 1.001 87.2%,
157
+ 1);
158
+ --ease-bounce-1: linear(0,
159
+ 0.004,
160
+ 0.016,
161
+ 0.035,
162
+ 0.063,
163
+ 0.098,
164
+ 0.141,
165
+ 0.191,
166
+ 0.25,
167
+ 0.316,
168
+ 0.391 36.8%,
169
+ 0.563,
170
+ 0.766,
171
+ 1 58.8%,
172
+ 0.946,
173
+ 0.908 69.1%,
174
+ 0.895,
175
+ 0.885,
176
+ 0.879,
177
+ 0.878,
178
+ 0.879,
179
+ 0.885,
180
+ 0.895,
181
+ 0.908 89.7%,
182
+ 0.946,
183
+ 1);
184
+ --ease-bounce-2: linear(0,
185
+ 0.004,
186
+ 0.016,
187
+ 0.035,
188
+ 0.063,
189
+ 0.098,
190
+ 0.141 15.1%,
191
+ 0.25,
192
+ 0.391,
193
+ 0.562,
194
+ 0.765,
195
+ 1,
196
+ 0.892 45.2%,
197
+ 0.849,
198
+ 0.815,
199
+ 0.788,
200
+ 0.769,
201
+ 0.757,
202
+ 0.753,
203
+ 0.757,
204
+ 0.769,
205
+ 0.788,
206
+ 0.815,
207
+ 0.85,
208
+ 0.892 75.2%,
209
+ 1 80.2%,
210
+ 0.973,
211
+ 0.954,
212
+ 0.943,
213
+ 0.939,
214
+ 0.943,
215
+ 0.954,
216
+ 0.973,
217
+ 1);
218
+ --ease-bounce-3: linear(0,
219
+ 0.004,
220
+ 0.016,
221
+ 0.035,
222
+ 0.062,
223
+ 0.098,
224
+ 0.141 11.4%,
225
+ 0.25,
226
+ 0.39,
227
+ 0.562,
228
+ 0.764,
229
+ 1 30.3%,
230
+ 0.847 34.8%,
231
+ 0.787,
232
+ 0.737,
233
+ 0.699,
234
+ 0.672,
235
+ 0.655,
236
+ 0.65,
237
+ 0.656,
238
+ 0.672,
239
+ 0.699,
240
+ 0.738,
241
+ 0.787,
242
+ 0.847 61.7%,
243
+ 1 66.2%,
244
+ 0.946,
245
+ 0.908,
246
+ 0.885 74.2%,
247
+ 0.879,
248
+ 0.878,
249
+ 0.879,
250
+ 0.885 79.5%,
251
+ 0.908,
252
+ 0.946,
253
+ 1 87.4%,
254
+ 0.981,
255
+ 0.968,
256
+ 0.96,
257
+ 0.957,
258
+ 0.96,
259
+ 0.968,
260
+ 0.981,
261
+ 1);
262
+ --ease-bounce-4: linear(0,
263
+ 0.004,
264
+ 0.016 3%,
265
+ 0.062,
266
+ 0.141,
267
+ 0.25,
268
+ 0.391,
269
+ 0.562 18.2%,
270
+ 1 24.3%,
271
+ 0.81,
272
+ 0.676 32.3%,
273
+ 0.629,
274
+ 0.595,
275
+ 0.575,
276
+ 0.568,
277
+ 0.575,
278
+ 0.595,
279
+ 0.629,
280
+ 0.676 48.2%,
281
+ 0.811,
282
+ 1 56.2%,
283
+ 0.918,
284
+ 0.86,
285
+ 0.825,
286
+ 0.814,
287
+ 0.825,
288
+ 0.86,
289
+ 0.918,
290
+ 1 77.2%,
291
+ 0.94 80.6%,
292
+ 0.925,
293
+ 0.92,
294
+ 0.925,
295
+ 0.94 87.5%,
296
+ 1 90.9%,
297
+ 0.974,
298
+ 0.965,
299
+ 0.974,
300
+ 1);
301
+ --ease-bounce-5: linear(0,
302
+ 0.004,
303
+ 0.016 2.5%,
304
+ 0.063,
305
+ 0.141,
306
+ 0.25 10.1%,
307
+ 0.562,
308
+ 1 20.2%,
309
+ 0.783,
310
+ 0.627,
311
+ 0.534 30.9%,
312
+ 0.511,
313
+ 0.503,
314
+ 0.511,
315
+ 0.534 38%,
316
+ 0.627,
317
+ 0.782,
318
+ 1 48.7%,
319
+ 0.892,
320
+ 0.815,
321
+ 0.769 56.3%,
322
+ 0.757,
323
+ 0.753,
324
+ 0.757,
325
+ 0.769 61.3%,
326
+ 0.815,
327
+ 0.892,
328
+ 1 68.8%,
329
+ 0.908 72.4%,
330
+ 0.885,
331
+ 0.878,
332
+ 0.885,
333
+ 0.908 79.4%,
334
+ 1 83%,
335
+ 0.954 85.5%,
336
+ 0.943,
337
+ 0.939,
338
+ 0.943,
339
+ 0.954 90.5%,
340
+ 1 93%,
341
+ 0.977,
342
+ 0.97,
343
+ 0.977,
344
+ 1);
345
+
346
+ --transition-duration-instant: 0ms;
347
+ --transition-duration-short: 100ms;
348
+ --transition-duration-base: 200ms;
349
+ --transition-duration-long: 300ms;
350
+ --transition-duration-entry: 0s;
351
+ --transition-duration-exit: 0s;
352
+
353
+ --transition-target-scale: 0.9;
354
+
355
+ @media (--motionNotOK) {
356
+ --transition-duration-instant: 0ms;
357
+ --transition-duration-short: 0ms;
358
+ --transition-duration-base: 0ms;
359
+ --transition-duration-long: 0ms;
360
+ --transition-duration-entry: 0s;
361
+ --transition-duration-exit: 0s;
362
+ }
363
+ }
364
+ }
@@ -0,0 +1,298 @@
1
+ @layer utils {
2
+ /* Layout classes that handle 80% of the layout*/
3
+ :where(.nc-box) {
4
+ padding: var(--spacing-base);
5
+
6
+ &.-bordered {
7
+ border: var(--border-width-thin) solid var(--border, var(--color-border-base));
8
+ border-radius: var(--border-radius-medium);
9
+ }
10
+
11
+ &.-tiny {
12
+ padding: var(--spacing-tiny);
13
+ }
14
+
15
+ &.-nearest {
16
+ padding: var(--spacing-nearest);
17
+ }
18
+
19
+ &.-near {
20
+ padding: var(--spacing-near);
21
+ }
22
+
23
+ &.-base {
24
+ padding: var(--spacing-base);
25
+ }
26
+
27
+ &.-far {
28
+ padding: var(--spacing-far);
29
+ }
30
+
31
+ &.-farthest {
32
+ padding: var(--spacing-farthest);
33
+ }
34
+ }
35
+
36
+ :where(.nc-stack) {
37
+ display: flex;
38
+ flex-direction: column;
39
+ gap: var(--spacing-base);
40
+ align-items: flex-start;
41
+
42
+ &.-inherit {
43
+ gap: var(--stack-gap, var(--spacing-base));
44
+ }
45
+
46
+ &.-stretched {
47
+ inline-size: 100%;
48
+
49
+ & > * {
50
+ inline-size: 100%;
51
+ }
52
+ }
53
+
54
+ &.-contained > * {
55
+ max-inline-size: 100%;
56
+ }
57
+ }
58
+
59
+ :where(.nc-flow) {
60
+ > * + * {
61
+ margin-block-start: var(--flow-gap, 0.6lh);
62
+ }
63
+
64
+ > * {
65
+ max-inline-size: var(--flow-base-meassure, 72ch);
66
+ }
67
+
68
+ > *:is(h1, h2, h3, h4, h5, h6) {
69
+ max-inline-size: var(--flow-headline-meassure, 32ch);
70
+ --flow-gap: 1.3lh;
71
+ }
72
+
73
+ > *:is(h1, h2, h3, h4, h5, h6) + p {
74
+ --flow-gap: 0.5lh;
75
+ }
76
+
77
+ > p + p {
78
+ --flow-gap: 0.8lh;
79
+ }
80
+
81
+ > figure {
82
+ margin-inline: 0;
83
+ margin-block: 1lh;
84
+ }
85
+
86
+ .breakAfter {
87
+ margin-block-end: auto;
88
+ }
89
+ }
90
+
91
+ /**
92
+ * Center your content.
93
+ * Can be used as a layout wrapper.
94
+ */
95
+ :where(.nc-center) {
96
+ box-sizing: content-box;
97
+ margin-inline: auto;
98
+ max-inline-size: var(--center-measure, max-content);
99
+ padding-inline: var(--center-padding, 0);
100
+ position: relative;
101
+ }
102
+
103
+ /**
104
+ A consistently spaced section to bring some white space to your blocks.
105
+ */
106
+ :where(.nc-region) {
107
+ padding-block: var(--region-space, var(--spacing-farthest));
108
+ }
109
+
110
+ :where(.nc-cluster) {
111
+ display: flex;
112
+ flex-direction: row;
113
+ flex-wrap: wrap;
114
+ gap: var(--spacing-base);
115
+ align-items: flex-start;
116
+
117
+ &.-inherit {
118
+ gap: var(--cluster-gap, var(--spacing-base));
119
+ }
120
+
121
+ &.-centered {
122
+ align-items: center;
123
+ }
124
+
125
+ &.-nowrap {
126
+ flex-wrap: nowrap;
127
+ }
128
+
129
+ &.-between {
130
+ justify-content: space-between;
131
+ }
132
+ }
133
+
134
+ :where(.nc-with-sidebar) {
135
+ inline-size: 100%;
136
+ display: flex;
137
+ flex-wrap: wrap;
138
+ align-items: flex-start;
139
+ gap: var(--with-sidebar-gap, var(--spacing-far));
140
+
141
+ & > [data-aside] {
142
+ flex-grow: 1;
143
+ min-width: min-content;
144
+ flex-basis: var(--with-sidebar-target-width, 20rem);
145
+ }
146
+
147
+ & > [data-grow] {
148
+ flex-basis: 0;
149
+ flex-grow: 999;
150
+ min-width: var(--with-sidebar-min-size, 50%);
151
+ }
152
+
153
+ &[data-direction="rtl"] {
154
+ flex-direction: row-reverse;
155
+ }
156
+
157
+ &.-centered {
158
+ align-items: center;
159
+ }
160
+ }
161
+
162
+ /* AUTO GRID
163
+ Related Every Layout: https://every-layout.dev/layouts/grid/
164
+ More info on the flexible nature: https://piccalil.li/tutorial/create-a-responsive-grid-layout-with-no-media-queries-using-css-grid/
165
+ A flexible layout that will create an auto-fill grid with
166
+ configurable grid item sizes
167
+
168
+ CUSTOM PROPERTIES AND CONFIGURATION
169
+ --gutter (var(--space-s-m)): This defines the space
170
+ between each item.
171
+
172
+ --grid-min-item-size (14rem): How large each item should be
173
+ ideally, as a minimum.
174
+
175
+ --grid-placement (auto-fill): Set either auto-fit or auto-fill
176
+ to change how empty grid tracks are handled
177
+ */
178
+ :where(.nc-grid) {
179
+ display: grid;
180
+ grid-template-columns: repeat(
181
+ var(--grid-placement, auto-fill),
182
+ minmax(var(--grid-min-item-size, 16rem), 1fr)
183
+ );
184
+ gap: var(--grid-gap, var(--spacing-base));
185
+
186
+ /* A split 50/50 layout */
187
+
188
+ &[data-layout="50-50"] {
189
+ --grid-placement: auto-fit;
190
+ --grid-min-item-size: clamp(16rem, 50vw, 33rem);
191
+ }
192
+
193
+ /* Three column grid layout */
194
+
195
+ &[data-layout="thirds"] {
196
+ --grid-placement: auto-fit;
197
+ --grid-min-item-size: clamp(16rem, 33%, 20rem);
198
+ }
199
+ }
200
+
201
+ /*
202
+ SWITCHER
203
+ More info: https://every-layout.dev/layouts/switcher/
204
+ A layout that allows you to lay **3** items next to each other
205
+ until there is not enough horizontal space to allow that.
206
+
207
+ CUSTOM PROPERTIES AND CONFIGURATION
208
+ --gutter (var(--space-size-1)): This defines the space
209
+ between each item
210
+
211
+ --switcher-target-container-width (40rem): How large the container
212
+ needs to be to allow items to sit inline with each other
213
+
214
+ --switcher-vertical-alignment How items should align vertically.
215
+ Can be any acceptable flexbox alignment value.
216
+ */
217
+ :where(.nc-switcher) {
218
+ display: flex;
219
+ flex-wrap: wrap;
220
+ gap: var(--switcher-gap, var(--spacing-base));
221
+ align-items: var(--switcher-vertical-alignment, flex-start);
222
+
223
+ & > * {
224
+ flex-grow: 1;
225
+ flex-basis: calc((var(--switcher-target-container-width, 40rem) - 100%) * 999);
226
+ }
227
+
228
+ /* Max 2 items,
229
+ so anything greater than 2 is ful width */
230
+
231
+ & > :nth-child(n + 4) {
232
+ flex-basis: 100%;
233
+ }
234
+ }
235
+
236
+ /* PILE
237
+ * Pile items on top of each other Prefer this over position absolute.
238
+ */
239
+ :where(.nc-pile) {
240
+ display: grid;
241
+ place-items: center;
242
+ grid: [pile] 1fr / [pile] 1fr;
243
+
244
+ & > * {
245
+ grid-area: pile;
246
+ }
247
+ }
248
+
249
+ :where(.nc-stack, .nc-cluster, .nc-with-sidebar, .nc-grid, .nc-gallery, .nc-switcher) {
250
+ &.-inherit {
251
+ gap: inherit;
252
+ }
253
+
254
+ &.-tiny {
255
+ gap: var(--spacing-tiny);
256
+ }
257
+
258
+ &.-nearest {
259
+ gap: var(--spacing-nearest);
260
+ }
261
+
262
+ &.-near {
263
+ gap: var(--spacing-near);
264
+ }
265
+
266
+ &.-base {
267
+ gap: var(--spacing-base);
268
+ }
269
+
270
+ &.-far {
271
+ gap: var(--spacing-far);
272
+ }
273
+
274
+ &.-farthest {
275
+ gap: var(--spacing-farthest);
276
+ }
277
+
278
+ &.-nogap {
279
+ gap: 0;
280
+ }
281
+ }
282
+
283
+ :where(.nc-ram-grid) {
284
+ --_nc-ram-grid-gap-row: var(--nc-ram-grid-gap-row, var(--_nc-ram-grid-gap));
285
+ --_nc-ram-grid-gap-column: var(--nc-ram-grid-gap-column, var(--_nc-ram-grid-gap));
286
+ --_nc-ram-grid-gap: var(--nc-ram-grid-gap, var(--spacing-near));
287
+ --_nc-ram-grid-min-width: var(--nc-ram-grid-min-width, 150px);
288
+ --_nc-ram-grid-repeat-count: var(--nc-ram-grid-repeat-count, auto-fit);
289
+
290
+ display: grid;
291
+ row-gap: var(--_nc-ram-grid-gap-row);
292
+ column-gap: var(--_nc-ram-grid-gap-column);
293
+ grid-template-columns: repeat(
294
+ var(--_nc-ram-grid-repeat-count),
295
+ minmax(min(var(--_nc-ram-grid-min-width), 100%), 1fr)
296
+ );
297
+ }
298
+ }
@@ -0,0 +1,55 @@
1
+ @custom-media --motionOK (prefers-reduced-motion: no-preference);
2
+ @custom-media --motionNotOK (prefers-reduced-motion: reduce);
3
+ @custom-media --opacityOK (prefers-reduced-transparency: no-preference);
4
+ @custom-media --opacityNotOK (prefers-reduced-transparency: reduce);
5
+ @custom-media --useDataOK (prefers-reduced-data: no-preference);
6
+ @custom-media --useDataNotOK (prefers-reduced-data: reduce);
7
+
8
+ @custom-media --OSdark (prefers-color-scheme: dark);
9
+ @custom-media --OSlight (prefers-color-scheme: light);
10
+
11
+ @custom-media --highContrast (prefers-contrast: more);
12
+ @custom-media --lowContrast (prefers-contrast: less);
13
+
14
+ @custom-media --portrait (orientation: portrait);
15
+ @custom-media --landscape (orientation: landscape);
16
+
17
+ @custom-media --HDcolor (dynamic-range: high);
18
+
19
+ @custom-media --touch (hover: none) and (pointer: coarse);
20
+ @custom-media --stylus (hover: none) and (pointer: fine);
21
+ @custom-media --pointer (hover) and (pointer: coarse);
22
+ @custom-media --mouse (hover) and (pointer: fine);
23
+
24
+ @custom-media --xxs-only (0px <= width <= 240px);
25
+ @custom-media --xxs-n-above (width >= 240px);
26
+ @custom-media --xxs-n-below (width <= 240px);
27
+ @custom-media --xxs-phone (--xxs-only) and (--portrait);
28
+
29
+ @custom-media --xs-only (240px <= width <= 360px);
30
+ @custom-media --xs-n-above (width >= 360px);
31
+ @custom-media --xs-n-below (width <= 360px);
32
+ @custom-media --xs-phone (--xs-only) and (--portrait);
33
+
34
+ @custom-media --sm-only (360px <= width <= 480px);
35
+ @custom-media --sm-n-above (width >= 480px);
36
+ @custom-media --sm-n-below (width <= 480px);
37
+ @custom-media --sm-phone (--sm-only) and (--portrait);
38
+
39
+ @custom-media --md-only (480px <= width <= 768px);
40
+ @custom-media --md-n-above (width >= 768px);
41
+ @custom-media --md-n-below (width <= 768px);
42
+ @custom-media --md-phone (--md-only) and (--portrait);
43
+
44
+ @custom-media --lg-only (768px <= width <= 1024px);
45
+ @custom-media --lg-n-above (width >= 1024px);
46
+ @custom-media --lg-n-below (width <= 1024px);
47
+ @custom-media --lg-phone (--lg-only) and (--portrait);
48
+
49
+ @custom-media --xl-only (1024px <= width <= 1440px);
50
+ @custom-media --xl-n-above (width >= 1440px);
51
+ @custom-media --xl-n-below (width <= 1440px);
52
+
53
+ @custom-media --xxl-only (1440px <= width <= 1920px);
54
+ @custom-media --xxl-n-above (width >= 1920px);
55
+ @custom-media --xxl-n-below (width <= 1920px);