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

Border opacity not working when color isn't specified #14240

Open
quick007 opened this issue Aug 23, 2024 · 4 comments
Open

Border opacity not working when color isn't specified #14240

quick007 opened this issue Aug 23, 2024 · 4 comments

Comments

@quick007
Copy link

quick007 commented Aug 23, 2024

What version of Tailwind CSS are you using?

3.4.7

What build tool (or framework if it abstracts the build tool) are you using?

"next": "14.2.5",
"postcss": "^8.4.40",

What version of Node.js are you using?

v22.0.0

What browser are you using?

Chome

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/2kFJgAhjXC

Describe your issue

You need to add a border color for border-opacity-<number> to work. Just border border-opacity-<number> should work on it's own.

@gaojunran
Copy link

I have met the same problem with you. And I think it might be designed deliberately by TailwindCSS team.

@quick007
Copy link
Author

@gaojunran are you triggering a border on hover/focus but don't want CLS like I am (and why I filed this issue). Instead, you can do border-transparent and border-inherit, i.e. border border-transparent hover:border-inherit

@usernamedd
Copy link

if you define border-red-100 and border-opacity- , the will be used as opacity of rgba color(here is red) . but if the border-- is not defined , the opcity will not be applied , as a result the border not behave as expected

@quick007
Copy link
Author

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants