Skip to content

Commit 721a7cc

Browse files
authored
fix(code-block): show scrollbar for long lines (#115)
1 parent 064fce3 commit 721a7cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/elements/src/code-block/CodeBlock.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ onBeforeUnmount(() => {
6969
>
7070
<div class="relative">
7171
<div
72-
class="overflow-hidden dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm"
72+
class="overflow-auto dark:hidden [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm"
7373
v-html="html"
7474
/>
7575
<div
76-
class="hidden overflow-hidden dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm"
76+
class="hidden overflow-auto dark:block [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm"
7777
v-html="darkHtml"
7878
/>
7979
<div v-if="$slots.default" class="absolute top-2 right-2 flex items-center gap-2">

0 commit comments

Comments
 (0)