@itcase/config 1.0.27 → 1.0.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/config",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "author": "ITCase",
5
5
  "description": "Config",
6
6
  "engines": {
@@ -40,7 +40,6 @@
40
40
  "postcss-cli": "^11.0.1",
41
41
  "postcss-color-hsla-fallback": "^1.0.0",
42
42
  "postcss-combine-duplicated-selectors": "^10.0.3",
43
- "postcss-custom-css-units": "^0.1.0",
44
43
  "postcss-dark-theme-class": "^1.3.0",
45
44
  "postcss-discard-duplicates": "^7.0.1",
46
45
  "postcss-each": "^1.1.0",
@@ -74,6 +73,7 @@
74
73
  "eslint": "^9.24.0",
75
74
  "husky": "^9.1.7",
76
75
  "lint-staged": "^15.5.1",
76
+ "postcss-convert-unit": "^0.1.3",
77
77
  "prettier": "^3.5.3",
78
78
  "semantic-release": "^24.2.3",
79
79
  "stylelint": "^16.18.0",
package/postcss/index.js CHANGED
@@ -25,10 +25,21 @@ export default {
25
25
  'postcss-each',
26
26
  'postcss-mixins',
27
27
  [
28
- 'postcss-custom-css-units',
28
+ 'postcss-convert-units',
29
29
  {
30
- baseUnit: '--module-unit',
31
- customUnit: 'm',
30
+ convertConfig: [
31
+ {
32
+ declConvertRules: [
33
+ {
34
+ value: (value) => value * 8,
35
+ },
36
+ ],
37
+ declMatcher: {
38
+ sourceUnit: 'm',
39
+ targetUnit: 'px',
40
+ },
41
+ },
42
+ ],
32
43
  },
33
44
  ],
34
45
  'postcss-flexbugs-fixes',
@@ -47,8 +58,8 @@ export default {
47
58
  [
48
59
  'postcss-url',
49
60
  {
50
- url: 'inline',
51
61
  maxSize: 256,
62
+ url: 'inline',
52
63
  },
53
64
  ],
54
65
  'postcss-nested-ancestors',
@@ -11,9 +11,20 @@ module.exports = {
11
11
  require('postcss-each'),
12
12
  require('postcss-mixins'),
13
13
  require('postcss-flexbugs-fixes'),
14
- require('postcss-custom-css-units')({
15
- baseUnit: '--module-unit',
16
- customUnit: 'm',
14
+ require('postcss-convert-units')({
15
+ convertConfig: [
16
+ {
17
+ declMatcher: {
18
+ sourceUnit: 'm',
19
+ targetUnit: 'px',
20
+ },
21
+ declConvertRules: [
22
+ {
23
+ value: (value) => value * 8,
24
+ },
25
+ ],
26
+ },
27
+ ],
17
28
  }),
18
29
  require('postcss-preset-env')({
19
30
  features: {
@@ -11,9 +11,20 @@ module.exports = {
11
11
  require('postcss-import')({ addModulesDirectories: ['node_modules'] }),
12
12
  require('postcss-each'),
13
13
  require('postcss-mixins'),
14
- require('postcss-custom-css-units')({
15
- baseUnit: '--module-unit',
16
- customUnit: 'm',
14
+ require('postcss-convert-units')({
15
+ convertConfig: [
16
+ {
17
+ declConvertRules: [
18
+ {
19
+ value: (value) => value * 8,
20
+ },
21
+ ],
22
+ declMatcher: {
23
+ sourceUnit: 'm',
24
+ targetUnit: 'px',
25
+ },
26
+ },
27
+ ],
17
28
  }),
18
29
  require('postcss-flexbugs-fixes'),
19
30
  require('postcss-preset-env')({
@@ -19,9 +19,20 @@ module.exports = {
19
19
  require('postcss-each'),
20
20
  require('postcss-mixins'),
21
21
  require('postcss-flexbugs-fixes'),
22
- require('postcss-custom-css-units')({
23
- baseUnit: '--module-unit',
24
- customUnit: 'm',
22
+ require('postcss-convert-units')({
23
+ convertConfig: [
24
+ {
25
+ declMatcher: {
26
+ sourceUnit: 'm',
27
+ targetUnit: 'px',
28
+ },
29
+ declConvertRules: [
30
+ {
31
+ value: (value) => value * 8,
32
+ },
33
+ ],
34
+ },
35
+ ],
25
36
  }),
26
37
  require('postcss-custom-css-units')({
27
38
  baseUnit: '--module-unit',