Skip to content

Remove redundant line-height from body#15212

Merged
philipp-spiess merged 2 commits into
tailwindlabs:mainfrom
MartijnCuppens:rm-body-line-height
Mar 18, 2025
Merged

Remove redundant line-height from body#15212
philipp-spiess merged 2 commits into
tailwindlabs:mainfrom
MartijnCuppens:rm-body-line-height

Conversation

@MartijnCuppens

@MartijnCuppens MartijnCuppens commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

It was added in #2729 to override line heights set on the body by modern-normalize. However, it appears that modern-normalize never included any line-height definitions—only a font-family rule was present.

Ref: https://github.com/sindresorhus/modern-normalize/blob/v1.1.0/modern-normalize.css

@philipp-spiess

Copy link
Copy Markdown
Contributor

However, it appears that modern-normalize never included any line-height definitions—only a font-family rule was present.

Maybe I misunderstand something but there's a line-height rule here: https://github.com/sindresorhus/modern-normalize/blob/v1.1.0/modern-normalize.css#L33

@MartijnCuppens

Copy link
Copy Markdown
Contributor Author

Yup, and the <body> inherits that line height by default, there's no need to explicitly set this.

@philipp-spiess philipp-spiess left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! This looks good to me. Did some more testing across Safari/Chrome/Firefox just in case.

@philipp-spiess philipp-spiess merged commit 1564bf0 into tailwindlabs:main Mar 18, 2025
@MartijnCuppens MartijnCuppens deleted the rm-body-line-height branch March 18, 2025 17:46
tongrow pushed a commit to tongrow/tailwind-normalize that referenced this pull request Jun 2, 2025
It was added in tailwindlabs#2729 to override line heights set on the body by
modern-normalize. However, it appears that modern-normalize never
included any line-height definitions—only a font-family rule was
present.

Ref:
https://github.com/sindresorhus/modern-normalize/blob/v1.1.0/modern-normalize.css

---------

Co-authored-by: Philipp Spiess <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants