Skip to content

Commit

Permalink
Fix padding of headings with multiple children
Browse files Browse the repository at this point in the history
This is the case when e.g. part of the heading is italicized.
  • Loading branch information
rakyi committed Dec 19, 2024
1 parent 897c586 commit e48e78d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion site/owid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ h6 {
// doesn't work and programmatically wrapping the last word and the
// deep-link in a span with text-wrap: nowrap would be an even bigger hack.
&:has(.deep-link) {
> *:first-child {
// Pick the second-to-last child, since the heading can have multiple
// elements as children and the last child is the deep-link.
> *:nth-last-child(2) {
padding-right: 2rem;

// On touch devices, the deep-link is hidden, so we don't need the
Expand Down

0 comments on commit e48e78d

Please sign in to comment.