Skip to content

IDs hidden in collapsed panels, don't expand the panel when targeted. #816

@ddnexus

Description

@ddnexus

Collapsed panels are great for real-estate and for giving the user a simple overview about the topics... however there is a big shortcoming: If you target an id inside a collapsed panel, the browser will just reach the page, and won't be able to show the actual id.

A possible CSS-only solution to solve this problem, and automatically expand the container(s) could be applying this rule the the container root/elements that must expand (so nested panel would also expand):

/* This targets any div that contains the currently active ID in the URL */
div:has(:target) {
  height: auto !important;
  display: block;
}

A similar rule should apply also to unselected tabs, (although you have to hide the current selected one, and I did not reverse-engineered the tabs, so I am not able to suggest anything ATM).

HTH

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions