Skip to content

Commit b3e7925

Browse files
authored
Merge pull request #12787 from quarto-dev/bugfix/5538
html - fix code-copy style (#5538)
2 parents 37cbc79 + fd8da75 commit b3e7925

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

news/changelog-1.8.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ All changes included in 1.8:
1212

1313
- ([#678](https://github.com/quarto-dev/quarto-cli/issues/678)): a11y - Provide appropriate `aria-label` to search button.
1414
- ([#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.
15+
- ([#5538](https://github.com/quarto-dev/quarto-cli/issues/5538)): Fix code-copy button style so that scrolling behaves properly.
1516
- ([#10983](https://github.com/quarto-dev/quarto-cli/issues/10983)): Fix spacing inconsistency between paras and first section headings.
1617
- ([#12259](https://github.com/quarto-dev/quarto-cli/issues/12259)): Fix conflict between `html-math-method: katex` and crossref popups (author: @benkeks).
1718
- ([#12734](https://github.com/quarto-dev/quarto-cli/issues/12734)): `highlight-style` now correctly supports setting a different `light` and `dark`.

src/resources/formats/html/_quarto-rules.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ details > summary > p:only-child {
282282
}
283283

284284
// codeCopy
285-
pre.sourceCode,
286-
code.sourceCode {
285+
div.sourceCode {
287286
position: relative;
288287
}
289288

src/resources/formats/html/bootstrap/_bootstrap-rules.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ pre.sourceCode {
877877
border: none;
878878
}
879879
font-size: $code-block-font-size;
880-
overflow: visible !important;
880+
overflow-y: auto !important;
881881
@if $code-block-bg {
882882
padding: $code-block-bg-padding;
883883
}
@@ -890,7 +890,7 @@ pre.sourceCode > code.sourceCode {
890890
}
891891

892892
div.sourceCode {
893-
overflow-y: hidden;
893+
position: relative;
894894
}
895895

896896
.callout div.sourceCode {

0 commit comments

Comments
 (0)