collapsible-sidebar

Installation
SKILL.md

Collapsible sidebar (allow-discrete fade)

Source: @nonzeroexitcode (Daniel Petho) on Threads, https://www.threads.com/@nonzeroexitcode/post/De4xkSrE0Ze. Working demo: examples/index.html (normal vs allow-discrete, side by side).

The problem

display is a discrete property. It has no in-between value. When a label goes to display: none, it disappears in the first frame, and any opacity transition on it never shows.

transition-behavior: allow-discrete makes the browser hold the old display value until the transition ends. Then display: none applies. @starting-style gives the entry a start value, so the element fades in when it comes back.

Installs
9
GitHub Stars
245
First Seen
Nov 3, 2026