这是indexloc提供的服务,不要输入任何密码
Skip to content

Tailwind Specificity Conflicts #10642

@JamesGriz

Description

@JamesGriz

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

https://github.com/JamesGriz/specificity-bug

Which canary version will you have in your reproduction?

turbo 2.5.4

Environment information

CLI:
   Version: 2.5.4
   Path to executable: /Users/jamesgray/Documents/projects/ppm/specificity-bug/node_modules/.pnpm/turbo-darwin-arm64@2.5.4/node_modules/turbo-darwin-arm64/bin/turbo
   Daemon status: Running
   Package manager: pnpm

Platform:
   Architecture: aarch64
   Operating system: macos
   WSL: false
   Available memory (MB): 4898
   Available CPU cores: 11

Environment:
   CI: None
   Terminal (TERM): xterm-256color
   Terminal program (TERM_PROGRAM): WarpTerminal
   Terminal program version (TERM_PROGRAM_VERSION): v0.2025.06.25.08.12.stable_01
   Shell (SHELL): /bin/zsh
   stdin: false

Expected behavior

All tailwind utility classes to apply weather they are being used in the component ui library or the web app/docs.

Actual behavior

When defining tailwind utility classes in the web app eg lg:hidden and there is a utility class being used in the component library which sharing the same style property eg flex (the shared property being display in this case) the lg:hidden style is losing to flex in terms of specificity.

To Reproduce

Additional context

I noticed that this issue was opened previously here but was then closed thanks to this PR. The fix just disregarded the component UI styles and seems this was undone on a more recent commit here

So the original issue still stands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions