fleet/frontend/components/TabsWrapper/_styles.scss

85 lines
1.8 KiB
SCSS
Raw Normal View History

.component__tabs-wrapper {
position: sticky;
top: 0;
background-color: $core-white;
z-index: 2;
.react-tabs {
&__tab-list {
border-bottom: 1px solid $ui-gray;
}
&__tab {
2021-12-13 23:09:12 +00:00
padding: $pad-small 0;
margin-right: $pad-xxlarge;
font-size: $x-small;
border: none;
display: inline-flex;
flex-direction: column;
align-items: center;
2021-12-13 23:09:12 +00:00
&:focus {
box-shadow: none;
outline: 0;
2022-03-10 22:16:07 +00:00
&:after {
left: 0;
bottom: 0;
}
}
// Bolding text when the button is active causes a layout shift
// so we add a hidden pseudo element with the same text string
&:before {
content: attr(data-text);
height: 0;
visibility: hidden;
overflow: hidden;
user-select: none;
pointer-events: none;
font-weight: $bold;
}
&--selected {
font-weight: $bold;
2021-12-13 23:09:12 +00:00
&::after {
2021-12-13 23:09:12 +00:00
content: "";
width: 100%;
height: 0;
border-bottom: 2px solid #6a67fe;
position: absolute;
bottom: 0;
left: 0;
}
}
&--disabled {
cursor: not-allowed;
}
&.no-count:not(.errors-empty).react-tabs__tab--selected::after {
bottom: -2px;
}
.count {
margin-right: $pad-small;
padding: $pad-xxsmall 12px;
background-color: $core-vibrant-red;
display: inline-block;
border-radius: 29px;
color: $core-white;
font-weight: $bold;
}
}
&__tab-panel {
.no-results-message {
margin-top: $pad-xxlarge;
font-size: $small;
font-weight: $bold;
2021-12-13 23:09:12 +00:00
span {
margin-top: $pad-medium;
font-size: $x-small;
font-weight: $regular;
display: block;
}
}
}
}
}