Skip to content

Conversation

@alexandersandberg
Copy link
Member

Fixes broken code block tabs.

Motivation:

The code block tabs don't work properly on mobile:

  • On the install page, the Fish tab is not visible
  • On the CLI tools page, it doesn't scroll all the way to the last item.

Modifications:

  • Fixed the width of the tabs
    • I'm not sure what the negative 59px was for?

Result:

Install page

Before After
CleanShot 2025-06-04 at 22 08 14 CleanShot 2025-06-04 at 22 08 22

CLI tools page

Before After
CleanShot 2025-06-04 at 22 08 02 CleanShot 2025-06-04 at 22 07 32

@shahmishal shahmishal merged commit 77b7c81 into main Jun 4, 2025
4 checks passed
@shahmishal shahmishal deleted the alexandersandberg/fix-code-block-tabs branch June 4, 2025 23:34

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.

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

Successfully merging this pull request may close these issues.

4 participants