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: bg-opacity styling inherited in the child button in v4 #2559

Closed
Metehan-Altuntekin opened this issue Nov 21, 2023 · 0 comments
Closed

Comments

@Metehan-Altuntekin
Copy link

Metehan-Altuntekin commented Nov 21, 2023

What version of daisyUI are you using?

v4.4.2

Which browsers are you seeing the problem on?

all

Reproduction URL

https://github.com/cozemble/monorepo/blob/main/frontend/tojson/src/routes/(landing)/pricing/Plan.svelte

Describe your issue

I am migrating a project made with DaisyUI v3 to v4. I have found a minor problem that can be easily fixed.

When there is a button inside a container with bg-opacity-*, that bg opacity class is inherited to the button.

<div class="bg-opacity-20">
  <button class="btn btn-neutral">Test</button>
</div>

renders like:

image

Can be prevented by doing this:

<div class="bg-opacity-20">
  <button class="btn btn-neutral bg-opacity-100">Test</button>
</div>

renders:
image

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

1 participant