Skip to content

Commit d22ed31

Browse files
committed
update markdown h2 bottom-margin calculation
* calculation must use units; 'normal' value breaks calculation * replace --header-line-height variable with line height unit (lh) * introduce line heigh multiplier to reduce or increase line height
1 parent 745ba13 commit d22ed31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/themes/shared/_markdown.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,11 @@
276276

277277
h2 {
278278
--_spacing: 0.5em;
279+
--_line-height-muliplier: 0.9;
279280

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

0 commit comments

Comments
 (0)