Skip to content

Commit 2cb30ca

Browse files
committed
fix: use group-[&]/ syntax for TW4 compatibility
The empty bracket syntax group-[]/ doesn't generate valid CSS in Tailwind v4. Using group-[&]/ with the self-reference selector ensures the styles apply when inside named groups.
1 parent 393b761 commit 2cb30ca

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/families/dropdown.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ export default {
164164
removeSelection section within the context of a tag.
165165
*/
166166
}
167-
group-[]/tag:absolute
168-
group-[]/tag:top-1/2
169-
group-[]/tag:right-[0.5em]
170-
group-[]/tag:-translate-y-1/2
171-
group-[]/tag:!w-[0.5em]
172-
group-[]/tag:aspect-[1/1]
173-
group-[]/tag:!text-inherit
167+
group-[&]/tag:absolute
168+
group-[&]/tag:top-1/2
169+
group-[&]/tag:right-[0.5em]
170+
group-[&]/tag:-translate-y-1/2
171+
group-[&]/tag:!w-[0.5em]
172+
group-[&]/tag:aspect-[1/1]
173+
group-[&]/tag:!text-inherit
174174
`,
175175
selectIcon: `
176176
text-$scale
@@ -271,8 +271,8 @@ export default {
271271
dark:data-[is-active]:bg-$accentColor-700
272272
dark:data-[is-active]:before:ring-$accentColor-400
273273
274-
group-[]/optgroup:first:before:!rounded-none
275-
group-[]/optgroup:last:before:!rounded-none
274+
group-[&]/optgroup:first:before:!rounded-none
275+
group-[&]/optgroup:last:before:!rounded-none
276276
`,
277277
selectedIcon: `
278278
flex

src/inputs/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ export default {
1818
dark:text-$colorTemperature-$colorTemperatureStrengthDark
1919
`,
2020
messages: ``,
21-
message: `group-[]/summary:text-$scale(-1,*)`,
21+
message: `group-[&]/summary:text-$scale(-1,*)`,
2222
};

src/inputs/pro/togglebuttons.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
buttons position within the group.
3333
*/
3434
}
35-
group-[]/option:!rounded-none
35+
group-[&]/option:!rounded-none
3636
3737
${"" /** selectively add back and override rounding for first child */}
3838
group-data-[vertical=false]/options:group-first/option:!$radius
@@ -58,23 +58,23 @@ export default {
5858
then we need to selectively manage borders.
5959
*/
6060
}
61-
group-data-[vertical=false]/options:group-[]/option:!border-r-0
61+
group-data-[vertical=false]/options:group-[&]/option:!border-r-0
6262
group-data-[vertical=false]/options:group-last/option:!border-r
6363
64-
group-data-[vertical=false]/options:group-[]/option:aria-[pressed=true]:border-x-$accentColor-$accentColorStrengthDark
64+
group-data-[vertical=false]/options:group-[&]/option:aria-[pressed=true]:border-x-$accentColor-$accentColorStrengthDark
6565
group-data-[vertical=false]/options:group-first/option:aria-[pressed=true]:border-l-$accentColor-$accentColorStrength
6666
group-data-[vertical=false]/options:group-last/option:aria-[pressed=true]:border-r-$accentColor-$accentColorStrength
67-
dark:group-data-[vertical=false]/options:group-[]/option:aria-[pressed=true]:border-x-$accentColor-$accentColorStrength
67+
dark:group-data-[vertical=false]/options:group-[&]/option:aria-[pressed=true]:border-x-$accentColor-$accentColorStrength
6868
dark:group-data-[vertical=false]/options:group-first/option:aria-[pressed=true]:border-l-$accentColor-$accentColorStrengthDark
6969
dark:group-data-[vertical=false]/options:group-last/option:aria-[pressed=true]:border-r-$accentColor-$accentColorStrengthDark
7070
71-
group-data-[vertical=true]/options:group-[]/option:!border-b-0
71+
group-data-[vertical=true]/options:group-[&]/option:!border-b-0
7272
group-data-[vertical=true]/options:group-last/option:!border-b
7373
74-
group-data-[vertical=true]/options:group-[]/option:aria-[pressed=true]:border-y-$accentColor-$accentColorStrengthDark
74+
group-data-[vertical=true]/options:group-[&]/option:aria-[pressed=true]:border-y-$accentColor-$accentColorStrengthDark
7575
group-data-[vertical=true]/options:group-first/option:aria-[pressed=true]:border-t-$accentColor-$accentColorStrength
7676
group-data-[vertical=true]/options:group-last/option:aria-[pressed=true]:border-b-$accentColor-$accentColorStrength
77-
dark:group-data-[vertical=true]/options:group-[]/option:aria-[pressed=true]:border-y-$accentColor-$accentColorStrength
77+
dark:group-data-[vertical=true]/options:group-[&]/option:aria-[pressed=true]:border-y-$accentColor-$accentColorStrength
7878
dark:group-data-[vertical=true]/options:group-first/option:aria-[pressed=true]:border-t-$accentColor-$accentColorStrengthDark
7979
dark:group-data-[vertical=true]/options:group-last/option:aria-[pressed=true]:border-b-$accentColor-$accentColorStrengthDark
8080
`,

0 commit comments

Comments
 (0)