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

Fullscreen element on desktop Safari #163

Open
ghost opened this issue Dec 2, 2019 · 0 comments
Open

Fullscreen element on desktop Safari #163

ghost opened this issue Dec 2, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 2, 2019

I tried to render an element fullscreen on desktop Safari but was failing to make the element really full screen; I was left with black boxes on both sides of the element. Also, when exiting fullscreen, the whole window rendering got messed and didn't resize correctly (even after page refresh!). Chrome and Firefox worked out-of-the-box.

However, found this bit of css which fixed the problem for me, just in case someone else is struggling with the same issue!

  *|*:fullscreen:not(:root) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    box-sizing: border-box !important;
    object-fit: contain;
    transform: none !important;
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants