Skip to content

Commit 3e1a11d

Browse files
committed
Fix duplicate copy buttons in sphinxawesome and shibuya themes
sphinx-copybutton styles its button as `button.copybtn`, so the `.copybtn` hide rule lost on specificity and both copy buttons rendered. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
1 parent 4aa5ce1 commit 3e1a11d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎yardang/shibuya.css‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ a.reference > img {
88
max-width: unset;
99
}
1010

11-
/* Shibuya ships its own copy button; hide the sphinx-copybutton duplicate */
12-
.copybtn {
11+
/* Shibuya ships its own copy button; hide the sphinx-copybutton duplicate.
12+
Must match copybutton.css's `button.copybtn` specificity to win. */
13+
button.copybtn {
1314
display: none;
1415
}

‎yardang/sphinxawesome_theme.css‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ a.reference > img {
2727
background-color: rgba(255, 255, 255, 0.08) !important;
2828
}
2929

30-
/* Hide duplicate copybtn */
31-
.copybtn {
30+
/* Hide the sphinx-copybutton duplicate; the theme ships its own button.copy.
31+
Must match copybutton.css's `button.copybtn` specificity to win. */
32+
button.copybtn {
3233
display: none;
3334
}
3435

0 commit comments

Comments
 (0)