Skip to content

Fix code block tabs on mobile #1045

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,10 @@

@media only screen and (max-width: 768px) {
nav {
width: 100%;

ul {
white-space: nowrap;
width: calc(100% - 59px);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @alexandersandberg, The intent here was to extend the tab nav to the edge of the container, so it was clear that the element was scrollable. The 59px accounts for half the horizontal padding. It's definitely a bit of a magic number right now, so maybe we can rework that or add a comment to make it more clear. I do see that the last item isn't scrolling correctly. Adding some padding to the last item or edge of the container may correct that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I was too slow.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see! I think it would be good to avoid the magic numbers though as they're likely to break sooner or later. I will see if I can figure out a way around it.

}
}
}
Expand Down