Skip to content

Commit

Permalink
fix: min line height for all blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
BearToCode committed Feb 27, 2024
1 parent 33cd80a commit 7f38d27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
{#each lines as line}
<div class="msm__line">
<div class="msm__content">
<!--
An empty character is needed, as in Chromium <pre> elements with
no content have height 0.
-->
<pre>{line.content.trim() != '' ? line.content : ' '}</pre>
<pre>{line.content}</pre>
</div>
</div>
{/each}
Expand Down
5 changes: 2 additions & 3 deletions packages/core/src/lib/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,8 @@
width: 100%;
}

.mismerge .msm__line pre:empty::before {
content: '.';
visibility: hidden;
.mismerge .msm__line pre {
min-height: 1lh;
}

.mismerge .msm__block.modified pre {
Expand Down

0 comments on commit 7f38d27

Please sign in to comment.