Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't wrap the code snippets in our docs #31679

Merged
merged 5 commits into from
Oct 22, 2020
Merged

Don't wrap the code snippets in our docs #31679

merged 5 commits into from
Oct 22, 2020

Conversation

mdo
Copy link
Member

@mdo mdo commented Sep 16, 2020

Bringing back no wrapping in our code snippets. This helps keep pages and doc snippets a little shorter on our longer pages. Found myself hitting wrapped lines with only a few characters on a new line.

Only affects our docs.

Preview: https://deploy-preview-31679--twbs-bootstrap.netlify.app/

@XhmikosR
Copy link
Member

I must be blind, but I don't see any difference?

@patrickhlauke
Copy link
Member

have to admit i'm not seeing it either, unless i'm not looking at the right place? e.g. comparing the second code block on, say, https://deploy-preview-31679--twbs-bootstrap.netlify.app/docs/5.0/components/button-group/#button-toolbar vs https://v5.getbootstrap.com/docs/5.0/components/button-group/#button-toolbar i see no difference (both bring up horizontal scrollbar?)

@mdo
Copy link
Member Author

mdo commented Oct 21, 2020

This does have an affect. See the difference in this page:

Difference is most clear under the JS sections.

Before:

Screen Shot 2020-10-21 at 9 08 59 AM

After:

Screen Shot 2020-10-21 at 9 08 51 AM

@XhmikosR
Copy link
Member

It still looks the same for me with Firefox 82.0 and Chrome 86 on Windows :/ What is your window dimensions and browser?

@ffoodd
Copy link
Member

ffoodd commented Oct 22, 2020

Same here, no change on both Firefox and Chromium on Ubuntu.

@patrickhlauke
Copy link
Member

patrickhlauke commented Oct 22, 2020

this seems to be a Safari/macOS issue only (even Chrome/macOS currently already does the scrollbar on the live v5 docs). but can confirm now that I can see what @mdo described above, and this change indeed forces Safari to behave as intended.

(for reference/clarification: i just fired up my Macbook and tried it in Safari. happens at all window sizes, so not just tied to viewport or anything like that)

@XhmikosR
Copy link
Member

OK, that makes sense since I don't own any Apple devices myself 😛

So, assuming this does not affect any other browsers and fixes the issue on Safari, it should be good to go, right?

@patrickhlauke
Copy link
Member

So, assuming this does not affect any other browsers and fixes the issue on Safari, it should be good to go, right?

yup, i'd say so

@XhmikosR XhmikosR merged commit 594efec into main Oct 22, 2020
@XhmikosR XhmikosR deleted the dont-wrap-snippets branch October 22, 2020 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants