🚧 Change the code block style settings.

This commit is contained in:
凡梦星尘
2022-06-29 08:56:13 +08:00
parent 748c44e25d
commit b9cd603c04
5 changed files with 44 additions and 37 deletions

View File

@@ -1,6 +1,3 @@
.highlight:hover .copy-btn, pre:hover .copy-btn {
opacity: 1;
}
.highlight {
@@ -15,38 +12,45 @@
}
}
.copy-btn {
color: $black-dim;
cursor: pointer;
line-height: 1.6;
opacity: 0;
padding: 2px 6px;
position: absolute;
right: 8px;
top: 4px;
transition: opacity $transition-ease;
background: var(--highlight-background);
@if $codeblock_copy_btn_enable {
@if $codeblock_copy_btn_style == 'flat' {
background: white;
border: 0;
font-size: $font-size-smaller;
} @else if $codeblock_copy_btn_style == 'mac' {
color: var(--highlight-foreground);
font-size: 14px;
border-radius: 3px;
} @else {
background-color: $gainsboro;
background-image: linear-gradient(#fcfcfc, $gainsboro);
border: 1px solid #d5d5d5;
border-radius: 3px;
font-size: $font-size-smaller;
.highlight:hover .copy-btn, pre:hover .copy-btn {
opacity: 1;
}
.copy-btn {
color: $black-dim;
cursor: pointer;
line-height: 1.6;
opacity: 0;
padding: 2px 6px;
position: absolute;
right: 8px;
top: 4px;
transition: opacity $transition-ease;
background: var(--highlight-background);
@if $codeblock_style == 'flat' {
background: white;
border: 0;
font-size: $font-size-smaller;
} @else if $codeblock_style == 'mac' {
color: var(--highlight-foreground);
font-size: 14px;
border-radius: 3px;
} @else {
background-color: $gainsboro;
background-image: linear-gradient(#fcfcfc, $gainsboro);
border: 1px solid #d5d5d5;
border-radius: 3px;
font-size: $font-size-smaller;
}
}
}
@if $codeblock_copy_btn_style == 'mac' {
@if $codeblock_style == 'mac' {
.highlight {
border-radius: 5px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
@@ -65,4 +69,4 @@
@include round-icon(12px);
}
}
}
}