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

Nested opacity reset #114

Open
sanjarcode opened this issue Jun 20, 2024 · 0 comments
Open

Nested opacity reset #114

sanjarcode opened this issue Jun 20, 2024 · 0 comments
Assignees

Comments

@sanjarcode
Copy link
Member

sanjarcode commented Jun 20, 2024

<div className="opacity-50">
  ...
  ...
  <div className="reset-opacity">
    I want this to be of normal opacity.
  </div>
  ...
</div>

Q: Whats the workaround?

It's not a design issue, since for code ease, one may want to apply "disabled-like opacity" on the whole parent but keep parts visible (because they have grey parts or actually are enabled).

This is much needed. Currently the way to do this is to selectively add opacity, which takes linear amount of work instead of O(1) (i.e. parent and exception).

Related: https://css-tricks.com/forums/topic/opacity-of-child-element/

@sanjarcode sanjarcode self-assigned this Jun 20, 2024
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