Repository navigation
Release v2.6.0
Release v2.6.0
release-check: OK a2609f0
Changelog
Added
- Collapse on narrow screens (opt-in, spec
004-collapse-narrow): GitHub-style trail on phones. Below a width breakpoint the trail shows a "…" button, one separator and the current crumb (one line, ellipsis); the "…" button opens a dropdown with every previous crumb (same labels, icons and links; non-link crumbs as text). Above the breakpoint the trail is unchanged. See USAGE.- Global config
presentation.collapse(enabledfalse,min_items3,breakpoint40rem;collapse: trueshorthand; invalid breakpoints andmin_items< 2 rejected at container build). - Per collection
responsiveConfig.collapse:true/falseor{ "enabled", "min_items", "breakpoint" }merged key by key over the global value (invalid stored values are ignored). - Markup:
data-breadcrumb-collapseon.breadcrumb-kit,li.breadcrumb-collapsebefore the last separator with a<details>/<summary>disclosure (aria-label"Show previous pages", visible "…") andol.breadcrumb-collapse__menu[role=list]. Normal items stay in the DOM. - Nonce-stamped styles: container query on the wrapper (
@container breadcrumb-kit) with a viewport media query fallback,--breadcrumb-kit-collapse-*theming tokens with system-colour (light / dark) fallbacks, reduced-motion aware. js/breadcrumb-collapse.js(external,defer, no inline handlers): Escape closes and returns focus to "…", outside click and choosing a link close. Works without JavaScript.- Overridable partials
_breadcrumb_collapse.html.twigand_breadcrumb_collapse_assets.html.twig;BreadcrumbCollapseDTO,BreadcrumbTrailView::$collapseandisCollapsible()(Twigtrail.collapsible). - Translations
breadcrumb.collapse.toggle/breadcrumb.collapse.menuin en, es, de, fr, it, nl, pt.
- Global config
- Demo: the
defaultcollection enables the collapse below40rem(try/en/demo/deep/s1/s2/s3/s4/s5/s6at phone width).
Unchanged
- With the option off (default), or for trails shorter than
min_items,breadcrumb.html.twigrenders byte-identical HTML to 2.5.0 (tested against the 2.5.0 template).