Skip to content

Commit

Permalink
fix: Set overflow-y to clip for pre (#8047)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinthomson authored Oct 14, 2024
1 parent 2d2e879 commit 1663408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ietf/static/css/document_html_txt.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1663408

Please sign in to comment.