Closed agnesesterhuizen closed 5 years ago
What browser/OS are you using? It doesn't look that way for me:
Looks like it might have something to do with the font being used on your PC. Maybe we need to be more specific in the CSS about what font we're using...
I am on macOS Sierra viewing the site in Chrome but text is wrapping this way in Firefox and Safari too. I tried out some other monospace fonts in the devtools and it is still wrapping. I found that lowering the font size slightly is fixing it so maybe it has something to do with how the font is being rendered on my side
How about a white-space: no-wrap;
and overflow: scroll;
?
Fixing it by changing the font size / font family is no real solution. You can't test on all potential devices/browsers
If we use a specific font loaded via web fonts then all browsers which support web fonts should display the text exactly the same.
overflow: scroll;
might still be a good idea, just in case, but I'd prefer it if most users don't have to scroll to see all code in that box.
which support web fonts should display the text exactly the same.
Nope, sorry, thats wrong. Font rendering differs from OS type, version, configuration AND zoom level of the user. Even with the exact same font type and size in css.
but I'd prefer it if most users don't have to scroll to see all code in that box.
I am with u, sane default settings, but still, should always work, for everybody on any device
@andrewesterhuizen I've tried to reproduce this, but wasn't able to. Are you still encountering this with the current site? We've made some changes, so I'm wondering if that's why I can't reproduce it.
@ismay Just had a look and it seems to be fixed now
Nice, thanks for checking. In that case I’ll close it 👍
The elevator pitch code example and some other examples on the site have their right hand side comments wrapping over to the next line which makes it difficult to read the code. It seems to wrap fine on the smaller breakpoint
Screenshot: