Skip to content

Commit fdce5fe

Browse files
committed
fix: safari has a slight ui difference using lh and em units instead of variables
1 parent 5a14726 commit fdce5fe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/themes/shared/_markdown.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@
278278
h2 {
279279
--_spacing: 0.5em;
280280

281-
margin-bottom: calc(var(--_spacing) + (1lh - 1em));
281+
margin-bottom: calc(
282+
var(--_spacing) + (var(--heading-line-height) - var(--font-size-xxl))
283+
);
282284
padding-bottom: var(--_spacing);
283285
border-bottom: 1px solid var(--border-color);
284286
font-size: var(--font-size-xxl);

src/themes/shared/_vars.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
--form-element-color : ;
116116
--heading-color : var(--strong-color);
117117
--heading-font-weight : 600;
118-
--heading-line-height : calc(2ex + 5px);
118+
--heading-line-height : calc(2ex + 5px); /* Unit required */
119119
--kbd-bg : var(--color-mono-1);
120120
--kbd-border : 1px solid var(--color-mono-3);
121121
--kbd-border-radius : 4px;

0 commit comments

Comments
 (0)