-
-
Notifications
You must be signed in to change notification settings - Fork 842
Add smooth width animations for tabs #2678
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
| line-height: 36px; | ||
| height: 36px; | ||
| overflow: hidden; | ||
|
|
@@ -113,7 +113,8 @@ body.linux #menu-button { | |
| padding-right: 0.5rem; | ||
| } | ||
| .tab-item.active { | ||
| min-width: 168px; | ||
| flex: 1.6; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| min-width: 268px; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
|
|
@@ -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
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these are already inherited from the rule above. |
||
| } | ||
|
|
||
| /* icons */ | ||
|
|
||

There was a problem hiding this comment.
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.2sin addition to the other ones (it's used for an animation when scrolling up on tabs with a trackpad)