Builds a sidebar that collapses to an icon rail with CSS-only fade transitions using transition-behavior allow-discrete and @starting-style. Includes Tailwind v4 support and accessibility guidance.
Ships in julianromli-ai-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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).
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.
width between the open and collapsed sizes. Use 200ms with a strong ease-out, cubic-bezier(0.23, 1, 0.32, 1). Set overflow: hidden on the sidebar.<span class="label">). Keep the icon outside it. Icons never move or fade..label {
opacity: 1;
transition: opacity 150ms ease-out, display 150ms allow-discrete;
}
.sidebar[data-collapsed] .label {
opacity: 0;
display: none;
}
@starting-style {
.label { opacity: 0; }
}
display duration the same as the opacity duration. If the display duration is shorter, the fade is cut off.@starting-style block after the base rule. It needs equal or higher specificity than the rule it starts.white-space: nowrap, so the text never wraps while the width animates.transition-discrete sets transition-behavior: allow-discrete.starting: variant writes @starting-style, for example starting:opacity-0.transition-[opacity,display] duration-150 ease-out transition-discrete starting:opacity-0 group-data-collapsed:hidden group-data-collapsed:opacity-0.<button> with aria-expanded and aria-controls that points to the sidebar id. Its label changes with the state ("Collapse sidebar" / "Expand sidebar").display: none gives no accessible name. Put aria-label on each link, plus title (or a real tooltip) for mouse users on the collapsed rail.:focus-visible ring on every link and on the toggle.prefers-reduced-motion: reduce, set transition: none on the width and the label. The state still changes at once.@media (hover: hover), so touch taps do not leave a stuck hover.allow-discrete works only on an element that stays in the DOM and changes display (or content-visibility, or overlay for <dialog> and [popover]). It does not help an element that React or another framework unmounts. For an unmounted element, keep it mounted and hide it with CSS, or render a short-lived inert exit copy, or use an animation library with exit support.width on a large, content-heavy layout where relayout is costly. Then animate transform on an overlay sidebar instead.Baseline 2024: Chrome 117, Safari 17.4, Firefox 129. A browser without support hides and shows the label at once, with no fade. That is a safe fallback; no polyfill is needed.
display and opacity every frame for 200ms. Expected: display stays visible while opacity goes 1 to 0, then display: none at about 150ms.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
34 skills in this plugin
/agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction./brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.//julianromli-ai-skills:collapsible-sidebarfrom julianromli-ai-skills
julianromli-ai-skills@cascade-code-general-misc-4 is listed by joshuarweaver/cascade-code-general-misc-4 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin julianromli-ai-skillsOther plugins' skills for the same job