hexo-theme-stellar/source/css/_plugins/copycode.styl

39 lines
736 B
Stylus
Raw Normal View History

2023-05-09 12:54:34 +08:00
.highlight
position: relative
.highlight .code .copy-btn
position: absolute
top: 0
right: 0
padding: 4px 0.5rem
opacity: 0
font-weight: 700
2023-12-18 13:37:00 +08:00
color: var(--text-p2)
border-bottom-left-radius: $border-bar
border-bottom-right-radius: $border-bar
background: var(--block-hover)
display: block
2023-05-09 12:54:34 +08:00
cursor: pointer
2023-12-18 13:37:00 +08:00
margin-right: 0.5rem
2023-05-09 12:54:34 +08:00
2023-12-18 13:37:00 +08:00
.highlight:hover
.code:before
opacity: 0
.copy-btn
opacity: 0.75
2023-05-09 12:54:34 +08:00
.highlight .code .copy-btn:hover
2023-12-18 13:37:00 +08:00
opacity: 1
2023-05-09 12:54:34 +08:00
.highlight .code .copy-btn.success
color: $c-green
opacity: 0.75
.highlight .code .copy-btn.warning
color: $c-orange
2023-12-18 13:37:00 +08:00
opacity: 0.75
2024-01-03 13:57:18 +08:00
.md-text .folding[child=codeblock]
2023-12-18 13:37:00 +08:00
.highlight .code .copy-btn
2024-01-03 13:57:18 +08:00
margin-top: 1rem
2023-12-18 13:37:00 +08:00
border-radius: $border-bar