From d986826467057137961d6414d2974b7fe95a02c1 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Tue, 20 May 2025 14:47:36 -0400 Subject: [PATCH 1/2] html - fix code-copy style (#5538) --- src/resources/formats/html/_quarto-rules.scss | 3 +-- src/resources/formats/html/bootstrap/_bootstrap-rules.scss | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/resources/formats/html/_quarto-rules.scss b/src/resources/formats/html/_quarto-rules.scss index 502db518caa..4a4e9959f5e 100644 --- a/src/resources/formats/html/_quarto-rules.scss +++ b/src/resources/formats/html/_quarto-rules.scss @@ -282,8 +282,7 @@ details > summary > p:only-child { } // codeCopy -pre.sourceCode, -code.sourceCode { +div.sourceCode { position: relative; } diff --git a/src/resources/formats/html/bootstrap/_bootstrap-rules.scss b/src/resources/formats/html/bootstrap/_bootstrap-rules.scss index 817ddeaabcf..ed6dd280b9b 100644 --- a/src/resources/formats/html/bootstrap/_bootstrap-rules.scss +++ b/src/resources/formats/html/bootstrap/_bootstrap-rules.scss @@ -877,7 +877,7 @@ pre.sourceCode { border: none; } font-size: $code-block-font-size; - overflow: visible !important; + overflow-y: auto !important; @if $code-block-bg { padding: $code-block-bg-padding; } @@ -890,7 +890,7 @@ pre.sourceCode > code.sourceCode { } div.sourceCode { - overflow-y: hidden; + position: relative; } .callout div.sourceCode { From fd8da75d4d8477b62a03e2f4c3a4af07b96662c2 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Tue, 20 May 2025 14:49:53 -0400 Subject: [PATCH 2/2] changelog --- news/changelog-1.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/news/changelog-1.8.md b/news/changelog-1.8.md index 0bc7f25cd00..08da8a978a2 100644 --- a/news/changelog-1.8.md +++ b/news/changelog-1.8.md @@ -12,6 +12,7 @@ All changes included in 1.8: - ([#678](https://github.com/quarto-dev/quarto-cli/issues/678)): a11y - Provide appropriate `aria-label` to search button. - ([#726](https://github.com/quarto-dev/quarto-cli/issues/726)): a11y - Provide `.screen-reader-only` callout type when callout text doesn't naturally include the type. +- ([#5538](https://github.com/quarto-dev/quarto-cli/issues/5538)): Fix code-copy button style so that scrolling behaves properly. - ([#10983](https://github.com/quarto-dev/quarto-cli/issues/10983)): Fix spacing inconsistency between paras and first section headings. - ([#12259](https://github.com/quarto-dev/quarto-cli/issues/12259)): Fix conflict between `html-math-method: katex` and crossref popups (author: @benkeks). - ([#12734](https://github.com/quarto-dev/quarto-cli/issues/12734)): `highlight-style` now correctly supports setting a different `light` and `dark`.