Skip to content

Commit b7244fc

Browse files
committed
test: custom case 0
1 parent c7892d6 commit b7244fc

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

packages/postcss/test/__snapshots__/issues.test.ts.snap

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,39 @@ view,text,:after,:before,::backdrop {
5656
}"
5757
`;
5858

59+
exports[`issues > custom case 0 1`] = `
60+
"/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
61+
*,:after,:before,::backdrop {
62+
box-sizing: border-box;
63+
border: 0 solid;
64+
margin: 0;
65+
padding: 0;
66+
}
67+
.\\[\\&\\>\\*\\]\\:nth-\\[n\\+3\\]\\:hidden {
68+
&>* {
69+
&:nth-child(n+3) {
70+
display: none;
71+
}
72+
}
73+
}"
74+
`;
75+
76+
exports[`issues > custom case 0 2`] = `
77+
"/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
78+
view,text,:after,:before,::backdrop {
79+
box-sizing: border-box;
80+
border: 0 solid;
81+
margin: 0;
82+
padding: 0;
83+
}
84+
._ngm_cnth-_na3_chidden>view:nth-child(n+3) {
85+
display: none;
86+
}
87+
._ngm_cnth-_na3_chidden>text:nth-child(n+3) {
88+
display: none;
89+
}"
90+
`;
91+
5992
exports[`issues > https://github.com/sonofmagic/weapp-tailwindcss/issues/631 1`] = `
6093
"/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
6194
:root, :host {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<view class="[&>*]:nth-[n+3]:hidden">
2+
<view></view>
3+
<view></view>
4+
</view>

packages/postcss/test/issues.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,14 @@ describe('issues', () => {
118118
const { css } = await styleHandler(code.css)
119119
expect(css).toMatchSnapshot()
120120
})
121+
122+
it('custom case 0', async () => {
123+
const code = await generateCss(path.resolve(__dirname, './fixtures/issues/custom'))
124+
expect(code.css).toMatchSnapshot()
125+
const styleHandler = createStyleHandler({
126+
isMainChunk: true,
127+
})
128+
const { css } = await styleHandler(code.css)
129+
expect(css).toMatchSnapshot()
130+
})
121131
})

0 commit comments

Comments
 (0)