Skip to content

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

Open

Description

@kalinchernev

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions