feat: add line numbers for code blocks
This commit is contained in:
parent
d831f4f5ca
commit
8b8a765d56
|
@ -61,10 +61,20 @@ const className = Astro.props.class;
|
|||
padding: 0.125rem 0.25rem
|
||||
border-radius: 0.25rem
|
||||
overflow: hidden
|
||||
counter-reset: line
|
||||
&:before
|
||||
content: none
|
||||
&:after
|
||||
content: none
|
||||
span.line
|
||||
&:before
|
||||
content: counter(line)
|
||||
counter-increment: line
|
||||
direction: rtl
|
||||
display: inline-block
|
||||
margin-right: 1rem
|
||||
width: 1.375rem
|
||||
color: rgba(255, 255, 255, 0.25)
|
||||
pre
|
||||
background: var(--codeblock-bg) !important
|
||||
border-radius: 0.75rem
|
||||
|
@ -127,7 +137,6 @@ const className = Astro.props.class;
|
|||
@layer components {
|
||||
.custom-md h1 {
|
||||
@apply text-3xl
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue