1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 18:26:38 -04:00

fix copy button position on overflowed single-line blocks

This commit is contained in:
2021-08-17 07:31:56 -04:00
parent 96d5ad5ff1
commit e245205265
4 changed files with 104 additions and 102 deletions

View File

@ -32,7 +32,6 @@ div.highlight {
overflow-x: scroll;
margin: 1em 0;
border: 1px solid;
position: relative;
pre {
padding-left: 1.5em;
@ -43,24 +42,24 @@ div.highlight {
> pre > code {
padding-right: 1.5em;
}
}
// elements dynamically added by clipboard.js code
div.highlight-clipboard-enabled {
position: relative;
button.copy-button {
position: absolute;
top: 0;
right: 0;
z-index: 2;
width: 5.25em;
padding: 0.75em 0.25em;
border: 1px solid;
cursor: pointer;
width: 5em;
padding: 0.75em 0.25em;
font-size: 0.9em;
font-weight: 500;
background: transparent;
border-top: 0;
border-right: 0;
border-left: 1px solid;
border-bottom: 1px solid;
}
}