Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Nested opacity reset #114

@sanjarcode

Description

@sanjarcode
<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/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions