gleam-lang / website

🏡 Gleam's website and guide

Home Page:https://gleam.run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Layout breaks on certain screens

arothuis opened this issue · comments

I noticed this in the cli reference when I visited on my phone (here emulated in Chrome):

image

The culprit in this case seems to be the following <code> block:
image

This behavior is caused by white-space: nowrap;. A fix would be to use a block-element like <pre> or style the wrapping differently (e.g. white-space: normal or white-space: pre-line) on this one.

Additionally, we could consider a block element with overflow-x: auto. This presents a scrollable code-block on screens that lack horizontal space.

Oh dear! Thank you

The issue seems to be happening because <code> has the CSS property of white-space: nowrap;.