Skip to content

Commit 7c249c5

Browse files
authored
fix(ui): ensure selected line highlights full width in code viewer (#1924)
1 parent 462fb98 commit 7c249c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/components/Code/Viewer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ watch(
115115
<!-- Code content -->
116116
<div class="code-content flex-1 overflow-x-auto min-w-0">
117117
<!-- eslint-disable vue/no-v-html -- HTML is generated server-side by Shiki -->
118-
<div ref="codeRef" class="code-lines w-fit" v-html="html" />
118+
<div ref="codeRef" class="code-lines min-w-full w-fit" v-html="html" />
119119
<!-- eslint-enable vue/no-v-html -->
120120
</div>
121121
</div>
@@ -157,7 +157,7 @@ watch(
157157
158158
/* Highlighted lines in code content - extend full width with negative margin */
159159
.code-content :deep(.line.highlighted) {
160-
background: rgb(234 179 8 / 0.2); /* yellow-500/20 */
160+
@apply bg-yellow-500/20;
161161
margin: 0 -1rem;
162162
padding: 0 1rem;
163163
}

0 commit comments

Comments
 (0)