Skip to content

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

Merged
XhmikosR merged 5 commits into
mainfrom
dont-wrap-snippets
Oct 22, 2020
Merged

Don't wrap the code snippets in our docs#31679
XhmikosR merged 5 commits into
mainfrom
dont-wrap-snippets

Conversation

@mdo

@mdo mdo commented Sep 16, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@patrickhlauke

Copy link
Copy Markdown
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

mdo commented Oct 21, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

ffoodd commented Oct 22, 2020

Copy link
Copy Markdown
Contributor

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

@patrickhlauke

patrickhlauke commented Oct 22, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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