Skip to content
Closed
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
11 changes: 9 additions & 2 deletions css/tabBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ body.linux #menu-button {
.tab-item {
flex: 1;
min-width: 125px;
transition: 0.2s transform;
transition: flex 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We still need the transform 0.2s in addition to the other ones (it's used for an animation when scrolling up on tabs with a trackpad)

line-height: 36px;
height: 36px;
overflow: hidden;
Expand All @@ -113,7 +113,8 @@ body.linux #menu-button {
padding-right: 0.5rem;
}
.tab-item.active {
min-width: 168px;
flex: 1.6;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks good when there are a lot of tabs, but it looks strange when there's only two. I think in this case the tabs should stay equal width:

Image

Could we either:

  • Remove the flex rules and use only min-width?
  • Apply the flex rules only when the compact-tabs class is active (see tabBar.js)?

min-width: 268px;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Obviously there's no objectively correct value, but this feels a bit too large to me. How about 220px?

}
.tab-item.gu-mirror {
top: var(--control-space-top) !important;
Expand Down Expand Up @@ -161,12 +162,18 @@ body.linux #menu-button {

.tab-item:not(.active):hover {
background-color: rgba(0, 0, 0, 0.03);
flex: 1.25;
min-width: 156px;
}
.dark-theme .tab-item:not(.active):hover {
background-color: rgba(255, 255, 255, 0.1);
flex: 1.25;
min-width: 156px;
}
.dark-theme.theme-background-low-contrast .tab-item:not(.active):hover {
background-color: rgba(255, 255, 255, 0.15);
flex: 1.25;
min-width: 156px;
Comment on lines +170 to +176
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think these are already inherited from the rule above.

}

/* icons */
Expand Down