Skip to content

fix: drop the code block frame inside a Typst window - #102

Merged
mcanouil merged 3 commits into
mainfrom
fix/typst-window-body-frame
Nov 23, 2026
Merged

mcanouil merged 3 commits into
mainfrom
fix/typst-window-body-frame

Conversation

@mcanouil

Copy link
Copy Markdown
Owner

Inside a Typst window, a highlighted code block kept its own 0.5pt border and 2pt rounded corners.
The Skylighting override passes stroke and radius as explicit arguments, and those win over the set block rules the window body uses to strip code block chrome.
With a full frame the border hid under the window stroke, but with a theme stroke on some sides only, such as (top: 2pt + ink, rest: none), it showed as a faint box around the code.

The window now sets a cw-in-window state next to cw-body-inset, and the override drops its stroke and radius while that state is true.
A code block outside a window keeps its frame.
Native highlighting was already fine, since Quarto's raw block rule has no stroke.

The reference page mentions the new state for a document that defines its own wrapper, and the test suite checks that only the block outside the window has a frame.

Before After
Window with a blue top rule; the code body inside still has a thin grey border on its left, right and bottom edges Same window; the code body has no border, only the blue top rule and the line under the title bar

The Skylighting override passed a 0.5pt stroke and a 2pt radius as
explicit arguments, which beat the set rules of the window body. With a
theme stroke on some sides only, the frame showed around the code.
@mcanouil mcanouil added the Type: Bug 🐛 Issues related to bugs, errors, or mistakes label Nov 23, 2026
@mcanouil mcanouil self-assigned this Nov 23, 2026
@mcanouil
mcanouil marked this pull request as ready for review November 23, 2026 12:23
@mcanouil
mcanouil merged commit 3761295 into main Nov 23, 2026
@mcanouil
mcanouil deleted the fix/typst-window-body-frame branch November 23, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug 🐛 Issues related to bugs, errors, or mistakes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant