@letsprogram/ng-oat 0.1.6 → 0.1.8

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.
@@ -22,28 +22,83 @@
22
22
  }
23
23
 
24
24
  /* Column spans using CSS custom property */
25
- .col, [class*="col-"] { grid-column-end: span var(--span, var(--grid-cols)); }
26
-
27
- .col-1 { --span: 1; }
28
- .col-2 { --span: 2; }
29
- .col-3 { --span: 3; }
30
- .col-4 { --span: 4; }
31
- .col-5 { --span: 5; }
32
- .col-6 { --span: 6; }
33
- .col-7 { --span: 7; }
34
- .col-8 { --span: 8; }
35
- .col-9 { --span: 9; }
36
- .col-10 { --span: 10; }
37
- .col-11 { --span: 11; }
38
- .col-12 { --span: 12; }
25
+ .col,
26
+ [class*="col-"] {
27
+ grid-column-end: span var(--span, var(--grid-cols));
28
+ }
29
+
30
+ .col-1 {
31
+ --span: 1;
32
+ }
33
+
34
+ .col-2 {
35
+ --span: 2;
36
+ }
37
+
38
+ .col-3 {
39
+ --span: 3;
40
+ }
41
+
42
+ .col-4 {
43
+ --span: 4;
44
+ }
45
+
46
+ .col-5 {
47
+ --span: 5;
48
+ }
49
+
50
+ .col-6 {
51
+ --span: 6;
52
+ }
53
+
54
+ .col-7 {
55
+ --span: 7;
56
+ }
57
+
58
+ .col-8 {
59
+ --span: 8;
60
+ }
61
+
62
+ .col-9 {
63
+ --span: 9;
64
+ }
65
+
66
+ .col-10 {
67
+ --span: 10;
68
+ }
69
+
70
+ .col-11 {
71
+ --span: 11;
72
+ }
73
+
74
+ .col-12 {
75
+ --span: 12;
76
+ }
39
77
 
40
78
  /* Offsets via grid-column-start */
41
- .offset-1 { grid-column-start: 2; }
42
- .offset-2 { grid-column-start: 3; }
43
- .offset-3 { grid-column-start: 4; }
44
- .offset-4 { grid-column-start: 5; }
45
- .offset-5 { grid-column-start: 6; }
46
- .offset-6 { grid-column-start: 7; }
79
+ .offset-1 {
80
+ grid-column-start: 2;
81
+ }
82
+
83
+ .offset-2 {
84
+ grid-column-start: 3;
85
+ }
86
+
87
+ .offset-3 {
88
+ grid-column-start: 4;
89
+ }
90
+
91
+ .offset-4 {
92
+ grid-column-start: 5;
93
+ }
94
+
95
+ .offset-5 {
96
+ grid-column-start: 6;
97
+ }
98
+
99
+ .offset-6 {
100
+ grid-column-start: 7;
101
+ }
47
102
 
48
103
  .col-end {
49
104
  grid-column-start: span var(--span, 1);
@@ -68,29 +123,65 @@
68
123
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
69
124
  }
70
125
 
71
- /* Container-query breakpoints for .grid children */
72
- @container (min-width: 640px) {
73
- .grid { grid-template-columns: repeat(2, 1fr); }
126
+ /*
127
+ * .grid template-columns use @media (viewport-based) because a container
128
+ * element cannot query its own size — @container here would query the
129
+ * *parent* container, not .grid itself, leading to mismatched breakpoints
130
+ * when a sidebar or other layout shrinks the content area below 1024px.
131
+ */
132
+ @media (min-width: 640px) {
133
+ .grid {
134
+ grid-template-columns: repeat(2, 1fr);
135
+ }
136
+ }
137
+
138
+ @media (min-width: 1024px) {
139
+ .grid {
140
+ grid-template-columns: repeat(var(--grid-cols, 12), 1fr);
141
+ }
74
142
  }
75
- @container (min-width: 1024px) {
76
- .grid { grid-template-columns: repeat(var(--grid-cols, 12), 1fr); }
77
- .grid > * { grid-column: span var(--span, 1); }
143
+
144
+ /* Children's column span responds to the .grid container's own width */
145
+ @container (min-width: 640px) {
146
+ .grid>* {
147
+ grid-column: span var(--span, 1);
148
+ }
78
149
  }
79
150
 
80
151
  /* Allow explicit column count override on .grid: .grid.cols-2, .grid.cols-3, etc. */
81
- .grid.cols-2 { --grid-cols: 2; }
82
- .grid.cols-3 { --grid-cols: 3; }
83
- .grid.cols-4 { --grid-cols: 4; }
152
+ .grid.cols-2 {
153
+ --grid-cols: 2;
154
+ }
84
155
 
85
- @container (min-width: 640px) {
86
- .grid.cols-2, .grid.cols-3, .grid.cols-4 {
156
+ .grid.cols-3 {
157
+ --grid-cols: 3;
158
+ }
159
+
160
+ .grid.cols-4 {
161
+ --grid-cols: 4;
162
+ }
163
+
164
+ @media (min-width: 640px) {
165
+
166
+ .grid.cols-2,
167
+ .grid.cols-3,
168
+ .grid.cols-4 {
87
169
  grid-template-columns: repeat(2, 1fr);
88
170
  }
89
171
  }
90
- @container (min-width: 1024px) {
91
- .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
92
- .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
93
- .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
172
+
173
+ @media (min-width: 1024px) {
174
+ .grid.cols-2 {
175
+ grid-template-columns: repeat(2, 1fr);
176
+ }
177
+
178
+ .grid.cols-3 {
179
+ grid-template-columns: repeat(3, 1fr);
180
+ }
181
+
182
+ .grid.cols-4 {
183
+ grid-template-columns: repeat(4, 1fr);
184
+ }
94
185
  }
95
186
 
96
187
  /* ── Responsive .row breakpoints (media queries) ───────────────────────── */
@@ -100,9 +191,12 @@
100
191
  --grid-cols: 1;
101
192
  --grid-gap: 1rem;
102
193
  }
103
- .col, [class*="col-"] {
194
+
195
+ .col,
196
+ [class*="col-"] {
104
197
  --span: 1;
105
198
  }
199
+
106
200
  [class*="offset-"] {
107
201
  grid-column-start: auto;
108
202
  }
@@ -114,9 +208,12 @@
114
208
  --grid-cols: 4;
115
209
  --grid-gap: 1rem;
116
210
  }
117
- .col, [class*="col-"] {
211
+
212
+ .col,
213
+ [class*="col-"] {
118
214
  --span: 4;
119
215
  }
216
+
120
217
  [class*="offset-"] {
121
218
  grid-column-start: auto;
122
219
  }
@@ -125,65 +222,205 @@
125
222
  /* ── Responsive column classes (media queries for power users) ─────────── */
126
223
  /* sm: 640px+ */
127
224
  @media (min-width: 640px) {
128
- .sm\:col-1 { --span: 1; }
129
- .sm\:col-2 { --span: 2; }
130
- .sm\:col-3 { --span: 3; }
131
- .sm\:col-4 { --span: 4; }
132
- .sm\:col-5 { --span: 5; }
133
- .sm\:col-6 { --span: 6; }
134
- .sm\:col-7 { --span: 7; }
135
- .sm\:col-8 { --span: 8; }
136
- .sm\:col-9 { --span: 9; }
137
- .sm\:col-10 { --span: 10; }
138
- .sm\:col-11 { --span: 11; }
139
- .sm\:col-12 { --span: 12; }
225
+ .sm\:col-1 {
226
+ --span: 1;
227
+ }
228
+
229
+ .sm\:col-2 {
230
+ --span: 2;
231
+ }
232
+
233
+ .sm\:col-3 {
234
+ --span: 3;
235
+ }
236
+
237
+ .sm\:col-4 {
238
+ --span: 4;
239
+ }
240
+
241
+ .sm\:col-5 {
242
+ --span: 5;
243
+ }
244
+
245
+ .sm\:col-6 {
246
+ --span: 6;
247
+ }
248
+
249
+ .sm\:col-7 {
250
+ --span: 7;
251
+ }
252
+
253
+ .sm\:col-8 {
254
+ --span: 8;
255
+ }
256
+
257
+ .sm\:col-9 {
258
+ --span: 9;
259
+ }
260
+
261
+ .sm\:col-10 {
262
+ --span: 10;
263
+ }
264
+
265
+ .sm\:col-11 {
266
+ --span: 11;
267
+ }
268
+
269
+ .sm\:col-12 {
270
+ --span: 12;
271
+ }
140
272
  }
141
273
 
142
274
  /* md: 768px+ */
143
275
  @media (min-width: 768px) {
144
- .md\:col-1 { --span: 1; }
145
- .md\:col-2 { --span: 2; }
146
- .md\:col-3 { --span: 3; }
147
- .md\:col-4 { --span: 4; }
148
- .md\:col-5 { --span: 5; }
149
- .md\:col-6 { --span: 6; }
150
- .md\:col-7 { --span: 7; }
151
- .md\:col-8 { --span: 8; }
152
- .md\:col-9 { --span: 9; }
153
- .md\:col-10 { --span: 10; }
154
- .md\:col-11 { --span: 11; }
155
- .md\:col-12 { --span: 12; }
276
+ .md\:col-1 {
277
+ --span: 1;
278
+ }
279
+
280
+ .md\:col-2 {
281
+ --span: 2;
282
+ }
283
+
284
+ .md\:col-3 {
285
+ --span: 3;
286
+ }
287
+
288
+ .md\:col-4 {
289
+ --span: 4;
290
+ }
291
+
292
+ .md\:col-5 {
293
+ --span: 5;
294
+ }
295
+
296
+ .md\:col-6 {
297
+ --span: 6;
298
+ }
299
+
300
+ .md\:col-7 {
301
+ --span: 7;
302
+ }
303
+
304
+ .md\:col-8 {
305
+ --span: 8;
306
+ }
307
+
308
+ .md\:col-9 {
309
+ --span: 9;
310
+ }
311
+
312
+ .md\:col-10 {
313
+ --span: 10;
314
+ }
315
+
316
+ .md\:col-11 {
317
+ --span: 11;
318
+ }
319
+
320
+ .md\:col-12 {
321
+ --span: 12;
322
+ }
156
323
  }
157
324
 
158
325
  /* lg: 1024px+ */
159
326
  @media (min-width: 1024px) {
160
- .lg\:col-1 { --span: 1; }
161
- .lg\:col-2 { --span: 2; }
162
- .lg\:col-3 { --span: 3; }
163
- .lg\:col-4 { --span: 4; }
164
- .lg\:col-5 { --span: 5; }
165
- .lg\:col-6 { --span: 6; }
166
- .lg\:col-7 { --span: 7; }
167
- .lg\:col-8 { --span: 8; }
168
- .lg\:col-9 { --span: 9; }
169
- .lg\:col-10 { --span: 10; }
170
- .lg\:col-11 { --span: 11; }
171
- .lg\:col-12 { --span: 12; }
327
+ .lg\:col-1 {
328
+ --span: 1;
329
+ }
330
+
331
+ .lg\:col-2 {
332
+ --span: 2;
333
+ }
334
+
335
+ .lg\:col-3 {
336
+ --span: 3;
337
+ }
338
+
339
+ .lg\:col-4 {
340
+ --span: 4;
341
+ }
342
+
343
+ .lg\:col-5 {
344
+ --span: 5;
345
+ }
346
+
347
+ .lg\:col-6 {
348
+ --span: 6;
349
+ }
350
+
351
+ .lg\:col-7 {
352
+ --span: 7;
353
+ }
354
+
355
+ .lg\:col-8 {
356
+ --span: 8;
357
+ }
358
+
359
+ .lg\:col-9 {
360
+ --span: 9;
361
+ }
362
+
363
+ .lg\:col-10 {
364
+ --span: 10;
365
+ }
366
+
367
+ .lg\:col-11 {
368
+ --span: 11;
369
+ }
370
+
371
+ .lg\:col-12 {
372
+ --span: 12;
373
+ }
172
374
  }
173
375
 
174
376
  /* xl: 1280px+ */
175
377
  @media (min-width: 1280px) {
176
- .xl\:col-1 { --span: 1; }
177
- .xl\:col-2 { --span: 2; }
178
- .xl\:col-3 { --span: 3; }
179
- .xl\:col-4 { --span: 4; }
180
- .xl\:col-5 { --span: 5; }
181
- .xl\:col-6 { --span: 6; }
182
- .xl\:col-7 { --span: 7; }
183
- .xl\:col-8 { --span: 8; }
184
- .xl\:col-9 { --span: 9; }
185
- .xl\:col-10 { --span: 10; }
186
- .xl\:col-11 { --span: 11; }
187
- .xl\:col-12 { --span: 12; }
188
- }
189
- }
378
+ .xl\:col-1 {
379
+ --span: 1;
380
+ }
381
+
382
+ .xl\:col-2 {
383
+ --span: 2;
384
+ }
385
+
386
+ .xl\:col-3 {
387
+ --span: 3;
388
+ }
389
+
390
+ .xl\:col-4 {
391
+ --span: 4;
392
+ }
393
+
394
+ .xl\:col-5 {
395
+ --span: 5;
396
+ }
397
+
398
+ .xl\:col-6 {
399
+ --span: 6;
400
+ }
401
+
402
+ .xl\:col-7 {
403
+ --span: 7;
404
+ }
405
+
406
+ .xl\:col-8 {
407
+ --span: 8;
408
+ }
409
+
410
+ .xl\:col-9 {
411
+ --span: 9;
412
+ }
413
+
414
+ .xl\:col-10 {
415
+ --span: 10;
416
+ }
417
+
418
+ .xl\:col-11 {
419
+ --span: 11;
420
+ }
421
+
422
+ .xl\:col-12 {
423
+ --span: 12;
424
+ }
425
+ }
426
+ }
@@ -7,19 +7,19 @@
7
7
  min-height: 100dvh;
8
8
  gap: var(--space-4);
9
9
 
10
- > main {
10
+ >main {
11
11
  min-width: 0;
12
12
  }
13
13
 
14
14
  &:has(nav[data-topnav]) {
15
15
  --topnav-offset: var(--space-12);
16
16
 
17
- > main [id] {
17
+ >main [id] {
18
18
  scroll-margin-block-start: calc(var(--space-12) + var(--space-6));
19
19
  }
20
20
  }
21
21
 
22
- > aside[data-sidebar] {
22
+ >aside[data-sidebar] {
23
23
  position: sticky;
24
24
  top: var(--topnav-offset);
25
25
  z-index: 1;
@@ -36,11 +36,11 @@
36
36
  padding: var(--space-3);
37
37
  }
38
38
 
39
- > footer {
39
+ >footer {
40
40
  margin-block-start: auto;
41
41
  }
42
42
 
43
- > nav {
43
+ >nav {
44
44
  flex: 1;
45
45
  min-height: 0;
46
46
  overflow-y: auto;
@@ -78,9 +78,18 @@
78
78
  border: none;
79
79
  overflow: visible;
80
80
 
81
- & + details { margin-top: 0; }
82
- &[open] summary { border-bottom: none; }
83
- > ul { margin-inline-start: var(--space-4); padding: var(--space-1) 0; }
81
+ &+details {
82
+ margin-top: 0;
83
+ }
84
+
85
+ &[open] summary {
86
+ border-bottom: none;
87
+ }
88
+
89
+ >ul {
90
+ margin-inline-start: var(--space-4);
91
+ padding: var(--space-1) 0;
92
+ }
84
93
  }
85
94
 
86
95
  summary {
@@ -110,13 +119,13 @@
110
119
  background-color: var(--background);
111
120
  border-bottom: 1px solid var(--border);
112
121
  box-shadow: var(--shadow-small);
113
-
122
+
114
123
  a {
115
124
  text-decoration: none;
116
125
  }
117
126
  }
118
127
 
119
- nav[data-topnav] ~ main {
128
+ nav[data-topnav]~main {
120
129
  margin-block-start: var(--space-12);
121
130
  }
122
131
 
@@ -139,7 +148,7 @@
139
148
  display: inline-block;
140
149
  }
141
150
 
142
- > aside[data-sidebar] {
151
+ >aside[data-sidebar] {
143
152
  transform: translateX(0);
144
153
  opacity: 1;
145
154
  transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
@@ -149,7 +158,7 @@
149
158
  grid-template-columns: 0px 1fr;
150
159
  gap: 0;
151
160
 
152
- > aside[data-sidebar] {
161
+ >aside[data-sidebar] {
153
162
  overflow: hidden;
154
163
  min-width: 0;
155
164
  transform: translateX(-100%);
@@ -165,7 +174,7 @@
165
174
  [data-sidebar-layout] {
166
175
  grid-template-columns: 1fr;
167
176
 
168
- > aside[data-sidebar] {
177
+ >aside[data-sidebar] {
169
178
  position: fixed;
170
179
  left: 0;
171
180
  width: min(16rem, 80vw);
@@ -174,11 +183,14 @@
174
183
  box-shadow: var(--shadow-large);
175
184
  }
176
185
 
177
- &[data-sidebar-open] > aside[data-sidebar] {
186
+ &[data-sidebar-open]>aside[data-sidebar] {
178
187
  transform: translateX(0);
179
188
  }
180
189
  }
181
- [data-sidebar-toggle] { display: inline-block; }
190
+
191
+ [data-sidebar-toggle] {
192
+ display: inline-block;
193
+ }
182
194
 
183
195
  [data-sidebar-header] {
184
196
  display: flex;
@@ -188,4 +200,4 @@
188
200
  border-bottom: 1px solid var(--border);
189
201
  }
190
202
  }
191
- }
203
+ }