Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [&>button]:bg-opacity-90 should be valid for migration-from-tailwind-2 rule #333

Open
nghiepdev opened this issue Apr 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@nghiepdev
Copy link

nghiepdev commented Apr 14, 2024

Describe the bug
The code below is currently displaying a warning

Classname '[&>button]:bg-opacity-90' should be replaced by an opacity suffix (eg. '/90')

      <div className="[&>button]:bg-opacity-90">
        <button className="bg-green-400">Login</button>
        <button className="bg-red-500">Register</button>
      </div>

Expected behvior
Rule migration-from-tailwind-2 should be valid for child selector: [&>], [&_]

Screenshots
image

@nghiepdev nghiepdev added the bug Something isn't working label Apr 14, 2024
@kachkaev
Copy link
Contributor

kachkaev commented Apr 19, 2024

Rule migration-from-tailwind-2 should be valid for child selector: [&>], [&_]

Why do you think so? I’d suggest that this code should be refactored to:

      <div>
        <button className="bg-green-400/90">Login</button>
        <button className="bg-red-500/90">Register</button>
      </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants