add copy codeblock button

Apply suggestions from code review

Co-authored-by: Danny <Rapptz@users.noreply.github.com>

Change to icon, change according to slice's review
This commit is contained in:
NCPlayz
2020-05-27 00:50:51 +01:00
committed by Rapptz
parent c21919cee5
commit ce0d0a20dd
3 changed files with 60 additions and 2 deletions

View File

@ -143,7 +143,7 @@ label.toggle input:checked + span.toggle-slider:before {
transform: translateX(18px);
}
div.related {
padding: 10px 10px;
width: 100%;
@ -703,4 +703,30 @@ div.code-block-caption {
background-color: transparent;
border-left: none;
}
}
}
.relative-copy {
position: relative;
}
.copy {
cursor: pointer;
position: absolute;
width: 16px;
height: 16px;
top: 0px;
right: 0px;
border: 1px solid #C6C9CB;
line-height: 0.8em;
font-size: 0.9em;
font-family: monospace;
padding-left: 0.2em;
padding-right: 0.2em;
border-radius: 0px 3px 0px 0px;
text-align: center;
}
.copy i {
display: inline;
vertical-align: middle;
}