open-consul/ui-v2/app/styles/base/components/tabs/layout.scss
John Cowen d1cbc3f032 ui: Tab Improvements (animations/branding) (#7772)
* ui: Adds a tab selection animation to our app tabs

1. Replace all mentions of `magenta` with a themeable CSS property.
2. Add an easy way to inline style DOM nodes
3. Use CSS properties to add tab animation

* Fix up rendering test

* Avoid DOM noodling as much as possible
2020-05-12 17:14:43 +00:00

31 lines
633 B
SCSS

%tab-nav {
clear: both;
}
%tab-nav ul {
display: inline-flex;
align-items: center;
position: relative;
padding: 0;
margin: 0;
}
%with-animated-tab-selection ul::after {
@extend %as-pseudo, %with-transition-500;
position: absolute;
bottom: 0;
height: 0;
border-top: 0;
width: calc(var(--selected-width, 0) * 1px);
transform: translate(calc(var(--selected-left, 0) * 1px), 0);
transition-property: transform, width;
}
%tab-button {
display: inline-block;
padding: 16px 13px;
}
%tab-section section h3 {
margin: 24px 0;
}
%tab-section section:not(:last-child) {
border-bottom: 1px solid $gray-200;
}