Skip to content

Commit b3556df

Browse files
Fix baseline alignment for line numbers
1 parent 817ee12 commit b3556df

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

components/blocks/code.module.css

+11-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,16 @@
3737
@apply opacity-100;
3838
}
3939

40-
/* Code block adjustments */
40+
/* Line numbers */
41+
.Container span:global(.line-numbers-rows) {
42+
@apply -top-[2px];
43+
}
44+
45+
.Container span:global(.line-numbers-rows) > span {
46+
@apply text-base leading-relaxed;
47+
}
48+
49+
/* Code block styles */
4150
.Container pre code :global(.operator) {
4251
@apply text-yellow-50;
4352
}
@@ -75,7 +84,7 @@
7584
@apply inline;
7685
}
7786

78-
/* Dark mode adjustments */
87+
/* Dark mode styles */
7988
:global(.dark) .Container pre code :global(.operator),
8089
:global(.dark) .Container pre code :global(.decorator) {
8190
@apply text-yellow-80;

0 commit comments

Comments
 (0)