fix: Set overflow-y to clip for pre (#8047)

Browsers treat an overflow: auto directive as a request to make an
element scrollable, even if the element does not need it.
This results in scrolling being confined to that element sometimes,
such as when a document is scrolled using a mouse wheel
if the document scrolls the pointer into that element.
The result is that scrolling can be "trapped" on an element that
doesn't really need to scroll.

This disables vertical scrolling for those pre elements that might
trap scrolling in this way.
This commit is contained in:
Martin Thomson 2024-10-15 07:24:49 +11:00 committed by GitHub
parent 2d2e879bd1
commit 166340842e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -344,7 +344,7 @@ div:is(.artwork, .sourcecode) pre {
flex: 0 0 content;
margin: 0;
max-width: 72ch;
overflow: auto;
overflow: auto clip;
}
div:is(.artwork, .sourcecode) .pilcrow {
flex: 0 0 1ch;