Skip to content

Commit

Permalink
Provide copy button container sufficient min height (#1810)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabalafou committed May 13, 2024
1 parent 2a690ef commit cf29b9c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ div.highlight button.copybtn {
outline: $focus-ring-outline;
}
}

div.highlight:has(button.copybtn) {
// Make sure the code block has enough height for the copy button.
// Sphinx-copybutton sets 0.3em top offset plus 1.7em height:
// https://github.com/executablebooks/sphinx-copybutton/blob/master/sphinx_copybutton/_static/copybutton.css
min-height: 2em;
}

0 comments on commit cf29b9c

Please sign in to comment.