stylelint-plugin-logical-css 0.11.0 → 0.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/README.md
CHANGED
|
@@ -93,6 +93,8 @@ physical property or value is found, it will be flagged.
|
|
|
93
93
|
.heading {
|
|
94
94
|
max-width: 90ch; /* Will flag the use of "width" */
|
|
95
95
|
text-align: left; /* Will flag the use of "left" */
|
|
96
|
+
opacity: 1;
|
|
97
|
+
transition: opacity 1s ease, max-width 1s ease; /* Will flag the use of 'max-width' */
|
|
96
98
|
}
|
|
97
99
|
```
|
|
98
100
|
|
|
@@ -102,6 +104,8 @@ physical property or value is found, it will be flagged.
|
|
|
102
104
|
.heading {
|
|
103
105
|
max-inline-size: 90ch;
|
|
104
106
|
text-align: start;
|
|
107
|
+
opacity: 1;
|
|
108
|
+
transition: opacity 1s ease, max-inline-size: 1s ease;
|
|
105
109
|
}
|
|
106
110
|
```
|
|
107
111
|
|
|
@@ -281,6 +285,8 @@ body {
|
|
|
281
285
|
|
|
282
286
|
| Physical Unit | Logical Unit |
|
|
283
287
|
| ------------- | ------------- |
|
|
288
|
+
| cqh | cqb |
|
|
289
|
+
| cqw | cqi |
|
|
284
290
|
| dvh | dvb |
|
|
285
291
|
| dvw | dvi |
|
|
286
292
|
| lvh | lvb |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { physicalUnits } = require('./physical');
|
|
2
2
|
|
|
3
|
-
const expression = /(\d+\s?)(dvh|dvw|lvh|lvw|svh|svw|vh|vw|)(\s+|$)/;
|
|
3
|
+
const expression = /(\d+\s?)(cqh|cqw|dvh|dvw|lvh|lvw|svh|svw|vh|vw|)(\s+|$)/;
|
|
4
4
|
|
|
5
5
|
function getValueUnit(value) {
|
|
6
6
|
const match = value.match(expression);
|
package/src/utils/logical.js
CHANGED
package/src/utils/physical.js
CHANGED
|
@@ -2,6 +2,8 @@ const { logicalUnits } = require('./logical');
|
|
|
2
2
|
const { physicalUnits } = require('./physical');
|
|
3
3
|
|
|
4
4
|
const physicalUnitsMap = Object.freeze({
|
|
5
|
+
[physicalUnits.cqh]: logicalUnits.cqb,
|
|
6
|
+
[physicalUnits.cqw]: logicalUnits.cqi,
|
|
5
7
|
[physicalUnits.dvh]: logicalUnits.dvb,
|
|
6
8
|
[physicalUnits.dvw]: logicalUnits.dvi,
|
|
7
9
|
[physicalUnits.lvh]: logicalUnits.lvb,
|