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

38 lines
718 B
Stylus

.highlight
position: relative
.highlight .code .copy-btn
position: absolute
top: 0
right: 0
padding: 4px 0.5rem
opacity: 0
font-weight: 700
color: var(--text-p2)
border-bottom-left-radius: $border-bar
border-bottom-right-radius: $border-bar
background: var(--block-hover)
display: block
cursor: pointer
margin-right: 0.5rem
.highlight:hover
.code:before
opacity: 0
.copy-btn
opacity: 0.75
.highlight .code .copy-btn:hover
opacity: 1
.highlight .code .copy-btn.success
color: $c-green
opacity: 0.75
.highlight .code .copy-btn.warning
color: $c-orange
opacity: 0.75
.md-text .tag-plugin[child=codeblock]
.highlight .code .copy-btn
border-radius: $border-bar