From 166340842ed3e4927cd8dd174aecdce8a4df50aa Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Tue, 15 Oct 2024 07:24:49 +1100 Subject: [PATCH] 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. --- ietf/static/css/document_html_txt.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/static/css/document_html_txt.scss b/ietf/static/css/document_html_txt.scss index b0fec7c4d6..a5991056c9 100644 --- a/ietf/static/css/document_html_txt.scss +++ b/ietf/static/css/document_html_txt.scss @@ -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;