mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
129 lines
2.3 KiB
Stylus
129 lines
2.3 KiB
Stylus
pre, code
|
||
background: $syntax-hl-bg-color
|
||
|
||
pre > code
|
||
background: none
|
||
line-height: 1.2
|
||
color: black
|
||
text-align: left
|
||
white-space: pre-wrap
|
||
word-spacing: normal
|
||
word-break: normal
|
||
tab-size: 4
|
||
hyphens: none
|
||
|
||
pre
|
||
position: relative
|
||
padding: rem(5px)
|
||
margin-bottom: rem(20px)
|
||
|
||
pre.shiki
|
||
padding: 1em
|
||
margin: .5em 0
|
||
border: 1px solid #dddddd
|
||
|
||
code
|
||
color: $code-color
|
||
font-size: rem($font-size-secondary)
|
||
|
||
.shiki .line.highlighted
|
||
position: absolute
|
||
left: 0
|
||
right: 0
|
||
padding: inherit 0
|
||
margin-top: 1em /* Same as .prism’s padding-top */
|
||
background: hsla(24, 20%, 50%,.08)
|
||
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0))
|
||
pointer-events: none
|
||
line-height: inherit
|
||
white-space: pre
|
||
|
||
.line-numbers code
|
||
counter-reset: step;
|
||
counter-increment: step 0;
|
||
|
||
.line::before
|
||
content: counter(step);
|
||
counter-increment: step;
|
||
width: 1rem;
|
||
margin-right: 1.5rem;
|
||
display: inline-block;
|
||
text-align: right;
|
||
color: rgba(115,138,148,.6)
|
||
|
||
.shiki
|
||
.tab, .space
|
||
position: relative
|
||
|
||
.tab::before
|
||
content: '⇥';
|
||
position: absolute;
|
||
opacity: 0.3;
|
||
|
||
.space::before
|
||
content: '·';
|
||
position: absolute;
|
||
opacity: 0.3;
|
||
|
||
.sample > .toolbar
|
||
right: 0.9375em !important
|
||
top: 3.7875em !important
|
||
|
||
.toolbar
|
||
position: absolute
|
||
white-space: no-wrap
|
||
right: 0 !important
|
||
top: 0 !important
|
||
padding: rem(5px) 0
|
||
opacity: 1 !important
|
||
background: rgba($syntax-hl-bg-color, 0.8)
|
||
font-family: $primary-font-family
|
||
pointer-events: all
|
||
user-select: none
|
||
transition: opacity .3s ease-in-out
|
||
z-index: 10
|
||
|
||
.toolbar-item
|
||
a
|
||
font-size: large !important
|
||
border-radius: 0px !important
|
||
background: none !important
|
||
box-shadow: 0 2px #0003
|
||
text-decoration: none
|
||
padding: 0 .5em
|
||
color: #bbb
|
||
|
||
.token.tab:not(:empty),
|
||
.token.cr,
|
||
.token.lf,
|
||
.token.space
|
||
position: relative
|
||
|
||
.token.tab:not(:empty):before,
|
||
.token.cr:before,
|
||
.token.lf:before,
|
||
.token.space:before
|
||
color: #808080
|
||
opacity: 0.6
|
||
position: absolute
|
||
|
||
.token.tab:not(:empty):before
|
||
content: '\21E5'
|
||
|
||
.token.cr:before
|
||
content: '\240D'
|
||
|
||
.token.crlf:before
|
||
content: '\240D\240A'
|
||
|
||
.token.lf:before
|
||
content: '\240A'
|
||
|
||
.token.space:before
|
||
content: '\00B7'
|
||
|
||
@media print {
|
||
pre .toolbar {
|
||
display: none !important;
|
||
}
|
||
} |