@neatui/css 3.10.6 → 3.12.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.
- package/core/basic.scss +44 -269
- package/core/border.scss +32 -281
- package/core/color.scss +64 -20
- package/core/cols.scss +0 -33
- package/core/cover.scss +0 -11
- package/core/reset.scss +4 -13
- package/core/theme.scss +47 -25
- package/core/trim.scss +30 -12
- package/core/vars.scss +2 -1
- package/neatui.scss +2 -0
- package/package.json +15 -2
- package/postcss.config.js +20 -0
- package/core/cols@v2.scss +0 -128
- package/core/size.mobile.scss +0 -105
- package/core/var.scss +0 -2
package/core/trim.scss
CHANGED
|
@@ -376,36 +376,45 @@
|
|
|
376
376
|
&\+ {
|
|
377
377
|
width: #{$w_base + 1}em;
|
|
378
378
|
}
|
|
379
|
-
&\* {
|
|
379
|
+
&\*s {
|
|
380
380
|
width: #{$w_base * 2}em;
|
|
381
381
|
}
|
|
382
|
-
&\*
|
|
382
|
+
&\*m {
|
|
383
383
|
width: #{$w_base * 3}em;
|
|
384
384
|
}
|
|
385
|
+
&\*l {
|
|
386
|
+
width: #{$w_base * 4}em;
|
|
387
|
+
}
|
|
385
388
|
}
|
|
386
389
|
.#{$media}min-w-#{$sz} {
|
|
387
390
|
min-width: #{$w_base}em;
|
|
388
391
|
&\+ {
|
|
389
392
|
min-width: #{$w_base + 1}em;
|
|
390
393
|
}
|
|
391
|
-
&\* {
|
|
394
|
+
&\*s {
|
|
392
395
|
min-width: #{$w_base * 2}em;
|
|
393
396
|
}
|
|
394
|
-
&\*
|
|
397
|
+
&\*m {
|
|
395
398
|
min-width: #{$w_base * 3}em;
|
|
396
399
|
}
|
|
400
|
+
&\*l {
|
|
401
|
+
min-width: #{$w_base * 4}em;
|
|
402
|
+
}
|
|
397
403
|
}
|
|
398
404
|
.#{$media}max-w-#{$sz} {
|
|
399
405
|
max-width: #{$w_base}em;
|
|
400
406
|
&\+ {
|
|
401
407
|
max-width: #{$w_base + 1}em;
|
|
402
408
|
}
|
|
403
|
-
&\* {
|
|
409
|
+
&\*s {
|
|
404
410
|
max-width: #{$w_base * 2}em;
|
|
405
411
|
}
|
|
406
|
-
&\*
|
|
412
|
+
&\*m {
|
|
407
413
|
max-width: #{$w_base * 3}em;
|
|
408
414
|
}
|
|
415
|
+
&\*l {
|
|
416
|
+
max-width: #{$w_base * 4}em;
|
|
417
|
+
}
|
|
409
418
|
}
|
|
410
419
|
$w_base: $w_base + 2;
|
|
411
420
|
}
|
|
@@ -418,36 +427,45 @@
|
|
|
418
427
|
&\+ {
|
|
419
428
|
height: #{$h_base + 1}em;
|
|
420
429
|
}
|
|
421
|
-
&\* {
|
|
430
|
+
&\*s {
|
|
422
431
|
height: #{$h_base * 2}em;
|
|
423
432
|
}
|
|
424
|
-
&\*
|
|
433
|
+
&\*m {
|
|
425
434
|
height: #{$h_base * 3}em;
|
|
426
435
|
}
|
|
436
|
+
&\*l {
|
|
437
|
+
height: #{$h_base * 4}em;
|
|
438
|
+
}
|
|
427
439
|
}
|
|
428
440
|
.#{$media}min-h-#{$sz} {
|
|
429
441
|
min-height: #{$h_base}em;
|
|
430
442
|
&\+ {
|
|
431
443
|
min-height: #{$h_base + 1}em;
|
|
432
444
|
}
|
|
433
|
-
&\* {
|
|
445
|
+
&\*s {
|
|
434
446
|
min-height: #{$h_base * 2}em;
|
|
435
447
|
}
|
|
436
|
-
&\*
|
|
448
|
+
&\*m {
|
|
437
449
|
min-height: #{$h_base * 3}em;
|
|
438
450
|
}
|
|
451
|
+
&\*l {
|
|
452
|
+
min-height: #{$h_base * 4}em;
|
|
453
|
+
}
|
|
439
454
|
}
|
|
440
455
|
.#{$media}max-h-#{$sz} {
|
|
441
456
|
max-height: #{$h_base}em;
|
|
442
457
|
&\+ {
|
|
443
458
|
max-height: #{$h_base + 1}em;
|
|
444
459
|
}
|
|
445
|
-
&\* {
|
|
460
|
+
&\*s {
|
|
446
461
|
max-height: #{$h_base * 2}em;
|
|
447
462
|
}
|
|
448
|
-
&\*
|
|
463
|
+
&\*m {
|
|
449
464
|
max-height: #{$h_base * 3}em;
|
|
450
465
|
}
|
|
466
|
+
&\*l {
|
|
467
|
+
max-height: #{$h_base * 4}em;
|
|
468
|
+
}
|
|
451
469
|
}
|
|
452
470
|
$h_base: $h_base + 2;
|
|
453
471
|
}
|
package/core/vars.scss
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
// 分级
|
|
2
|
+
$grades: no, xs, ss, sm, sl, ms, mm, ml, ls, lm, ll, xl, xx;
|
package/neatui.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neatui/css",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "neatui",
|
|
5
5
|
"main": "./neatui.scss",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "xiaojunbo",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "yarn build:scss && yarn build:optimize && yarn build:minify",
|
|
10
|
+
"build:scss": "sass neatui.scss dist/neatui.css --no-source-map",
|
|
11
|
+
"build:optimize": "postcss dist/neatui.css -o dist/neatui.css --no-map",
|
|
12
|
+
"build:minify": "cleancss -o dist/neatui.min.css dist/neatui.css"
|
|
13
|
+
},
|
|
8
14
|
"peerDependencies": {},
|
|
9
|
-
"devDependencies": {
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"sass": "^1.80.7",
|
|
17
|
+
"postcss": "^8.4.49",
|
|
18
|
+
"postcss-cli": "^11.0.0",
|
|
19
|
+
"postcss-merge-rules": "^7.0.4",
|
|
20
|
+
"cssnano": "^7.0.6",
|
|
21
|
+
"clean-css-cli": "^5.6.3"
|
|
22
|
+
},
|
|
10
23
|
"dependencies": {}
|
|
11
24
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
plugins: [
|
|
3
|
+
require('cssnano')({
|
|
4
|
+
preset: ['default', {
|
|
5
|
+
mergeLonghand: true,
|
|
6
|
+
mergeRules: true,
|
|
7
|
+
discardComments: {
|
|
8
|
+
removeAll: false
|
|
9
|
+
},
|
|
10
|
+
normalizeWhitespace: false,
|
|
11
|
+
colormin: true,
|
|
12
|
+
minifySelectors: true,
|
|
13
|
+
minifyParams: true,
|
|
14
|
+
uniqueSelectors: true,
|
|
15
|
+
reduceIdents: false,
|
|
16
|
+
discardUnused: false
|
|
17
|
+
}]
|
|
18
|
+
})
|
|
19
|
+
]
|
|
20
|
+
};
|
package/core/cols@v2.scss
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
@use 'sass:math';
|
|
3
|
-
|
|
4
|
-
@mixin cols($cols: 24, $base: 160, $space: 1) {
|
|
5
|
-
$level: (
|
|
6
|
-
mob-s: 320px,
|
|
7
|
-
mob-m: 480px,
|
|
8
|
-
mob-l: 640px,
|
|
9
|
-
pad-s: 800px,
|
|
10
|
-
pad-m: 960px,
|
|
11
|
-
pad-l: 1120px,
|
|
12
|
-
dpc-s: 1280px,
|
|
13
|
-
dpc-m: 1440px,
|
|
14
|
-
dpc-l: 1600px
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
[ui-row] {
|
|
18
|
-
& {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
flex-wrap: wrap;
|
|
22
|
-
& > * {
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// 间距
|
|
28
|
-
&[ui-row~='space'] {
|
|
29
|
-
margin: -1rem;
|
|
30
|
-
& > * {
|
|
31
|
-
padding: 1rem;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@include mob {
|
|
36
|
-
// 间距
|
|
37
|
-
&[ui-row~='space'] {
|
|
38
|
-
margin: -0.5rem;
|
|
39
|
-
& > * {
|
|
40
|
-
padding: 0.5rem;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 撑满
|
|
46
|
-
&[ui-row~=':full'] {
|
|
47
|
-
& > * > * {
|
|
48
|
-
height: 100%;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// 用于容器需要居中对齐
|
|
53
|
-
&[ui-row~='inline'] {
|
|
54
|
-
display: inline-flex;
|
|
55
|
-
}
|
|
56
|
-
// 反向
|
|
57
|
-
&[ui-row~='reverse'] {
|
|
58
|
-
flex-direction: row-reverse;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// 表格使用栅格
|
|
63
|
-
tr[ui-row] {
|
|
64
|
-
display: table-row;
|
|
65
|
-
}
|
|
66
|
-
td,
|
|
67
|
-
th {
|
|
68
|
-
&[ui-col] {
|
|
69
|
-
display: table-cell;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// 响应断点
|
|
74
|
-
$level: 'mob-s', 'mob-m', 'mob-l', 'pad-s', 'pad-m', 'pad-l', 'dpc-s', 'dpc-m', 'dpc-l';
|
|
75
|
-
$level2: 'mob', '', '', 'pad', '', '', 'dpc', '', '';
|
|
76
|
-
|
|
77
|
-
@each $i in $level {
|
|
78
|
-
$d: list.nth($level2, list.index($level, $i));
|
|
79
|
-
// 遍历断点
|
|
80
|
-
$base: $base + 160;
|
|
81
|
-
// 基础
|
|
82
|
-
@if ($i == 'mob-s') {
|
|
83
|
-
@for $n from 0 through $cols {
|
|
84
|
-
// 宽度
|
|
85
|
-
$w: calc(math.floor(calc(100% / $cols * $n) * 100000) / 100000);
|
|
86
|
-
[ui-row~='mob-#{$n}'] > *,
|
|
87
|
-
[ui-row~='#{$i}-#{$n}'] > *,
|
|
88
|
-
[ui-row] [ui-col~='mob-#{$n}'],
|
|
89
|
-
[ui-row] [ui-col~='#{$i}-#{$n}'] {
|
|
90
|
-
width: #{$w};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
} @else {
|
|
94
|
-
@media (min-width: #{$base}px) {
|
|
95
|
-
@for $n from 0 through $cols {
|
|
96
|
-
// 宽度
|
|
97
|
-
$w: calc((math.floor((calc(100% / $cols) * $n) * 100000) / 100000));
|
|
98
|
-
@if ($d != '') {
|
|
99
|
-
// 三端
|
|
100
|
-
[ui-row~='#{$d}-#{$n}'] > *,
|
|
101
|
-
[ui-row] [ui-col~='#{$d}-#{$n}'],
|
|
102
|
-
// 细分三端
|
|
103
|
-
[ui-row~='#{$i}-#{$n}'] > *,
|
|
104
|
-
[ui-row] [ui-col~='#{$i}-#{$n}'] {
|
|
105
|
-
width: #{$w};
|
|
106
|
-
}
|
|
107
|
-
} @else {
|
|
108
|
-
[ui-row~='#{$i}-#{$n}'] > *,
|
|
109
|
-
[ui-row] [ui-col~='#{$i}-#{$n}'] {
|
|
110
|
-
width: #{$w};
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// 自动
|
|
119
|
-
[ui-row~='mob-auto'],
|
|
120
|
-
[ui-row~='pad-auto'],
|
|
121
|
-
[ui-row~='dpc-auto'] {
|
|
122
|
-
justify-content: space-between;
|
|
123
|
-
& > * {
|
|
124
|
-
flex-grow: 1;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@include cols();
|
package/core/size.mobile.scss
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* 模块:字号
|
|
3
|
-
* 模块类型:b(基础模块)
|
|
4
|
-
* 精度:9 +
|
|
5
|
-
* 分级:3 +
|
|
6
|
-
* 适配:桌面 | 平析 | 移动
|
|
7
|
-
* 兼容:
|
|
8
|
-
* 版本:v0.0.1
|
|
9
|
-
* 备注:s->Small 小,m->Middle 中,l->Large 大;x->Extra 特大
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
// 全局字号
|
|
13
|
-
// @mixin baseSize($sz: 13) {
|
|
14
|
-
// $size: 'xs', 's', 'm', 'l', 'xl';
|
|
15
|
-
|
|
16
|
-
// @each $i in $size {
|
|
17
|
-
// [size='#{$i}'],
|
|
18
|
-
// [ui-size='#{$i}'] {
|
|
19
|
-
// $s: index($size, $i) + $sz;
|
|
20
|
-
// font-size: #{$s}px;
|
|
21
|
-
// }
|
|
22
|
-
// }
|
|
23
|
-
// }
|
|
24
|
-
|
|
25
|
-
// 分级字号
|
|
26
|
-
@mixin randSize($d: '') {
|
|
27
|
-
$rank: 'xs', 'ss', 'sm', 'sl', 'ms', 'mm', 'ml', 'ls', 'lm', 'll', 'xl';
|
|
28
|
-
// 分级字号
|
|
29
|
-
.#{$d}fs-no {
|
|
30
|
-
font-size: 0rem;
|
|
31
|
-
}
|
|
32
|
-
.#{$d}lh-no {
|
|
33
|
-
line-height: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
$sz: 0.2;
|
|
37
|
-
|
|
38
|
-
@each $k in $rank {
|
|
39
|
-
.#{$d}lh-#{$k} {
|
|
40
|
-
line-height: #{$sz * 5};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@if ($sz<0.2) {
|
|
44
|
-
$sz: $sz + 0.01;
|
|
45
|
-
} @else if ($sz<.28) {
|
|
46
|
-
$sz: $sz + 0.02;
|
|
47
|
-
} @else if($sz<.4) {
|
|
48
|
-
$sz: $sz + 0.04;
|
|
49
|
-
} @else if($sz<.6) {
|
|
50
|
-
$sz: $sz + 0.06;
|
|
51
|
-
} @else {
|
|
52
|
-
$sz: $sz + 0.08;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.#{$d}fs-#{$k},
|
|
56
|
-
.#{$d}fs-#{$k}-sub > *,
|
|
57
|
-
.#{$d}fs-#{$k}-sub\:sta > *::before,
|
|
58
|
-
.#{$d}fs-#{$k}-sub\:end > *::after,
|
|
59
|
-
.#{$d}fs-#{$k}\:sta::before,
|
|
60
|
-
.#{$d}fs-#{$k}\:end::after {
|
|
61
|
-
font-size: #{$sz}rem;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// 标题
|
|
66
|
-
$hsz: 1;
|
|
67
|
-
|
|
68
|
-
h1,
|
|
69
|
-
.h1 {
|
|
70
|
-
font-size: 2em;
|
|
71
|
-
}
|
|
72
|
-
h2,
|
|
73
|
-
.h2 {
|
|
74
|
-
font-size: 1.6em;
|
|
75
|
-
}
|
|
76
|
-
h3,
|
|
77
|
-
.h3 {
|
|
78
|
-
font-size: 1.4em;
|
|
79
|
-
}
|
|
80
|
-
h4,
|
|
81
|
-
.h4 {
|
|
82
|
-
font-size: 1.2em;
|
|
83
|
-
}
|
|
84
|
-
h5,
|
|
85
|
-
.h5 {
|
|
86
|
-
font-size: 1.1em;
|
|
87
|
-
}
|
|
88
|
-
h6,
|
|
89
|
-
.h6 {
|
|
90
|
-
font-size: 1em;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// 桌面
|
|
95
|
-
@include randSize();
|
|
96
|
-
|
|
97
|
-
// 平板
|
|
98
|
-
@media screen and (max-width: 1024px) {
|
|
99
|
-
@include randSize('pad\\:');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// 移动
|
|
103
|
-
@media screen and (max-width: 767px) {
|
|
104
|
-
@include randSize('mob\\:');
|
|
105
|
-
}
|
package/core/var.scss
DELETED