mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-26 22:26:05 +00:00
53 lines
1.5 KiB
CSS
53 lines
1.5 KiB
CSS
:root {
|
|
--shiki-color-text: #414141;
|
|
--shiki-color-background: transparent;
|
|
--shiki-token-constant: #1976d2;
|
|
--shiki-token-string: #22863a;
|
|
--shiki-token-comment: #aaa;
|
|
--shiki-token-keyword: #d32f2f;
|
|
--shiki-token-parameter: #ff9800;
|
|
--shiki-token-function: #6f42c1;
|
|
--shiki-token-string-expression: #22863a;
|
|
--shiki-token-punctuation: #212121;
|
|
--shiki-token-link: #22863a;
|
|
}
|
|
|
|
[data-rehype-pretty-code-fragment] {
|
|
@apply relative;
|
|
}
|
|
[data-rehype-pretty-code-fragment] code {
|
|
@apply grid min-w-full break-words rounded-none border-0 bg-transparent dark:bg-transparent p-0;
|
|
counter-reset: line;
|
|
box-decoration-break: clone;
|
|
}
|
|
[data-rehype-pretty-code-fragment] .line {
|
|
@apply px-4 py-1 min-h-[0.85rem];
|
|
}
|
|
[data-rehype-pretty-code-fragment] [data-line-numbers] .line {
|
|
@apply px-2;
|
|
}
|
|
[data-rehype-pretty-code-fragment] [data-line-numbers] > .line::before {
|
|
counter-increment: line;
|
|
content: counter(line);
|
|
display: inline-block;
|
|
width: 1rem;
|
|
margin-right: 1rem;
|
|
text-align: right;
|
|
color: gray;
|
|
}
|
|
[data-rehype-pretty-code-fragment] .line--highlighted {
|
|
@apply bg-slate-300 bg-opacity-10;
|
|
}
|
|
[data-rehype-pretty-code-fragment] .line-highlighted span {
|
|
@apply relative;
|
|
}
|
|
[data-rehype-pretty-code-fragment] .word--highlighted {
|
|
@apply rounded-md bg-slate-300 bg-opacity-10 p-1;
|
|
}
|
|
[data-rehype-pretty-code-title] {
|
|
@apply inline-block mt-6 py-1 px-1 text-sm font-medium text-slate-700 dark:text-slate-400;
|
|
}
|
|
[data-rehype-pretty-code-title] + pre {
|
|
@apply mt-2;
|
|
}
|