Skip to content

Commit

Permalink
[html-fonts] Prevent sup/sub from affecting baseline
Browse files Browse the repository at this point in the history
Source: https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/

Previously <sup> and <sub> would cause the baseline to move
vertically.
  • Loading branch information
christopherlam committed Mar 8, 2021
1 parent a9dcf0d commit 9a6aaac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gnucash/report/html-fonts.scm
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,7 @@
"td.total-number-cell { " total-number-cell-info " }\n"
"td.total-label-cell { " total-label-cell-info " }\n"
"td.centered-label-cell { text-align: center; " centered-label-cell-info " }\n"
"sub { top: 0.4em; }\n"
"sub, sup { vertical-align: baseline; position: relative; top: -0.4em; }\n"
"@media print { html, body { height: unset; }}\n"
(or (gnc:html-document-style-text doc) "")))))

1 comment on commit 9a6aaac

@christopherlam
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly visible on budget report with footnotes. See superscript text.

Before:
image

After:
image

Please sign in to comment.