mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-09 17:42:19 +00:00
72 lines
1.5 KiB
CSS
72 lines
1.5 KiB
CSS
/* adapted from https://digitaldrummerj.me/hugo-add-copy-code-snippet-button/ */
|
|
|
|
.highlight {
|
|
position: relative;
|
|
z-index: 0;
|
|
padding: 0;
|
|
margin:40px 0 10px 0;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.copy-code-button {
|
|
position: absolute;
|
|
z-index: -1;
|
|
right: 0px;
|
|
top: -26px;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
line-height: 14px;
|
|
letter-spacing: 0.5px;
|
|
width: 65px;
|
|
color: var(--fg);
|
|
background-color: var(--bg);
|
|
border: 1.25px solid var(--off-bg);
|
|
border-top-left-radius: 4px;
|
|
border-top-right-radius: 4px;
|
|
border-bottom-right-radius: 0px;
|
|
border-bottom-left-radius: 0px;
|
|
white-space: nowrap;
|
|
padding: 6px 6px 7px 6px;
|
|
margin: 0 0 0 1px;
|
|
cursor: pointer;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.copy-code-button:hover,
|
|
.copy-code-button:focus,
|
|
.copy-code-button:active,
|
|
.copy-code-button:active:hover {
|
|
color: var(--off-bg);
|
|
background-color: var(--off-fg);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.copyable-text-area {
|
|
position: absolute;
|
|
height: 0;
|
|
z-index: -1;
|
|
opacity: .01;
|
|
}
|
|
|
|
.torchlight [data-lang]:before {
|
|
position: absolute;
|
|
z-index: -1;
|
|
top: -26px;
|
|
left: 0px;
|
|
content: attr(data-lang);
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
color: var(--fg);
|
|
background-color: var(--bg);
|
|
border-top-left-radius: 4px;
|
|
border-top-right-radius: 4px;
|
|
border-bottom-left-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
padding: 6px 6px 7px 6px;
|
|
line-height: 14px;
|
|
opacity: 0.6;
|
|
position: absolute;
|
|
letter-spacing: 0.5px;
|
|
border: 1.25px solid var(--off-bg);
|
|
margin: 0 0 0 1px;
|
|
}
|