67 lines
1.3 KiB
Stylus
67 lines
1.3 KiB
Stylus
disable-user-select() {
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.highlight-container {
|
|
position: relative;
|
|
}
|
|
|
|
.highlight-container:hover .copy-btn, .highlight-container .copy-btn:focus {
|
|
opacity: 1;
|
|
}
|
|
|
|
.copy-btn {
|
|
cursor: pointer;
|
|
display: inline-block;
|
|
font-weight: bold;
|
|
line-height: 1.8;
|
|
opacity: 0;
|
|
outline: 0;
|
|
padding: 2px 6px;
|
|
position: absolute;
|
|
vertical-align: middle;
|
|
white-space: nowrap;
|
|
font-size: 1rem;
|
|
color: var(--default-text-color);
|
|
disable-user-select();
|
|
transition-t("opacity", "0", "0.2", "ease-in-out");
|
|
|
|
|
|
if (hexo-config('code_copy.style') == 'mac') {
|
|
color: white;
|
|
right: 2px;
|
|
top: 2px;
|
|
} else {
|
|
background: var(--background-color);
|
|
border: 0;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
}
|
|
|
|
|
|
if (hexo-config('code_copy.style') == 'mac') {
|
|
.highlight-container {
|
|
background: #21252b;
|
|
border-radius: 5px;
|
|
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
|
|
padding-top: 20px;
|
|
margin-top: 10px;
|
|
|
|
&::before {
|
|
background: #fc625d;
|
|
border-radius: 50%;
|
|
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
|
content: ' ';
|
|
height: 12px;
|
|
left: 12px;
|
|
margin-top: -10px;
|
|
position: absolute;
|
|
width: 12px;
|
|
}
|
|
}
|
|
}
|