-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
code-block.css
55 lines (49 loc) · 1.38 KB
/
code-block.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
code {
box-decoration-break: clone;
font-feature-settings: 'rlig' 1, 'calt' 1, 'ss01' 1;
&[data-line-numbers] > .line {
@apply nx-inline-flex nx-pl-2;
&::before {
counter-increment: line;
content: counter(line);
@apply nx-h-full nx-float-left nx-pr-4 nx-text-right nx-min-w-[2.6rem] nx-text-gray-500;
}
}
.line {
&.highlighted {
@apply nx-border-primary-600/60 nx-bg-primary-600/10;
}
.highlighted {
@apply nx-rounded-sm nx-shadow-[0_0_0_3px_rgba(0,0,0,.3)];
@apply nx-bg-primary-800/10 nx-shadow-primary-800/10;
@apply dark:nx-bg-primary-300/10 dark:nx-shadow-primary-300/10;
}
}
}
pre {
/* content-visibility: auto; */
contain: paint;
code {
@apply nx-grid nx-min-w-full nx-rounded-none nx-border-none !nx-bg-transparent !nx-p-0 nx-text-sm nx-leading-5 nx-text-current dark:!nx-bg-transparent;
.line {
@apply nx-border-l-2 nx-border-transparent nx-px-4;
}
}
html[data-nextra-word-wrap] & {
word-break: break-word;
@apply nx-whitespace-pre-wrap md:nx-whitespace-pre;
.line {
@apply nx-inline-block;
}
}
}
[data-rehype-pretty-code-fragment] {
@apply nx-relative nx-mt-6 first:nx-mt-0;
}
@supports (
(-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
.nextra-button {
@apply nx-backdrop-blur-md nx-bg-opacity-[.85] dark:nx-bg-opacity-80;
}
}