docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Breadcrumbs should be generated in the html to prevent layout shift

Open xPaw opened this issue 3 months ago • 1 comments

Currently they are generated by the javascript after the page loads, which means there's a layout shift.

If you keep reloading any page there's an obvious content shift, e.g. here: https://dotnet.github.io/docfx/api/Docfx.Dotnet.DotnetApiCatalog.html

At the very least, the breadcrumbs element should at least have a   in it to preserve space.

Ideally things like TOC would also be generated, but at least they don't shift content.

xPaw avatar Oct 06 '25 13:10 xPaw

Image

The highlight.js loading also causes a layout shift because the .hljs class adds padding.

xPaw avatar Oct 08 '25 11:10 xPaw