pacem-less 0.40.0-delphi → 0.40.0-durovernon

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.
@@ -1,6 +1,12 @@
1
1
  @import "../shared";
2
2
 
3
3
  .@{PCSS}-contain {
4
+ contain: size;
5
+
6
+ &.contain-size {
7
+ // default
8
+ }
9
+
4
10
  &.contain-none {
5
11
  contain: none;
6
12
  }
@@ -9,10 +15,6 @@
9
15
  contain: strict;
10
16
  }
11
17
 
12
- &.contain-size {
13
- contain: size;
14
- }
15
-
16
18
  &.contain-inline-size {
17
19
  contain: inline-size;
18
20
  }
@@ -30,18 +32,19 @@
30
32
  }
31
33
  }
32
34
 
33
- /* container queries */
34
35
  .@{PCSS}-container {
36
+ container-type: inline-size;
37
+ container-name: ~"@{PCSS}";
35
38
 
36
- &.container-normal {
37
- container-type: normal;
39
+ &.container-inline-size {
40
+ // default
38
41
  }
39
42
 
40
43
  &.container-size {
41
44
  container-type: size;
42
45
  }
43
46
 
44
- &.container-inline-size {
45
- container-type: inline-size;
47
+ &.container-normal {
48
+ container-type: normal;
46
49
  }
47
50
  }
@@ -215,74 +215,53 @@
215
215
  // TODO: exploit container queries
216
216
  }
217
217
 
218
+
219
+ @sizes: sm, md, lg, xl, hd, 2k, 4k;
220
+
218
221
  @media (max-width: @threshold_sm - 1) {
219
222
 
220
- .@{PCSS}-grid .@{PCSS}-cell {
223
+ .@{PCSS}-grid:not(.grid-contained) .@{PCSS}-cell {
221
224
  .ColsMid(cols, xs, 12);
222
225
  .RowsMid(rows, xs, 12);
223
226
  }
224
227
  }
225
228
 
226
- @media (min-width: @threshold_sm) {
227
-
228
- .@{PCSS}-grid .@{PCSS}-cell {
229
- .ColsMid(cols, sm, 12);
230
- .RowsMid(rows, sm, 12);
231
- }
232
- }
233
-
234
- @media (min-width: @threshold_md) {
235
-
236
- .@{PCSS}-grid .@{PCSS}-cell {
237
- .ColsMid(cols, md, 12);
238
- .RowsMid(rows, md, 12);
239
- }
240
- }
241
-
242
- @media (min-width: @threshold_lg) {
243
-
244
- .@{PCSS}-grid .@{PCSS}-cell {
245
- .ColsMid(cols, lg, 12);
246
- .RowsMid(rows, lg, 12);
247
- }
248
- }
249
-
250
- @media (min-width: @threshold_xl) {
251
-
252
- .@{PCSS}-grid .@{PCSS}-cell {
253
- .ColsMid(cols, xl, 12);
254
- .RowsMid(rows, xl, 12);
255
- }
256
- }
257
-
258
- @media (min-width: @threshold_hd) {
259
-
260
- .@{PCSS}-grid .@{PCSS}-cell {
261
- .ColsMid(cols, hd, 12);
262
- .RowsMid(rows, hd, 12);
229
+ each(@sizes, {
230
+ @_threshold: ~"threshold_@{value}";
231
+ @media (min-width: @@_threshold){
232
+
233
+ .@{PCSS}-grid:not(.grid-contained) .@{PCSS}-cell {
234
+ .ColsMid(cols, @value, 12);
235
+ .RowsMid(rows, @value, 12);
236
+ }
263
237
  }
264
- }
238
+ })
265
239
 
266
- @media (min-width: @threshold_2k) {
240
+ @media (orientation: portrait) {
267
241
 
268
242
  .@{PCSS}-grid .@{PCSS}-cell {
269
- .ColsMid(cols, 2k, 12);
270
- .RowsMid(rows, 2k, 12);
243
+ .ColsMid(cols, v, 12);
244
+ .RowsMid(rows, v, 12);
271
245
  }
272
246
  }
273
247
 
274
- @media (min-width: @threshold_4k) {
248
+ // container queries
249
+ @_threshold_xs: @threshold_sm - 1;
250
+ @container ~"@{PCSS}" (max-width: @_threshold_xs) {
275
251
 
276
- .@{PCSS}-grid .@{PCSS}-cell {
277
- .ColsMid(cols, 4k, 12);
278
- .RowsMid(rows, 4k, 12);
252
+ .@{PCSS}-grid.grid-contained .@{PCSS}-cell {
253
+ .ColsMid(cols, xs, 12);
254
+ .RowsMid(rows, xs, 12);
279
255
  }
280
256
  }
281
257
 
282
- @media (orientation: portrait) {
283
-
284
- .@{PCSS}-grid .@{PCSS}-cell {
285
- .ColsMid(cols, v, 12);
286
- .RowsMid(rows, v, 12);
258
+ each(@sizes, {
259
+ @_threshold: ~"threshold_@{value}";
260
+ @container @PCSS (min-width: @@_threshold){
261
+
262
+ .@{PCSS}-grid.grid-contained .@{PCSS}-cell {
263
+ .ColsMid(cols, @value, 12);
264
+ .RowsMid(rows, @value, 12);
265
+ }
287
266
  }
288
- }
267
+ })
@@ -19,6 +19,7 @@
19
19
  @import "breadcrumbs";
20
20
  @import "fetch-feedback";
21
21
  @import "container";
22
+ @import "scroll";
22
23
  @import "coloring";
23
24
  @import "borders";
24
25
  @import "shapes";
@@ -0,0 +1,78 @@
1
+ @import "../shared";
2
+
3
+ .scroll-snap {
4
+ scroll-behavior: smooth;
5
+ scroll-snap-type: both;
6
+
7
+ &.snap-proximity {
8
+ scroll-snap-type: both proximity;
9
+ }
10
+
11
+ &.snap-mandatory {
12
+ scroll-snap-type: both mandatory;
13
+ }
14
+
15
+ &.snap-inline {
16
+ scroll-snap-type: inline;
17
+
18
+ &.snap-proximity {
19
+ scroll-snap-type: inline proximity;
20
+ }
21
+
22
+ &.snap-mandatory {
23
+ scroll-snap-type: inline mandatory;
24
+ }
25
+ }
26
+
27
+ &.snap-block {
28
+ scroll-snap-type: block;
29
+
30
+ &.snap-proximity {
31
+ scroll-snap-type: block proximity;
32
+ }
33
+
34
+ &.snap-mandatory {
35
+ scroll-snap-type: block mandatory;
36
+ }
37
+ }
38
+
39
+ &.snap-x {
40
+ scroll-snap-type: x;
41
+
42
+ &.snap-proximity {
43
+ scroll-snap-type: x proximity;
44
+ }
45
+
46
+ &.snap-mandatory {
47
+ scroll-snap-type: x mandatory;
48
+ }
49
+ }
50
+
51
+ &.snap-y {
52
+ scroll-snap-type: y;
53
+
54
+ &.snap-proximity {
55
+ scroll-snap-type: y proximity;
56
+ }
57
+
58
+ &.snap-mandatory {
59
+ scroll-snap-type: y mandatory;
60
+ }
61
+ }
62
+
63
+ > * {
64
+ scroll-snap-align: start;
65
+
66
+ &.snap-start {
67
+ // defaults to start
68
+ }
69
+
70
+ &.snap-center {
71
+ scroll-snap-align: center;
72
+ }
73
+
74
+ &.snap-end {
75
+ scroll-snap-align: end;
76
+ }
77
+ }
78
+ }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.40.0-delphi",
2
+ "version": "0.40.0-durovernon",
3
3
  "name": "pacem-less",
4
4
  "homepage": "https://js.pacem.it",
5
5
  "repository": {