Add code copy button to all code fields in the blog (#81)

This commit is contained in:
Alexander Dunkel 2019-08-18 16:27:31 +02:00 committed by Track3
parent a9f2ddcfa9
commit 16c9d78ae5
10 changed files with 110 additions and 6 deletions

View file

@ -153,6 +153,37 @@ table {
display: none;
}
// Code copy buttons
//
.highlight {
position: relative;
}
.highlight pre {
padding-right: 75px;
}
.highlight-copy-btn {
position: absolute;
bottom: 7px;
right: 7px;
border: 0;
border-radius: 4px;
padding: 1px;
font-size: 0.7em;
line-height: 1.8;
color: #fff;
background-color: #777;
opacity: 0.6;
min-width: 55px;
text-align: center;
}
.highlight-copy-btn:hover {
background-color: #666;
}
// Accessibility
//
.screen-reader-text {