Break text responsively

Last updated June 22, 2021 by Jacob Paris

Every once in a while I find myself writing paragraphs of text that look fine on desktop, but on mobile are an indecipherable wall of text that would make Tolkien proud.

To get around this, I've started using <br /> elements between each sentence in my paragraphs and then using media queries to hide them on larger screen sizes.

https://codepen.io/anon/pen/dEyPep

1<p>
2 Spicy jalapeno bacon ipsum dolor amet ball tip meatball burgdoggen cupim
3 buffalo elit beef shank.
4 <br class="minor" />
5 Ball tip biltong shoulder, officia tenderloin duis ut voluptate proident
6 cupidatat bacon reprehenderit capicola.
7 <br class="major" />
8 Sunt in in, non filet mignon flank chuck cow eiusmod laboris officia alcatra
9 aute.
10 <br class="minor" />
11 Officia commodo ut in, meatloaf veniam velit eu consequat.
12 <br class="major" />
13 Magna corned beef tail short loin enim, pastrami picanha shank meatloaf in
14 burgdoggen pancetta frankfurter t-bone.
15</p>
16
1br {
2 line-height: 2rem;
3 @media screen and (min-width: 500px) {
4 &.minor {
5 display: none;
6 }
7 }
8 @media screen and (min-width: 800px) {
9 &.major {
10 line-height: 1rem;
11 }
12 }
13 @media screen and (min-width: 1000px) {
14 &.major {
15 display: none;
16 }
17 }
18}
19

You can tweak the breakpoints to match your specific layout.

Demo here: https://codepen.io/anon/pen/dEyPep