Created
October 29, 2021 14:09
-
-
Save jkeefe/d3a7bc0b8eda68fc6fc8a11df0bae946 to your computer and use it in GitHub Desktop.
Prevent sub/superscripts from affecting line height in CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from https://css-tricks.com/snippets/css/prevent-superscripts-and-subscripts-from-affecting-line-height/ | |
sup, sub { | |
vertical-align: baseline; | |
position: relative; | |
top: -0.4em; | |
} | |
sub { | |
top: 0.4em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment