@lynx-js/template-webpack-plugin-canary 0.8.0-canary-20250620-57c33046 → 0.8.1-canary-20250626-69fb0420
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 +21 -1
- package/lib/web/genStyleInfo.js +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
# @lynx-js/template-webpack-plugin
|
|
2
2
|
|
|
3
|
-
## 0.8.
|
|
3
|
+
## 0.8.1-canary-20250626045754-69fb0420e297abf768c889769c95a207c480b3c7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: `::placeholder` will be compiled to `part(input)::placeholder`, which means you can use pseudo-element CSS to add placeholder styles to input and textarea. ([#1158](https://github.com/lynx-family/lynx-stack/pull/1158))
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
// before
|
|
11
|
+
<input placeholder-color='red' placeholder-font-weight='bold' placeholder-font-size='20px'>
|
|
12
|
+
|
|
13
|
+
// after
|
|
14
|
+
<input>
|
|
15
|
+
|
|
16
|
+
input::placeholder {
|
|
17
|
+
color: red;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
font-size: 20px;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 0.8.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
|
6
26
|
|
package/lib/web/genStyleInfo.js
CHANGED
|
@@ -55,7 +55,19 @@ export function genStyleInfo(cssMap) {
|
|
|
55
55
|
pseudoClassSelectors.push(CSS.csstree.generate(selector));
|
|
56
56
|
}
|
|
57
57
|
else if (selector.type === 'PseudoElementSelector') {
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* [aa]::placeholder {
|
|
60
|
+
* }
|
|
61
|
+
* ===>
|
|
62
|
+
* [aa]::part(input)::placeholder {
|
|
63
|
+
* }
|
|
64
|
+
*/
|
|
65
|
+
if (selector.name === 'placeholder') {
|
|
66
|
+
pseudoClassSelectors.push('::part(input)::placeholder');
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
pseudoElementSelectors.push(CSS.csstree.generate(selector));
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
else if (selector.type === 'TypeSelector') {
|
|
61
73
|
plainSelectors.push(`[lynx-tag="${selector.name}"]`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/template-webpack-plugin-canary",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-canary-20250626-69fb0420",
|
|
4
4
|
"description": "Simplifies creation of Lynx template files to serve your webpack bundles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|