question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Paragraphs have too much line height

See original GitHub issue

Summary

In the redesigned MDN docs, it’s difficult to distinguish paragraphs from other surrounding text (and from each other).

Where did you spot the bug?

A good content-heavy page: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images

image

What is the problem?

The paragraphs have too much line height compared to the spacing between them, making them visually blend into each other.

What did you expect to happen?

The paragraphs should use a line height that improves readability and makes it easier for readers to distinguish paragraphs from each other. From testing, the following values seem to work well:

  • Line height: 1.8
  • Paragraph spacing: 1.8rem 0

Example:

image

Steps to reproduce the issue

  1. Visit any page in the new docs.
  2. Observe that too much line height is being used for text.

Environment

Any (N/A)

Device

  • Desktop
  • Mobile
  • Tablet

Browser

Any

Operating system

Any

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
AleksandrHovhannisyancommented, Mar 23, 2022

@schalkneethling Yup, makes sense!

1reaction
schalkneethlingcommented, Mar 23, 2022

@AleksandrHovhannisyan for sure. I do experiment some by bumping it up and down. It is such a tricky thing to get to a place where everyone is happy. A lot of it is also a matter of personal taste. This is essentially why I wanted to open this up to more people. That way it is not just what I find readable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

line-height in paragraphs with very large text - Stack Overflow
The line-height for paragraphs should be at least 1.5 times the font size. The underlying success criteria on visual presentation from W3C is ......
Read more >
You need to fix your `line-height` - Kevin Powell
Body text (your normal paragraph text) should have a line-height of 1.4–1.6, give or take. Different fonts mean different line-height; Changes ...
Read more >
How to Tame Line Height in CSS
When a browser encounters the line-height property, what it actually does is take the line of text and place it in the middle...
Read more >
The Fine Line Between Good and Bad UX Design - UXPin
If line spacing is too large, there's too much white space. The text looks awkward. If line spacing is too small, letters appear...
Read more >
InDesign Line Spacing Error!?! - Adobe Support Community
This means you can have different leading applied to text within one paragraph. The most likely cause of your problem is at least...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found