You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated docs on long pages render text on top of itself #88545
I hope this is the right repo to report this, I wasn't sure if it should go in the main rust repo instead.
The generated docs for pages with a crazy number of items seem to give up on positioning and then just dump all subsequent entries on the same line past a certain point. It looks like it might be related to hardware acceleration, but I'm not sure.
Can confirm that problem on my PC in Edge.
Also on my smartphone in Edge and Chrome, I need to change the view of the website to "Desktop website" then I see it there too.
I can't reproduce this in Firefox on macOS, but I can in Chrome on macOS. So I'm guessing it's a bug specific to Blink because I think Chrome and Edge both use Blink, whereas Firefox does not.
It seems to be a bug with Blink's grid implementation. If I turn off the display: grid style it works (but obviously changes the layout).
I’m not saying it’s not grid, but just pointing out that changing the display completely changes the layout and so may avoid the problem even if it’s something else. In theory, anyway.
Fair point. A minimal test case appears to show the same issue but I'll admit that does not necessarily determine the root cause:
<!DOCTYPE html><html><head><metacharset="utf-8"><title>Test display grid with lots of children</title></head><bodystyle="display: grid;"><script>for(leti=0;i<600;i++){document.write(`<div>Testing</div>`);document.write(`<div>Overtype</div>`);}</script></body></html>
It looks like this issue was previously reported here and there are some relevant links towards the end. Notably a confirmation that there is currently a 1000 row limit to grids in Blink. There is also a recent reddit thread on the issue.
... in the range [-10000, 10000]), dropping all lines outside that limit.
So we would run into trouble if a table gets longer than 10k entries.
However:
... if a UA only supported grids with at most 1000 tracks in each dimension, the following placement properties:
grid-row:
grid-column:
To me the spec reads as, the UA (User Agent aka Browser) is free to enforce lower limits if there is not enough memory available.
I would like to look at the display: table* because that would allow us to keep the automatic layout switching on mobile (and support for it looks good) https://caniuse.com/?search=table
Activity
jyn514 commentedon Aug 31, 2021
@mqudsi no worries - rustdoc is used for both docs.rs and the main doc.rust-lang.org website, but docs.rs doesn't have control over the main site.
jyn514 commentedon Aug 31, 2021
I can't reproduce this on mobile Chrome though - maybe it's related to the screen size?

Seadragon91 commentedon Sep 1, 2021
Can confirm that problem on my PC in Edge.
Also on my smartphone in Edge and Chrome, I need to change the view of the website to "Desktop website" then I see it there too.
camelid commentedon Sep 1, 2021
I can't reproduce this in Firefox on macOS, but I can in Chrome on macOS. So I'm guessing it's a bug specific to Blink because I think Chrome and Edge both use Blink, whereas Firefox does not.
ChrisDenton commentedon Sep 1, 2021
It seems to be a bug with Blink's grid implementation. If I turn off the
display: gridstyle it works (but obviously changes the layout).mqudsi commentedon Sep 1, 2021
I’m not saying it’s not grid, but just pointing out that changing the display completely changes the layout and so may avoid the problem even if it’s something else. In theory, anyway.
ChrisDenton commentedon Sep 1, 2021
Fair point. A minimal test case appears to show the same issue but I'll admit that does not necessarily determine the root cause:
mqudsi commentedon Sep 1, 2021
I think your test case confirms the cause, at least from a black box perspective, sufficiently ;)
dbalcomb commentedon Sep 6, 2021
It looks like this issue was previously reported here and there are some relevant links towards the end. Notably a confirmation that there is currently a 1000 row limit to grids in Blink. There is also a recent reddit thread on the issue.
GuillaumeGomez commentedon Sep 8, 2021
Do you have an idea @dns2utf8 ? The best would be to not use grid at all. If you have no idea, I'll send a fix in the next coming days.
dns2utf8 commentedon Sep 9, 2021
I can confirm this with Chromium 93 and IE Edge 91.
I tried adding a
<br>after the grid-layout (works with floats sometimes) but will try some more.It works with Firefox 91 and 92 so I assume it is a chrome render-engine bug.
9 remaining items
dns2utf8 commentedon Sep 9, 2021
In the upcoming CSS Grid-2 spec (https://www.w3.org/TR/css-grid-2/#overlarge-grids) there is this sentence:
So we would run into trouble if a table gets longer than 10k entries.
However:
To me the spec reads as, the UA (User Agent aka Browser) is free to enforce lower limits if there is not enough memory available.
I would like to look at the
display: table*because that would allow us to keep the automatic layout switching on mobile (and support for it looks good) https://caniuse.com/?search=tableRollup merge of rust-lang#88776 - dns2utf8:rustdoc_workaround_1000_el…
Backport rust-lang#88776: Workaround blink/chromium grid layout limit…
jyn514 commentedon Sep 15, 2021
This was fixed by #88776, right?
GuillaumeGomez commentedon Sep 15, 2021
I'm waiting for #88816 before closing it.
camelid commentedon Sep 16, 2021
@GuillaumeGomez Can you add
Closes <this issue number>to the PR description then, to make sure the issue is closed on merge?Add a test to detect overlapping entries in overview tables
Rollup merge of rust-lang#88816 - dns2utf8:rustdoc_test_gui_2k_consta…
Rollup merge of rust-lang#88816 - dns2utf8:rustdoc_test_gui_2k_consta…
Add a test to detect overlapping entries in overview tables