Skip to content

Commit d60b342

Browse files
committed
fix: align code content
1 parent 0d9f723 commit d60b342

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

app/components/CodeViewer.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,25 @@ watch(
110110
111111
.code-content :deep(code) {
112112
display: block;
113+
padding: 0 1rem;
113114
background: transparent !important;
114115
}
115116
116117
.code-content :deep(.line) {
117118
display: block;
118-
padding: 0 1rem;
119-
/* Ensure consistent line height matching line numbers */
120-
line-height: 1.5rem;
121-
min-height: 1.5rem;
119+
/* Ensure consistent height matching line numbers */
120+
line-height: 24px;
121+
min-height: 24px;
122+
max-height: 24px;
123+
white-space: pre;
124+
overflow: hidden;
122125
transition: background-color 0.1s;
123126
}
124127
125128
/* Highlighted lines in code content */
126129
.code-content :deep(.line.highlighted) {
127130
background: rgb(234 179 8 / 0.2); /* yellow-500/20 */
131+
margin: 0 -1rem;
132+
padding: 0 1rem;
128133
}
129134
</style>

0 commit comments

Comments
 (0)