Skip to content

Commit

Permalink
Move content closer up to related header.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Nov 14, 2023
1 parent 9fc93dd commit c4a6200
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/sass/base/grouping/_grouping.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hr {

p {
// Add vertical rhythm margins.
@include margin-block(.375 .75);
@include margin-block(.75);

// Set max text line width in main for readability.
.main & {
Expand Down
20 changes: 20 additions & 0 deletions assets/sass/base/headings/_headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ h6,
}
}

// Move content closer up to related header.
h2,
%h2,
h3,
%h3,
h4,
%h4,
h5,
%h5,
h6,
%h6 {
& + :is(p, ul, ol) {
@include margin-block-start(0.375);
}

& + & {
@include margin-block-start(0.5);
}
}

h1,
%h1 {
// h1 only on top of page so different margins.
Expand Down

0 comments on commit c4a6200

Please sign in to comment.