rust-lang / blog.rust-lang.org

Home of the Rust and Inside Rust blogs
https://blog.rust-lang.org
Apache License 2.0
354 stars 285 forks source link

style: wrap text code to prevent content overflow-x #1325

Open peterpeterparker opened 5 months ago

peterpeterparker commented 5 months ago

Description

While I was reading the announcement of Rust 1.78 on my mobile device, I noticed the page overflow-x was "broken".

Changes

This PR resolves the UI glitch by setting white-space: pre-wrap for the blocks of code that aren't displayed within a preformatted element.

Screenshots

Capture d’écran 2024-05-02 à 16 20 07 Capture d’écran 2024-05-02 à 16 20 49 Capture d’écran 2024-05-02 à 16 20 26 Capture d’écran 2024-05-02 à 16 21 19