Get the latest tech news

A subtle layout bug in Google Search: When CJK text-wrapping meets float


Explore an intriguing CSS bug in Google Search’s pagination, where the 'Next' link in the Chinese version wraps unexpectedly.

Subtle Width Interactions: The bug occurs due to a perfect storm of: More than two CJK characters, Precise margin-left values, and Floated image behavior. While examining the layout of the pagination component for this post, I noticed another issue: the page numbers and the “Next” text are slightly misaligned in CJK languages. Since different fonts have unique vertical metrics, such as baseline and line box properties, the text can appear misaligned when displayed together without proper adjustments.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Google Search

Google Search

Photo of float

float

Photo of wrapping

wrapping

Related news:

News photo

Google’s Gemini API and AI Studio get grounding with Google Search

News photo

Why Google Search Is Falling Apart?

News photo

How a Monday Night Football mishap may have exposed deep problems with Google Search