Skip to content

Commit

Permalink
fix(kcodeblock): prevent unexpected horizontal scrollbar (#2592)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo authored Feb 5, 2025
1 parent 1f4eecb commit 83316f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/KCodeBlock/KCodeBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ $kCodeBlockDarkLineMatchBackgroundColor: rgba(255, 255, 255, 0.12); // we don't
display: grid;
margin: var(--kui-space-0, $kui-space-0);
min-height: 32px; // ensures that scroll bar doesn't show up when there's only one line of content (not to confuse with single line mode)
overflow: visible;
position: relative;
&:not(.single-line) {
Expand All @@ -918,6 +919,8 @@ $kCodeBlockDarkLineMatchBackgroundColor: rgba(255, 255, 255, 0.12); // we don't
// Lines are rendered by Virtualizer now
:deep(.line) {
@include codeTypography;
box-sizing: border-box;
display: flex;
padding-left: var(--kui-space-40, $kui-space-40);
Expand Down

0 comments on commit 83316f7

Please sign in to comment.