Live data from Hacker News

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

likang.dev

1–10 of 26 posts

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

#3
While following the development of the Ladybird browser[0] I found out many of the Web Platform Tests[1] are related to CJK rendering which I found surprising, but seeing this it makes a lot more sense.

[0] https://ladybird.org/

[1] https://wpt.fyi/results/?label=experimental&label=master&ali...

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

#6
Not surprising.

The homepage of Google has n-e-v-e-r had an error free console, which I find funny considering it's literally a white page with a logo and a lonely text field, and considering that Google expends so much effort trying to sling their design methodology onto everyone. "Do as I say, not as I do."

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

#7

In short: don't use "float: left/right" for anything besides real floating images. In this case a "display: flex" on the element would be a much better solution.

I wonder how long ago this CSS was written...

That particular UI element of google search has been around decades, so might predate css flex...

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

#8

In short: don't use "float: left/right" for anything besides real floating images. In this case a "display: flex" on the element would be a much better solution.

I wonder how long ago this CSS was written... That particular UI element of google search has been around decades, so might predate css flex...

2009 but css flex didn't become popular until 2014+.

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

#10
post #8

Earlier quoted context omitted.

I wonder how long ago this CSS was written... That particular UI element of google search has been around decades, so might predate css flex...

2009 but css flex didn't become popular until 2014+.

In 2009, one still needed to give IE6 serious thought (even if, depending on the use case, the conclusion could already be “nope”). At the time, I had someone telling me that we shouldn’t waste our time on supporting mobile. And flexbox was more a curiosity you studied with a hope of using someday than a serious option.

And clearing your floats was part of the absolute basics. Of course, we still forgot to now and then.

Post reply on HN