@csstools/postcss-syntax-descriptor-syntax-production 1.0.0 → 1.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/CHANGELOG.md +4 -2
- package/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# Changes to PostCSS Syntax Descriptor Syntax Production
|
|
2
2
|
|
|
3
|
-
### 1.0.
|
|
3
|
+
### 1.0.1
|
|
4
4
|
|
|
5
5
|
_December 27, 2025_
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Fix typo
|
|
8
|
+
|
|
9
|
+
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-syntax-descriptor-syntax-production/CHANGELOG.md)
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
@property --color {
|
|
17
17
|
inherits: true;
|
|
18
18
|
initial-value: black;
|
|
19
|
-
|
|
19
|
+
syntax: "<color>";
|
|
20
20
|
}
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -64,7 +64,7 @@ postcssSyntaxDescriptorSyntaxProduction({ preserve: true })
|
|
|
64
64
|
@property --color {
|
|
65
65
|
inherits: true;
|
|
66
66
|
initial-value: black;
|
|
67
|
-
|
|
67
|
+
syntax: "<color>";
|
|
68
68
|
syntax: <color>;
|
|
69
69
|
}
|
|
70
70
|
```
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@csstools/css-tokenizer");const s=/^property$/i,
|
|
1
|
+
"use strict";var e=require("@csstools/css-tokenizer");const s=/^property$/i,t=/^syntax$/i,creator=c=>{const a=Object.assign({preserve:!1},c);return{postcssPlugin:"postcss-syntax-descriptor-syntax-production",Declaration(c){if(!t.test(c.prop))return;if(!c.parent||"atrule"!==c.parent.type)return;if(!s.test(c.parent.name))return;const r=c.prev();if(r&&"decl"===r.type&&t.test(r.prop))return;const o=c.value,n=e.tokenize({css:c.value}),i=n.filter(s=>!(e.isTokenWhiteSpaceOrComment(s)||e.isTokenEOF(s)));if(1===i.length&&e.isTokenString(i[0]))return;let p="";n.forEach(s=>{e.isTokenComment(s)||(e.isTokenWhitespace(s)?p+=" ":p+=s[1])});let u='"';for(const e of p){const s=e.codePointAt(0);if(void 0!==s)switch(s){case 0:u+=String.fromCodePoint(65533);break;case 34:case 92:u+="\\"+String.fromCodePoint(s);break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 127:u+="\\"+s.toString(16)+" ";break;default:u+=String.fromCodePoint(s)}}u+='"',o!==u&&(c.cloneBefore({value:u}),a.preserve||c.remove())}}};creator.postcss=!0,module.exports=creator;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tokenize as e,
|
|
1
|
+
import{tokenize as e,isTokenWhiteSpaceOrComment as s,isTokenEOF as a,isTokenString as c,isTokenComment as t,isTokenWhitespace as r}from"@csstools/css-tokenizer";const o=/^property$/i,n=/^syntax$/i,creator=i=>{const p=Object.assign({preserve:!1},i);return{postcssPlugin:"postcss-syntax-descriptor-syntax-production",Declaration(i){if(!n.test(i.prop))return;if(!i.parent||"atrule"!==i.parent.type)return;if(!o.test(i.parent.name))return;const f=i.prev();if(f&&"decl"===f.type&&n.test(f.prop))return;const l=i.value,u=e({css:i.value}),d=u.filter(e=>!(s(e)||a(e)));if(1===d.length&&c(d[0]))return;let v="";u.forEach(e=>{t(e)||(r(e)?v+=" ":v+=e[1])});let g='"';for(const e of v){const s=e.codePointAt(0);if(void 0!==s)switch(s){case 0:g+=String.fromCodePoint(65533);break;case 34:case 92:g+="\\"+String.fromCodePoint(s);break;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 31:case 127:g+="\\"+s.toString(16)+" ";break;default:g+=String.fromCodePoint(s)}}g+='"',l!==g&&(i.cloneBefore({value:g}),p.preserve||i.remove())}}};creator.postcss=!0;export{creator as default};
|