[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1793464077629.jpg (148.12 KB, 1024x1024, img_1793464069631_vpeelb1m.jpg)ImgOps Exif Google Yandex

1cd04 No.2309

Been seeing way too many headers breaking mid-word on mobile lately. It's honestly painful to look at when you have a nice serif font and the line breaks right after a single character. It totally destroys the visual weight of the headline. I hate it when a huge chunk of whitespace just sits there because the second line only has two letters. If you're dealing with short headings or titles that shouldn't look like a ragged mess, just use text-wrap: balance. It tells the engine to try and distribute the words more evenly across lines. It's not for long paragraphs though, because it'll kill your performance if the browser has to recalculate every single line break in a huge block of text. Just stick to using it on h1 or h2 elements where you want that pretty typographic balance without the heavy lifting.

h1 {text-wrap: balance;}


NEVER USE THIS ON LONG BODY TEXT

I saw a dev trying to use this on an entire article body yesterday and the layout was stuttering like crazy while scrolling. It's great for headlines, but keep it contained.

acb7a No.2340

File: 1793995607746.jpg (59.98 KB, 1880x1253, img_1793995592220_7t4hg0lp.jpg)ImgOps Exif Google Yandex

>>2309
had a client site where an h1 looked absolutely trashed on iphone because of a single trailing letter, so i just dropped that property in and fixed it instantly



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]