Add code copy button to all code fields in the blog (#81)
This commit is contained in:
parent
a9f2ddcfa9
commit
16c9d78ae5
10 changed files with 110 additions and 6 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue