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

Hidden (closed) items still part of the DOM #250

Open
kalinchernev opened this issue Mar 14, 2023 · 0 comments
Open

Hidden (closed) items still part of the DOM #250

kalinchernev opened this issue Mar 14, 2023 · 0 comments

Comments

@kalinchernev
Copy link

Describe the bug

Collapsible__contentInner elements remain in the DOM and render as big white places.

To Reproduce

No special steps to reproduce. Default setup.

Expected behavior
Please see the next screenshots.

Screenshots

Screenshot of the problem:

Screenshot from 2023-03-14 12-09-56

Screenshot of a potential solution:

Screenshot from 2023-03-14 12-10-15

Additional context

Because the styles for open/closed states in injected as inline, Collapsible__contentOuter level element not receiving open/closed state as a BEM modifier, a feasible CSS fix would be

.Collapsible__trigger.is-closed ~ .Collapsible__contentOuter {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

Where the absolute positioning is what makes the difference.

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