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

Fix navbar line break in docusaurus #7831

Closed
wants to merge 1 commit into from

Conversation

andriijas
Copy link
Contributor

The new docusaurus 2 site is gorgeous. I noticed a line break in the navbar in safari 13. I didn't manage to sort out why it happens. Putting in Create React App on the official docusaurus website didn't break the line (middle screenshot below). Right now Im not sure whatever it's an issue in bootstrap or docusaurus

I ended up fixing it with white-space: nowrap

I also tried:

  • Fixing flex basis on the container
  • Fixing flex wrap

Screenshot 2019-10-16 at 11 47 48

It's a minor but it makes it looks smoother.

ping @endiliey

@endiliey
Copy link
Contributor

That was intentional though for small screen. cc @yangshun

If this PR is applied, for small screen you'll see discrepancy like this
image

@andriijas
Copy link
Contributor Author

andriijas commented Oct 16, 2019

Ah, thats not good enough. Are the breakpoint variables available for custom.css or is there any other way to solve it?
Thx

@andriijas
Copy link
Contributor Author

I dont think its intentional though because in chrome its correct (1 line) in desktop and line split in mobile.

@iansu
Copy link
Contributor

iansu commented Oct 16, 2019

@endiliey I did notice this on mobile as well. It would be nice if the search input was maybe just the magnifying glass icon in this case. Clicking it could expand it in some way to allow text entry. Just a thought.

@endiliey
Copy link
Contributor

endiliey commented Oct 17, 2019

We already did that. For devices with viewport width less than 360px, the searchbar is replaced with a search icon.
On tap of the search icon the searchbar is expanded and the text "Docusaurus" beside the logo is hidden and remains hidden while the search bar is expanded.

Example:

https://user-images.githubusercontent.com/17883920/62456721-4b285f00-b7a3-11e9-930b-0542ad3f7fdf.gif

I guess we need to adjust the media query.

WDYT @yangshun on the line break ? Its infima (another facebookincubator project) css

@andriijas
Copy link
Contributor Author

@endiliey any idea on how to solve this with the latest docusaurus beta or should we just close this one?

@endiliey
Copy link
Contributor

we use a css framework called infima (still in facebookincubator). I think @yangshun is the best person to answer this

@andriijas andriijas closed this Feb 6, 2020
@andriijas andriijas deleted the docstylefix branch February 6, 2020 17:25
@lock lock bot locked and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants