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

Mobile safari nav header vertically misaligned #254

Closed
chenglou opened this issue Dec 2, 2017 · 20 comments · Fixed by #1895
Closed

Mobile safari nav header vertically misaligned #254

chenglou opened this issue Dec 2, 2017 · 20 comments · Fixed by #1895
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@chenglou
Copy link
Contributor

chenglou commented Dec 2, 2017

img_15cf1519af9f-1

See the vertical alignment for the word BuckleScript vs the search

@JoelMarcey
Copy link
Contributor

@chenglou Interesting. I cannot reproduce Chrome Developer Tools, but I see it on my phone. :/

@JoelMarcey JoelMarcey added the good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. label Dec 7, 2017
@xyclos
Copy link

xyclos commented Dec 15, 2017

I'd like to work on this.

@richardzcode
Copy link
Contributor

Just tried with my phone. Looks good now, with icon. Maybe the misalignment was from empty icon

@JoelMarcey
Copy link
Contributor

@chenglou - are you still seeing the issue?

@chenglou
Copy link
Contributor Author

I can still see it. Not in chrome inspector, but in safari's inspector (Develop -> Responsive Design Mode)

@richardzcode
Copy link
Contributor

Now I see it. It can be reproduced in Chrome as well, but not on phone. Basically screen width need to be pretty small ( < 376px ) to make the icon go away then we can see the misalignment.

The CSS on navigation is kind of complicated. Luckily seems found a good fix.

I was going to make a PR but noticed there are differences between bucklescript.github.io and current example, in HTML and CSS. So no PR needed.

For bucklescript.github.io, just modify main.css file, add css for .wrapper in mediaquery of max 375px

@media (max-width: 375px) {
  .logo {
    display: none;
  }

  .headerTitle {
    font-size: 17px;
  }

  .wrapper {
    padding: 0 10px;
  }
}

The padding was '0 20px', just change it to '0 10px'

@chenglou
Copy link
Contributor Author

Thanks for diagnosing this! Ideally the custom.css file in ReasonReact and BuckleScript can completely disappear (we do have site-specific css file, but the custom.css are downstream fixes). So I think a PR to fix this in docusaurus is valuable. It also happens to the docusaurus website itself

@richardzcode
Copy link
Contributor

docusaurus

Docusaurus site look fine on my Safari, not as misaligned as in BuckleScript

I see BuckleScript and Docusaurus sites had already diverged on HTML and CSS. I assume new websites wouldn't have the problem.

Also, I just realized I was trying to fix the alignment between BuckleScript and Docs, actually not the issue stated here :p

Maybe you can try to get latest docusaurus layout and see if problem still remains.

@chenglou
Copy link
Contributor Author

I've tested without custom styles at all and still saw the misalignment. This is what I see on iOS11:

pasted graphic

@richardzcode richardzcode mentioned this issue Dec 21, 2017
@JoelMarcey
Copy link
Contributor

Since the height is different on Chrome than Safari, I think fixing an absolute value of a CSS property isn't the answer. There is some underlying difference in how Safari is rendering the search box relative to the top vs. Chrome. We need to figure out why that is.

@haraldur12
Copy link
Contributor

haraldur12 commented Jan 15, 2018

I am tackling the issue. I mean I am trying. I think it has not been fixed yet I assume.

screen shot 2018-01-15 at 22 02 23

Seems like the search bar is overlapping as well. However it doesn't seem to be appearing on chrome.

@danphamus304
Copy link

@JoelMarcey JoelMarcey added bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. labels Feb 27, 2018
@JoelMarcey
Copy link
Contributor

I assume this issue still exists, but would love if someone can confirm it.

@chenglou
Copy link
Contributor Author

Still is for docusaurus.io

@JoelMarcey
Copy link
Contributor

cc @html5cat

@yangshun
Copy link
Contributor

yangshun commented May 4, 2018

Some preliminary findings - li.navSearchWrapper has a computed height of 30px on iOS devices but 22px on Android devices. Probably due to some inconsistency in flexbox.

@endiliey
Copy link
Contributor

Is this still happening ? Don't have an iOS devices 😢

@html5cat
Copy link

Yes. There's also a 1 px gap between the nav bars now:
https://photos.app.goo.gl/ouZdT6FvVAvUKjTY6

@ahmadalfy
Copy link
Contributor

This issue still persist in the current website. I can fix it

img_20190129_152557

@endiliey
Copy link
Contributor

endiliey commented May 14, 2019

@ahmadalfy still working on it ? 😉

Edit: If anyone wanted to send a PR. Feel free to do so ! :)

@endiliey endiliey added difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. and removed difficulty: starter Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan. labels May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution good first issue If you are just getting started with Docusaurus, this issue should be a good place to begin. help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants