Www.rust-lang.org: Code example overflow on Networking page

Created on 2 Oct 2019  路  4Comments  路  Source: rust-lang/www.rust-lang.org

Design Bug Report

Page(s) Affected

Networking

What needs to be fixed?

Code examples in Get Started section of the Networking page

Suggested Improvement

Make it so that the code wraps instead of overflowing the page.

Desktop:
image
Mobile:
image

EDIT: After further investigation, this problem seems to affect multiple pages.

Most helpful comment

This isn't just the networking page. I'm guessing it's all pages. I thought I'd try to learn rust today only to find that the examples are unreadable

Screen Shot 2019-10-08 at 19 17 08

All 4 comments

Hey

Came across this issue and tried to fix it and after a couple tries managed to get it to look like this:
Ke虂pernyo虌foto虂 2019-10-02 - 21 08 25

Instead of what it looks like on the live site. The problem is that you have a white-space: no-wrap rule on the <code> tags, but if you remove that it will look like this:
Ke虂pernyo虌foto虂 2019-10-02 - 21 14 48

So I ditched the code tag and put it in a div and styled that. I'd be happy to submit a pr if you are interested!

This isn't just the networking page. I'm guessing it's all pages. I thought I'd try to learn rust today only to find that the examples are unreadable

Screen Shot 2019-10-08 at 19 17 08

This is fixed on the latest deployment, can be closed.

This bug appears to be fixed. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

technic picture technic  路  5Comments

Zaechus picture Zaechus  路  5Comments

ashleygwilliams picture ashleygwilliams  路  5Comments

Aloso picture Aloso  路  4Comments

Veedrac picture Veedrac  路  5Comments