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

Broken layout in Safari mobile #45

Closed
lisahoong opened this issue Mar 13, 2018 · 9 comments
Closed

Broken layout in Safari mobile #45

lisahoong opened this issue Mar 13, 2018 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lisahoong
Copy link

On a desktop browser this calendar appears just fine, but when I view this on my iPhone 7 in my Safari app, the last weekday's dates get pushed to the next line like this:

image

@wojtekmaj
Copy link
Owner

Hey Lisa,
I need a little more information to help you. Is the same issue happening when you open the following pages?

  1. Demo page
  2. Test page

@wojtekmaj wojtekmaj self-assigned this Mar 13, 2018
@wojtekmaj wojtekmaj added the question Further information is requested label Mar 13, 2018
@PiTomar
Copy link

PiTomar commented Mar 14, 2018

Hi,
in IE11 there is a similar issue:
unbenannt

@lisahoong
Copy link
Author

lisahoong commented Mar 14, 2018

On the demo page, it looks like this:
image

On the test page, it looks like this:
image

Thank you for your help!

@wojtekmaj
Copy link
Owner

@lisahoong, it looks like tile elements have some additional margin or a border, which is not standard button styling. I sadly have no Safari. Would you please try using this CSS and tell me if it works for you? If it does, I'll push the fix.

.react-calendar__tile {
  margin: 0;
  border: 0;
}

@PiTomar, thanks for mentioning it - I could reproduce this, indeed IE fails to scale flex items properly.

@wojtekmaj wojtekmaj added bug Something isn't working and removed question Further information is requested labels Mar 14, 2018
@wojtekmaj wojtekmaj added this to the 2.13.0 milestone Mar 14, 2018
@nathan-haines
Copy link

@wojtekmaj Is that fix for IE in already? Just trying to figure out if the issue is on my end now haha

@wojtekmaj
Copy link
Owner

@nathan-haines, it has landed on master branch; now I just need info from Lisa if the other part of the fix had worked :) I'd rather push an entire fix.

For those interested - Internet Explorer seems to be ignoring box-sizing: border-box property when in flex boxes. Tiles are measured to have exactly 100% / 7 width, but Internet Explorer measures them and THEN applies the padding which makes the tiles larger. max-width: 100% / 7 does the trick.

@brettshumaker
Copy link

@wojtekmaj Adding margin:0 to .react-calendar_tile fixes the issue for me in safari (iOS and desktop)

@lisahoong
Copy link
Author

Thank you so much!!

@wojtekmaj
Copy link
Owner

My pleasure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants