Skip to content

Commit

Permalink
fix(theme-default): fix code block align, fix #901
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 9, 2022
1 parent 998eb94 commit c3c4b06
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ecosystem/theme-default/src/client/styles/code.scss
Expand Up @@ -124,7 +124,8 @@ pre[class*='language-'] {
.theme-default-content {
pre,
pre[class*='language-'] {
line-height: 1.4;
// Safari only support integer pixel value for line-height
line-height: 1.375;
padding: 1.3rem 1.5rem;
margin: 0.85rem 0;
border-radius: 6px;
Expand Down Expand Up @@ -176,7 +177,7 @@ div[class*='language-'] {
top: 0;
left: 0;
width: 100%;
line-height: 1.4;
line-height: 1.375;

.highlight-line {
background-color: var(--code-hl-bg-color);
Expand Down Expand Up @@ -218,14 +219,14 @@ div[class*='language-'] {
text-align: center;
color: var(--code-ln-color);
padding-top: 1.25rem;
line-height: 1.4;
line-height: 1.375;
counter-reset: line-number;

.line-number {
position: relative;
z-index: 3;
user-select: none;
height: 1.4em;
height: 1.375em;

&::before {
counter-increment: line-number;
Expand Down

0 comments on commit c3c4b06

Please sign in to comment.