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

Content is not sized correctly for the viewport #32

Open
samazgor opened this issue Oct 14, 2018 · 1 comment
Open

Content is not sized correctly for the viewport #32

samazgor opened this issue Oct 14, 2018 · 1 comment

Comments

@samazgor
Copy link

Progressive Web App > The viewport size is 1364px, whereas the window size is 1366px.

@PN1019
Copy link

PN1019 commented Nov 18, 2018

@samazgor try and run this script on the developer console see it return any elements

 (function (d) {
        var w = d.documentElement.offsetWidth,
            t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
            b;
        while (t.nextNode()) {
            b = t.currentNode.getBoundingClientRect();
            if (b.right > w || b.left < 0) {
                t.currentNode.style.setProperty('outline', '1px dotted red', 'important');
                console.log(t.currentNode);
            }
        };
    }(document));

In your case, the element which is overflowing. use css to make sure it doesn't overflow for example , on the container

max-width: 100vw; overflow-x: hidden

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

2 participants