@neatui/css 3.17.0 → 4.0.1

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/core/trim.scss CHANGED
@@ -1,5 +1,87 @@
1
1
  @use "./media.scss" as *;
2
2
 
3
+ $dimension-base: (
4
+ xs: 0.5,
5
+ ss: 1,
6
+ sm: 1.5,
7
+ sl: 2,
8
+ ms: 2.5,
9
+ mm: 3,
10
+ ml: 3.5,
11
+ ls: 4,
12
+ lm: 4.5,
13
+ ll: 5,
14
+ xl: 5.5,
15
+ );
16
+
17
+ $dimension-s: (
18
+ xs: 6,
19
+ ss: 7,
20
+ sm: 8,
21
+ sl: 9,
22
+ ms: 10,
23
+ mm: 11,
24
+ ml: 12,
25
+ ls: 13,
26
+ lm: 14,
27
+ ll: 15,
28
+ xl: 16,
29
+ );
30
+
31
+ $dimension-m: (
32
+ xs: 18,
33
+ ss: 20,
34
+ sm: 22,
35
+ sl: 24,
36
+ ms: 26,
37
+ mm: 28,
38
+ ml: 30,
39
+ ls: 32,
40
+ lm: 34,
41
+ ll: 36,
42
+ xl: 38,
43
+ );
44
+
45
+ $dimension-l: (
46
+ xs: 42,
47
+ ss: 46,
48
+ sm: 50,
49
+ sl: 54,
50
+ ms: 58,
51
+ mm: 62,
52
+ ml: 66,
53
+ ls: 70,
54
+ lm: 74,
55
+ ll: 78,
56
+ xl: 82,
57
+ );
58
+
59
+ @mixin dimension-scale($media, $prefix, $property) {
60
+ .#{$media}#{$prefix}-no {
61
+ #{$property}: 0;
62
+ }
63
+ @each $sz, $value in $dimension-base {
64
+ .#{$media}#{$prefix}-#{$sz} {
65
+ #{$property}: #{$value}em;
66
+ }
67
+ }
68
+ @each $sz, $value in $dimension-s {
69
+ .#{$media}#{$prefix}-#{$sz}\*s {
70
+ #{$property}: #{$value}em;
71
+ }
72
+ }
73
+ @each $sz, $value in $dimension-m {
74
+ .#{$media}#{$prefix}-#{$sz}\*m {
75
+ #{$property}: #{$value}em;
76
+ }
77
+ }
78
+ @each $sz, $value in $dimension-l {
79
+ .#{$media}#{$prefix}-#{$sz}\*l {
80
+ #{$property}: #{$value}em;
81
+ }
82
+ }
83
+ }
84
+
3
85
  @mixin trim($media: "") {
4
86
  $size: (no, xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl);
5
87
 
@@ -369,106 +451,14 @@
369
451
  }
370
452
 
371
453
  // 宽度
372
- $w_base: 0;
373
- @each $sz in $size {
374
- .#{$media}w-#{$sz} {
375
- width: #{$w_base}em;
376
- &\+ {
377
- width: #{$w_base + 1}em;
378
- }
379
- &\*s {
380
- width: #{$w_base * 2}em;
381
- }
382
- &\*m {
383
- width: #{$w_base * 3}em;
384
- }
385
- &\*l {
386
- width: #{$w_base * 4}em;
387
- }
388
- }
389
- .#{$media}min-w-#{$sz} {
390
- min-width: #{$w_base}em;
391
- &\+ {
392
- min-width: #{$w_base + 1}em;
393
- }
394
- &\*s {
395
- min-width: #{$w_base * 2}em;
396
- }
397
- &\*m {
398
- min-width: #{$w_base * 3}em;
399
- }
400
- &\*l {
401
- min-width: #{$w_base * 4}em;
402
- }
403
- }
404
- .#{$media}max-w-#{$sz} {
405
- max-width: #{$w_base}em;
406
- &\+ {
407
- max-width: #{$w_base + 1}em;
408
- }
409
- &\*s {
410
- max-width: #{$w_base * 2}em;
411
- }
412
- &\*m {
413
- max-width: #{$w_base * 3}em;
414
- }
415
- &\*l {
416
- max-width: #{$w_base * 4}em;
417
- }
418
- }
419
- $w_base: $w_base + 2;
420
- }
454
+ @include dimension-scale($media, "w", width);
455
+ @include dimension-scale($media, "min-w", min-width);
456
+ @include dimension-scale($media, "max-w", max-width);
421
457
 
422
458
  // 高度
423
- $h_base: 0;
424
- @each $sz in $size {
425
- .#{$media}h-#{$sz} {
426
- height: #{$h_base}em;
427
- &\+ {
428
- height: #{$h_base + 1}em;
429
- }
430
- &\*s {
431
- height: #{$h_base * 2}em;
432
- }
433
- &\*m {
434
- height: #{$h_base * 3}em;
435
- }
436
- &\*l {
437
- height: #{$h_base * 4}em;
438
- }
439
- }
440
- .#{$media}min-h-#{$sz} {
441
- min-height: #{$h_base}em;
442
- &\+ {
443
- min-height: #{$h_base + 1}em;
444
- }
445
- &\*s {
446
- min-height: #{$h_base * 2}em;
447
- }
448
- &\*m {
449
- min-height: #{$h_base * 3}em;
450
- }
451
- &\*l {
452
- min-height: #{$h_base * 4}em;
453
- }
454
- }
455
- .#{$media}max-h-#{$sz} {
456
- max-height: #{$h_base}em;
457
- &\+ {
458
- max-height: #{$h_base + 1}em;
459
- }
460
- &\*s {
461
- max-height: #{$h_base * 2}em;
462
- }
463
- &\*m {
464
- max-height: #{$h_base * 3}em;
465
- }
466
- &\*l {
467
- max-height: #{$h_base * 4}em;
468
- }
469
- }
470
- $h_base: $h_base + 2;
471
- }
459
+ @include dimension-scale($media, "h", height);
460
+ @include dimension-scale($media, "min-h", min-height);
461
+ @include dimension-scale($media, "max-h", max-height);
472
462
 
473
463
  // 缩小
474
464
  .#{$media}s-no {
package/index.scss ADDED
@@ -0,0 +1 @@
1
+ @forward './neatui.scss';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neatui/css",
3
- "version": "3.17.0",
3
+ "version": "4.0.1",
4
4
  "description": "neatui",
5
5
  "main": "./neatui.scss",
6
6
  "license": "MIT",