Skip to content

[bug]: CSS class syntax error in Field component (Next.js 16 + Tailwind 4.1) #8683

@MrAbhijitSaha

Description

@MrAbhijitSaha

Describe the bug

There’s a CSS syntax error in the Field component from shadcn/ui.
Tailwind 4.1 throws a parsing error for some advanced selectors used in this component, such as has-[> and @md/....
These selectors don’t compile properly in the latest Tailwind version

Affected component/components

Field (and possibly related: FieldGroup, FieldLabel)

How to reproduce

Create a new Next.js 16 app with Tailwind CSS 4.1.

Add the Field component from shadcn/ui.

Start the run next build.

you'll see warning for invalid class syntax.

Codesandbox/StackBlitz link

No response

Logs

System Info

Next.js: 16

Tailwind CSS: 4.1

React: 19.2

Windows 11

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions