Skip to content

Commit

Permalink
Merge pull request #742 from 18F/nmb/207-break-link
Browse files Browse the repository at this point in the history
#207: Wrap h2 balanced to keep long headings together with their permalinks
  • Loading branch information
neilmb authored Oct 21, 2024
2 parents 0e66d4b + 389bea8 commit 2199560
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/_common/styles/custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ h1, h2, h3, h4, h5, h6 {
word-wrap: break-word;
}

h2, h3, h4, h5, h6 {
// prevent orphans and use balance if pretty is not available
text-wrap: balance;
text-wrap: pretty;
}

h2 {
margin-top: units(5);
&.page-title {
Expand Down

0 comments on commit 2199560

Please sign in to comment.