#128 added structural markup for code blocks with filename labels. The HTML is in place with well-named classes — just needs CSS.
Markup structure
Every code block is now wrapped in a .code-block div. When a filename is present, it gets additional classes and an accessible label:
<div class="code-block code-with-filename" role="group" aria-labelledby="code-filename-0">
<div class="code-with-filename-label" id="code-filename-0">
<span class="font-mono text-sm">app.py</span>
</div>
<div class="highlight">
<!-- syntax-highlighted code -->
</div>
</div>
What needs styling
.code-with-filename-label — the filename label (background, padding, border, positioning relative to the code block)
.code-block — optional: consistent border-radius, spacing
- Gap/border between label and code block
- Consider how the label interacts with the existing
.highlight rounded corners
Reference
#128 added structural markup for code blocks with filename labels. The HTML is in place with well-named classes — just needs CSS.
Markup structure
Every code block is now wrapped in a
.code-blockdiv. When a filename is present, it gets additional classes and an accessible label:What needs styling
.code-with-filename-label— the filename label (background, padding, border, positioning relative to the code block).code-block— optional: consistent border-radius, spacing.highlightrounded cornersReference
layouts/_default/_markup/render-codeblock.html