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 horizontal scrollbar on small screens #285

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

alsolovyev
Copy link
Contributor

Fixes #284

This is necessary to correctly calculate the width
of the content container.
@nikmel2803 nikmel2803 added the bug Something isn't working label Nov 30, 2022
@@ -1,5 +1,4 @@
.docs-sidebar {
width: 100vw;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just replace 100vw with 100%?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to specify an additional width for this element on mobile devices:

  • block-level elements, by default, take up the entire width of the parent (100%)
  • mobile-first approach prevents default styles from being overridden

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, seems reasonable

@nikmel2803 nikmel2803 merged commit 59829f5 into codex-team:main Dec 1, 2022
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

Successfully merging this pull request may close these issues.

Horizontal scrollbar visible on small screens
3 participants