Skip to content

Commit 10517ad

Browse files
committed
fix: stabilize tailwind import and watch hmr checks
1 parent 983f803 commit 10517ad

22 files changed

Lines changed: 311 additions & 74 deletions

File tree

.github/workflows/e2e-watch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ jobs:
107107
round_profile: default
108108
watch_save_snapshots: '1'
109109
timeout_minutes: 45
110-
watch_timeout_ms: '320000'
110+
watch_timeout_ms: '420000'
111111
watch_poll_ms: '320'
112-
watch_command_timeout_ms: '840000'
112+
watch_command_timeout_ms: '960000'
113113
- os: macos-latest
114114
runner_label: macos
115115
watch_case: uni-app-vite-tailwindcss-v4
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "../src";
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" source(none);
2+
@source "../src";

e2e/__snapshots__/apps-generator-mode/compare/report.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5628,12 +5628,17 @@
56285628
"cssFiles": [
56295629
"app.wxss",
56305630
"index.wxss",
5631+
"index.wxss",
56315632
"index.wxss"
56325633
],
56335634
"status": "passed",
56345635
"generator": {
5635-
"bytes": 6061,
5636+
"bytes": 6862,
56365637
"selectors": [
5638+
".a",
5639+
".aspect-w-16 > text",
5640+
".aspect-w-16 > view",
5641+
".b",
56375642
".before_cabsolute:before",
56385643
".before_cborder-2:before",
56395644
".before_cborder-_b_h4bd650_B:before",
@@ -5642,6 +5647,7 @@
56425647
".before_cinset-0:before",
56435648
".before_crounded-_b20rpx_B:before",
56445649
".bg-_b_h123456_B",
5650+
".bg-opacity-_b0_d54_B",
56455651
".bg-sky-500_f80",
56465652
".container",
56475653
".dark text.dark_cbg-_b_h123456_B",
@@ -5658,9 +5664,13 @@
56585664
".divide-x-_b10px_B > text + view",
56595665
".divide-x-_b10px_B > view + text",
56605666
".divide-x-_b10px_B > view + view",
5667+
".flex",
56615668
".grid",
56625669
".grid-cols-3",
56635670
".h-12",
5671+
".h-_b100px_B",
5672+
".items-center",
5673+
".justify-center",
56645674
".leading-_b0_d9_B",
56655675
".max-h-_b100px_B",
56665676
".min-w-_b300rpx_B",
@@ -5671,17 +5681,20 @@
56715681
".resize",
56725682
".rotate-45",
56735683
".rounded-_b20rpx_B",
5684+
".rounded-_b40px_B",
56745685
".shadow-md",
56755686
".space-y-_b1_d6rem_B > text + text",
56765687
".space-y-_b1_d6rem_B > text + view",
56775688
".space-y-_b1_d6rem_B > view + text",
56785689
".space-y-_b1_d6rem_B > view + view",
5690+
".test",
56795691
".text-_b16px_B",
56805692
".text-_b20px_B",
56815693
".text-_b_hffffff_B",
56825694
".text-black",
56835695
".text-opacity-_b0_d19_B",
56845696
".w-12",
5697+
".w-_b100px_B",
56855698
".w-_b200_v_B",
56865699
".w-_b300rpx_B"
56875700
],
@@ -5699,11 +5712,12 @@
56995712
"cssFiles": [
57005713
"app.wxss",
57015714
"index.wxss",
5715+
"index.wxss",
57025716
"index.wxss"
57035717
],
57045718
"status": "passed",
57055719
"generator": {
5706-
"bytes": 4454,
5720+
"bytes": 4531,
57075721
"selectors": [
57085722
".before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before",
57095723
".before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before",
@@ -5718,6 +5732,7 @@
57185732
".text-_b100rpx_B",
57195733
".text-_b_hfff_B",
57205734
".text-_b_hffffff_B",
5735+
".tw-page-style-watch-anchor",
57215736
".tw-root",
57225737
":host",
57235738
"page",
@@ -9316,7 +9331,7 @@
93169331
],
93179332
"status": "passed",
93189333
"generator": {
9319-
"bytes": 20194,
9334+
"bytes": 20551,
93209335
"selectors": [
93219336
".before_ccontent-_b_aindependent_subpackage_weapp-vite-tailwindcss-v4_a_B:before",
93229337
".before_ccontent-_b_anormal_subpackage_weapp-vite-tailwindcss-v4_a_B:before",
@@ -9329,7 +9344,6 @@
93299344
".bg-gradient-to-tr",
93309345
".bg-independent-subpackage-marker",
93319346
".bg-zinc-50",
9332-
".block",
93339347
".border-4",
93349348
".capitalize",
93359349
".container",

e2e/__snapshots__/apps-generator-mode/compare/report.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ This report is generated by `pnpm e2e:apps-generator`. It builds each retained d
1414
| taro-webpack-react-tailwindcss-v4 | demo | passed | `taro-webpack-react-tailwindcss-v4/dist/app.wxss` (+3) | 367196 | 2152 | no | no | no | no | yes |
1515
| taro-vite-react-tailwindcss-v3 | demo | passed | `taro-vite-react-tailwindcss-v3/dist/app.wxss` (+4) | 10233 | 25 | no | no | no | no | yes |
1616
| taro-vite-react-tailwindcss-v4 | demo | passed | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+3) | 10938 | 43 | no | no | no | no | yes |
17-
| taro-webpack-vue3-tailwindcss-v3 | demo | passed | `taro-webpack-vue3-tailwindcss-v3/dist/app.wxss` (+2) | 6061 | 50 | no | no | no | no | yes |
18-
| taro-webpack-vue3-tailwindcss-v4 | demo | passed | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+2) | 4454 | 17 | no | no | no | no | yes |
17+
| taro-webpack-vue3-tailwindcss-v3 | demo | passed | `taro-webpack-vue3-tailwindcss-v3/dist/app.wxss` (+3) | 6862 | 62 | no | no | no | no | yes |
18+
| taro-webpack-vue3-tailwindcss-v4 | demo | passed | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+3) | 4531 | 18 | no | no | no | no | yes |
1919
| taro-vite-vue3-tailwindcss-v3 | demo | passed | `taro-vite-vue3-tailwindcss-v3/dist/app.wxss` (+3) | 10170 | 24 | no | no | no | no | yes |
2020
| taro-vite-vue3-tailwindcss-v4 | demo | passed | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+2) | 11089 | 44 | no | no | no | no | yes |
2121
| uni-app-vite-tailwindcss-v3 | demo | passed | `uni-app-vite-tailwindcss-v3/dist/build/mp-weixin/app.wxss` (+12) | 487203 | 3000 | no | no | no | no | yes |
2222
| uni-app-vite-tailwindcss-v4 | demo | passed | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+4) | 140805 | 240 | no | no | no | no | yes |
2323
| weapp-vite-tailwindcss-v3 | demo | passed | `weapp-vite-tailwindcss-v3/dist/app.wxss` (+5) | 33905 | 144 | no | no | no | no | yes |
24-
| weapp-vite-tailwindcss-v4 | demo | passed | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+4) | 20194 | 60 | no | no | no | no | yes |
24+
| weapp-vite-tailwindcss-v4 | demo | passed | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+4) | 20551 | 59 | no | no | no | no | yes |
2525

2626
## Notes
2727

@@ -78,13 +78,13 @@ This report is generated by `pnpm e2e:apps-generator`. It builds each retained d
7878

7979
### taro-webpack-vue3-tailwindcss-v3
8080

81-
- CSS files: `app.wxss`, `index.wxss`, `index.wxss`
82-
- Selectors: `.before_cabsolute:before`, `.before_cborder-2:before`, `.before_cborder-_b_h4bd650_B:before`, `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_cinset-0:before`, `.before_crounded-_b20rpx_B:before`, `.bg-_b_h123456_B`, `.bg-sky-500_f80`, `.container`, `.dark text.dark_cbg-_b_h123456_B`, `.dark view.dark_cbg-_b_h123456_B`, `.divide-_b_h010101_B > text + text`, `.divide-_b_h010101_B > text + view`, `.divide-_b_h010101_B > view + text`, `.divide-_b_h010101_B > view + view`, `.divide-solid > text + text`, `.divide-solid > text + view`, `.divide-solid > view + text`, `.divide-solid > view + view`
81+
- CSS files: `app.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
82+
- Selectors: `.a`, `.aspect-w-16 > text`, `.aspect-w-16 > view`, `.b`, `.before_cabsolute:before`, `.before_cborder-2:before`, `.before_cborder-_b_h4bd650_B:before`, `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_cinset-0:before`, `.before_crounded-_b20rpx_B:before`, `.bg-_b_h123456_B`, `.bg-opacity-_b0_d54_B`, `.bg-sky-500_f80`, `.container`, `.dark text.dark_cbg-_b_h123456_B`, `.dark view.dark_cbg-_b_h123456_B`, `.divide-_b_h010101_B > text + text`, `.divide-_b_h010101_B > text + view`, `.divide-_b_h010101_B > view + text`
8383

8484
### taro-webpack-vue3-tailwindcss-v4
8585

86-
- CSS files: `app.wxss`, `index.wxss`, `index.wxss`
87-
- Selectors: `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.bg-_b_h123456_B`, `.bg-_b_h534312_B`, `.bg-independent-subpackage-marker`, `.bg-normal-subpackage-marker`, `.container`, `.px-_b32px_B`, `.py-_b18px_B`, `.rounded-_b24rpx_B`, `.text-_b100rpx_B`, `.text-_b_hfff_B`, `.text-_b_hffffff_B`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
86+
- CSS files: `app.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
87+
- Selectors: `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.bg-_b_h123456_B`, `.bg-_b_h534312_B`, `.bg-independent-subpackage-marker`, `.bg-normal-subpackage-marker`, `.container`, `.px-_b32px_B`, `.py-_b18px_B`, `.rounded-_b24rpx_B`, `.text-_b100rpx_B`, `.text-_b_hfff_B`, `.text-_b_hffffff_B`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
8888

8989
### taro-vite-vue3-tailwindcss-v3
9090

@@ -114,4 +114,4 @@ This report is generated by `pnpm e2e:apps-generator`. It builds each retained d
114114
### weapp-vite-tailwindcss-v4
115115

116116
- CSS files: `app.wxss`, `apple.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
117-
- Selectors: `.before_ccontent-_b_aindependent_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.bg-_b_h3a32d1_B`, `.bg-_b_h68c828_B`, `.bg-amber-300`, `.bg-blue-500_f30`, `.bg-gradient-to-b`, `.bg-gradient-to-t`, `.bg-gradient-to-tr`, `.bg-independent-subpackage-marker`, `.bg-zinc-50`, `.block`, `.border-4`, `.capitalize`, `.container`, `.dark_cbg-zinc-900`, `.filter`, `.flex`, `.flex-col`, `.from-_b_h2f73f1_B`
117+
- Selectors: `.before_ccontent-_b_aindependent_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.bg-_b_h3a32d1_B`, `.bg-_b_h68c828_B`, `.bg-amber-300`, `.bg-blue-500_f30`, `.bg-gradient-to-b`, `.bg-gradient-to-t`, `.bg-gradient-to-tr`, `.bg-independent-subpackage-marker`, `.bg-zinc-50`, `.border-4`, `.capitalize`, `.container`, `.dark_cbg-zinc-900`, `.filter`, `.flex`, `.flex-col`, `.from-_b_h2f73f1_B`, `.h-10`

e2e/__snapshots__/apps-generator-mode/compare/report.zh-CN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
| taro-webpack-react-tailwindcss-v4 | demo | 通过 | `taro-webpack-react-tailwindcss-v4/dist/app.wxss` (+3) | 367196 | 2152 ||||||
1515
| taro-vite-react-tailwindcss-v3 | demo | 通过 | `taro-vite-react-tailwindcss-v3/dist/app.wxss` (+4) | 10233 | 25 ||||||
1616
| taro-vite-react-tailwindcss-v4 | demo | 通过 | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+3) | 10938 | 43 ||||||
17-
| taro-webpack-vue3-tailwindcss-v3 | demo | 通过 | `taro-webpack-vue3-tailwindcss-v3/dist/app.wxss` (+2) | 6061 | 50 ||||||
18-
| taro-webpack-vue3-tailwindcss-v4 | demo | 通过 | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+2) | 4454 | 17 ||||||
17+
| taro-webpack-vue3-tailwindcss-v3 | demo | 通过 | `taro-webpack-vue3-tailwindcss-v3/dist/app.wxss` (+3) | 6862 | 62 ||||||
18+
| taro-webpack-vue3-tailwindcss-v4 | demo | 通过 | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+3) | 4531 | 18 ||||||
1919
| taro-vite-vue3-tailwindcss-v3 | demo | 通过 | `taro-vite-vue3-tailwindcss-v3/dist/app.wxss` (+3) | 10170 | 24 ||||||
2020
| taro-vite-vue3-tailwindcss-v4 | demo | 通过 | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+2) | 11089 | 44 ||||||
2121
| uni-app-vite-tailwindcss-v3 | demo | 通过 | `uni-app-vite-tailwindcss-v3/dist/build/mp-weixin/app.wxss` (+12) | 487203 | 3000 ||||||
2222
| uni-app-vite-tailwindcss-v4 | demo | 通过 | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+4) | 140805 | 240 ||||||
2323
| weapp-vite-tailwindcss-v3 | demo | 通过 | `weapp-vite-tailwindcss-v3/dist/app.wxss` (+5) | 33905 | 144 ||||||
24-
| weapp-vite-tailwindcss-v4 | demo | 通过 | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+4) | 20194 | 60 ||||||
24+
| weapp-vite-tailwindcss-v4 | demo | 通过 | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+4) | 20551 | 59 ||||||
2525

2626
## 说明
2727

@@ -78,13 +78,13 @@
7878

7979
### taro-webpack-vue3-tailwindcss-v3
8080

81-
- CSS 文件:`app.wxss`, `index.wxss`, `index.wxss`
82-
- 选择器:`.before_cabsolute:before`, `.before_cborder-2:before`, `.before_cborder-_b_h4bd650_B:before`, `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_cinset-0:before`, `.before_crounded-_b20rpx_B:before`, `.bg-_b_h123456_B`, `.bg-sky-500_f80`, `.container`, `.dark text.dark_cbg-_b_h123456_B`, `.dark view.dark_cbg-_b_h123456_B`, `.divide-_b_h010101_B > text + text`, `.divide-_b_h010101_B > text + view`, `.divide-_b_h010101_B > view + text`, `.divide-_b_h010101_B > view + view`, `.divide-solid > text + text`, `.divide-solid > text + view`, `.divide-solid > view + text`, `.divide-solid > view + view`
81+
- CSS 文件:`app.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
82+
- 选择器:`.a`, `.aspect-w-16 > text`, `.aspect-w-16 > view`, `.b`, `.before_cabsolute:before`, `.before_cborder-2:before`, `.before_cborder-_b_h4bd650_B:before`, `.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v3_a_B:before`, `.before_cinset-0:before`, `.before_crounded-_b20rpx_B:before`, `.bg-_b_h123456_B`, `.bg-opacity-_b0_d54_B`, `.bg-sky-500_f80`, `.container`, `.dark text.dark_cbg-_b_h123456_B`, `.dark view.dark_cbg-_b_h123456_B`, `.divide-_b_h010101_B > text + text`, `.divide-_b_h010101_B > text + view`, `.divide-_b_h010101_B > view + text`
8383

8484
### taro-webpack-vue3-tailwindcss-v4
8585

86-
- CSS 文件:`app.wxss`, `index.wxss`, `index.wxss`
87-
- 选择器:`.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.bg-_b_h123456_B`, `.bg-_b_h534312_B`, `.bg-independent-subpackage-marker`, `.bg-normal-subpackage-marker`, `.container`, `.px-_b32px_B`, `.py-_b18px_B`, `.rounded-_b24rpx_B`, `.text-_b100rpx_B`, `.text-_b_hfff_B`, `.text-_b_hffffff_B`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
86+
- CSS 文件:`app.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
87+
- 选择器:`.before_ccontent-_b_aindependent_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_taro-webpack-vue3-tailwindcss-v4_a_B:before`, `.bg-_b_h123456_B`, `.bg-_b_h534312_B`, `.bg-independent-subpackage-marker`, `.bg-normal-subpackage-marker`, `.container`, `.px-_b32px_B`, `.py-_b18px_B`, `.rounded-_b24rpx_B`, `.text-_b100rpx_B`, `.text-_b_hfff_B`, `.text-_b_hffffff_B`, `.tw-page-style-watch-anchor`, `.tw-root`, `:host`, `page`, `wx-root-portal-content`
8888

8989
### taro-vite-vue3-tailwindcss-v3
9090

@@ -114,4 +114,4 @@
114114
### weapp-vite-tailwindcss-v4
115115

116116
- CSS 文件:`app.wxss`, `apple.wxss`, `index.wxss`, `index.wxss`, `index.wxss`
117-
- 选择器:`.before_ccontent-_b_aindependent_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.bg-_b_h3a32d1_B`, `.bg-_b_h68c828_B`, `.bg-amber-300`, `.bg-blue-500_f30`, `.bg-gradient-to-b`, `.bg-gradient-to-t`, `.bg-gradient-to-tr`, `.bg-independent-subpackage-marker`, `.bg-zinc-50`, `.block`, `.border-4`, `.capitalize`, `.container`, `.dark_cbg-zinc-900`, `.filter`, `.flex`, `.flex-col`, `.from-_b_h2f73f1_B`
117+
- 选择器:`.before_ccontent-_b_aindependent_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.before_ccontent-_b_anormal_subpackage_weapp-vite-tailwindcss-v4_a_B:before`, `.bg-_b_h3a32d1_B`, `.bg-_b_h68c828_B`, `.bg-amber-300`, `.bg-blue-500_f30`, `.bg-gradient-to-b`, `.bg-gradient-to-t`, `.bg-gradient-to-tr`, `.bg-independent-subpackage-marker`, `.bg-zinc-50`, `.border-4`, `.capitalize`, `.container`, `.dark_cbg-zinc-900`, `.filter`, `.flex`, `.flex-col`, `.from-_b_h2f73f1_B`, `.h-10`

e2e/__snapshots__/apps-generator-mode/css-output/taro-webpack-vue3-tailwindcss-v3.md

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Fixture: demo
44
Entry: taro-webpack-vue3-tailwindcss-v3/dist/app.wxss
5-
Generator CSS files: app.wxss, index.wxss, index.wxss
5+
Generator CSS files: app.wxss, index.wxss, index.wxss, index.wxss
66

77
| Bytes | Selectors | @supports | :hover | Tailwind banner | Raw arbitrary selector | Weapp escaped arbitrary selector |
88
| ---: | ---: | --- | --- | --- | --- | --- |
9-
| 6061 | 50 | false | false | false | false | true |
9+
| 6862 | 62 | false | false | false | false | true |
1010

1111
## Generator CSS
1212

@@ -79,18 +79,27 @@ text,
7979
.relative {
8080
position: relative;
8181
}
82+
.flex {
83+
display: flex;
84+
}
8285
.grid {
8386
display: grid;
8487
}
8588
.h-12 {
8689
height: 96rpx;
8790
}
91+
.h-_b100px_B {
92+
height: 100rpx;
93+
}
8894
.max-h-_b100px_B {
8995
max-height: 100rpx;
9096
}
9197
.w-12 {
9298
width: 96rpx;
9399
}
100+
.w-_b100px_B {
101+
width: 100rpx;
102+
}
94103
.w-_b200_v_B {
95104
width: 200%;
96105
}
@@ -111,6 +120,12 @@ text,
111120
.grid-cols-3 {
112121
grid-template-columns: repeat(3, minmax(0, 1fr));
113122
}
123+
.items-center {
124+
align-items: center;
125+
}
126+
.justify-center {
127+
justify-content: center;
128+
}
114129
.space-y-_b1_d6rem_B > view + view,
115130
.space-y-_b1_d6rem_B > view + text,
116131
.space-y-_b1_d6rem_B > text + view,
@@ -143,13 +158,19 @@ text,
143158
.rounded-_b20rpx_B {
144159
border-radius: 20rpx;
145160
}
161+
.rounded-_b40px_B {
162+
border-radius: 40rpx;
163+
}
146164
.bg-_b_h123456_B {
147165
--tw-bg-opacity: 1;
148166
background-color: rgba(18, 52, 86, var(--tw-bg-opacity, 1));
149167
}
150168
.bg-sky-500_f80 {
151169
background-color: rgba(14, 165, 233, 0.8);
152170
}
171+
.bg-opacity-_b0_d54_B {
172+
--tw-bg-opacity: 0.54;
173+
}
153174
.p-_b20px_B {
154175
padding: 20rpx;
155176
}
@@ -281,4 +302,27 @@ text,
281302
max-width: 3072rpx;
282303
}
283304
}
305+
306+
.test {
307+
display: flex !important;
308+
height: 100rpx !important;
309+
width: 100rpx !important;
310+
align-items: center !important;
311+
justify-content: center !important;
312+
border-radius: 40rpx !important;
313+
background-color: rgba(18, 52, 86, var(--tw-bg-opacity, 1)) !important;
314+
--tw-bg-opacity: 0.54 !important;
315+
--tw-text-opacity: 1 !important;
316+
color: rgba(255, 255, 255, var(--tw-text-opacity, 1)) !important;
317+
}
318+
.aspect-w-16 > view,
319+
.aspect-w-16 > text {
320+
color: red;
321+
}
322+
.a {
323+
color: green;
324+
}
325+
.b {
326+
color: #ff0;
327+
}
284328
```

e2e/__snapshots__/apps-generator-mode/css-output/taro-webpack-vue3-tailwindcss-v4.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Fixture: demo
44
Entry: taro-webpack-vue3-tailwindcss-v4/dist/app.wxss
5-
Generator CSS files: app.wxss, index.wxss, index.wxss
5+
Generator CSS files: app.wxss, index.wxss, index.wxss, index.wxss
66

77
| Bytes | Selectors | @supports | :hover | Tailwind banner | Raw arbitrary selector | Weapp escaped arbitrary selector |
88
| ---: | ---: | --- | --- | --- | --- | --- |
9-
| 4454 | 17 | false | false | false | false | true |
9+
| 4531 | 18 | false | false | false | false | true |
1010

1111
## Generator CSS
1212

@@ -250,4 +250,9 @@ wx-root-portal-content {
250250
max-width: 3072rpx;
251251
}
252252
}
253+
254+
@reference "tailwindcss";
255+
.tw-page-style-watch-anchor {
256+
color: inherit;
257+
}
253258
```

0 commit comments

Comments
 (0)