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

40 lines
801 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
2024-01-12 13:26:13 +08:00
padding: 0px 0.5rem
2023-05-09 12:54:34 +08:00
font-weight: 700
2024-01-12 13:26:13 +08:00
visibility: hidden
2023-12-18 13:37:00 +08:00
border-bottom-left-radius: $border-bar
border-bottom-right-radius: $border-bar
2024-01-12 13:26:13 +08:00
background: var(--card)
2023-12-18 13:37:00 +08:00
display: block
2023-05-09 12:54:34 +08:00
cursor: pointer
2024-01-12 13:26:13 +08:00
margin-right: 4px
margin-top: 4px
2024-02-03 16:36:29 +08:00
border-radius: 'calc(%s - 4px)' % $border-card
2023-05-09 12:54:34 +08:00
2023-12-18 13:37:00 +08:00
.highlight:hover
.code:before
2024-01-12 13:26:13 +08:00
visibility: hidden
2023-12-18 13:37:00 +08:00
.copy-btn
2024-01-12 13:26:13 +08:00
visibility: visible
2023-05-09 12:54:34 +08:00
.highlight .code .copy-btn.success
2024-01-12 13:26:13 +08:00
background: $c-green
color: white
visibility: visible
2023-05-09 12:54:34 +08:00
.highlight .code .copy-btn.warning
2024-01-12 13:26:13 +08:00
background: $c-orange
color: white
visibility: visible
2023-12-18 13:37:00 +08:00
2024-01-03 13:57:18 +08:00
.md-text .folding[child=codeblock]
2024-01-12 13:26:13 +08:00
.code .copy-btn
z-index 1
margin-right: 1rem
2023-12-18 13:37:00 +08:00
border-radius: $border-bar