Commit ac74713f authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI Tab Strip: Keep new tab button fixed

The tab strip's height can change while it is animating in and out
but its final height is the sum of var(--tabstrip-tab-height) and
2 of var(--tabstrip-tab-list-vertical-padding). Hard-coding the top
value of the new tab button to 50% of this ensures the button stays
fixed in the middle of the tab strip, even if the height is being
animated.

Change-Id: I555052195eaf7e2c97b212817debd73093f6d630
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2076543Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746233}
parent 6fbd33d2
......@@ -96,7 +96,8 @@
margin: 0;
position: fixed;
right: var(--tabstrip-new-tab-button-margin);
top: 50%;
top: calc((var(--tabstrip-tab-height) / 2)
+ var(--tabstrip-tab-list-vertical-padding));
transform: translateY(-50%);
width: var(--tabstrip-new-tab-button-width);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment