mirror of
https://github.com/kuohuanhuan/x-markdown-css.git
synced 2024-11-25 06:18:19 +00:00
refactor!: deprecate .prose
class and lint
This commit is contained in:
52
src/partials/code.scss
Normal file
52
src/partials/code.scss
Normal file
@ -0,0 +1,52 @@
|
||||
code {
|
||||
color: var(--xm-c-deep);
|
||||
font-weight: 600;
|
||||
font-size: .875rem;
|
||||
font-family: var(--xm-font-code);
|
||||
&::before,
|
||||
&::after {
|
||||
content: '`';
|
||||
}
|
||||
}
|
||||
pre {
|
||||
overflow-x: auto;
|
||||
margin-top: 1.75rem;
|
||||
margin-bottom: 1.75rem;
|
||||
padding-top: .875rem, 1.15rem;
|
||||
border-radius: .375rem;
|
||||
color: var(--xm-c-pre);
|
||||
font-size: .875rem;
|
||||
line-height: 1.75;
|
||||
code {
|
||||
padding: 0;
|
||||
border-width: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font-weight: 400;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
line-height: inherit;
|
||||
&::before,
|
||||
&::after {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
&:not(.shiki) {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
.shiki {
|
||||
margin: .5rem 0;
|
||||
font-size: 1.05rem;
|
||||
font-family: var(--xm-font-code) !important;
|
||||
line-height: 1.4;
|
||||
&.shiki-light {
|
||||
background: var(--xm-c-shiki-light) !important;
|
||||
}
|
||||
&.shiki-dark {
|
||||
background: var(--xm-c-shiki-dark) !important;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user