Skip to content

Commit a7cce51

Browse files
committed
feat(sidebar-tabs): Redesign active tab as rounded filled pill
The active sidebar tab now renders as a rounded surface backed by a neutral hover-tone fill, with a wide rounded indicator that grows into place when selected. The icon slot now receives the active state so consumers can render filled/outlined icon variants. Backport of #8447 to stable8. Signed-off-by: nfebe <fenn25.fn@gmail.com>
1 parent 1010fb5 commit a7cce51

1 file changed

Lines changed: 34 additions & 11 deletions

File tree

src/components/NcAppSidebar/NcAppSidebarTabs.vue

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -266,35 +266,58 @@ export default {
266266
&__nav {
267267
display: flex;
268268
justify-content: stretch;
269+
gap: var(--default-grid-baseline);
269270
margin: 10px 8px 0 8px;
270-
border-bottom: 1px solid var(--color-border);
271271
272272
// Override checkbox-radio-switch styles so that it looks like tabs
273273
& :deep(.checkbox-radio-switch--button-variant) {
274+
position: relative;
274275
border: unset !important;
275-
border-radius: 0 !important;
276+
border-radius: var(--border-radius-element) !important;
277+
background-color: transparent;
278+
transition: background-color var(--animation-quick);
276279
.checkbox-content {
277280
padding: var(--default-grid-baseline);
278-
border-radius: var(--default-grid-baseline) var(--default-grid-baseline) 0 0 !important;
281+
padding-bottom: calc(var(--default-grid-baseline) * 2);
282+
border-radius: var(--border-radius-element) !important;
279283
margin: 0 !important;
280-
border-bottom: var(--default-grid-baseline) solid transparent !important;
281284
.checkbox-content__icon > * {
282285
color: var(--color-main-text) !important;
283286
}
284287
}
285-
&.checkbox-radio-switch--checked .checkbox-radio-switch__content{
286-
background: transparent !important;
287-
color: var(--color-main-text) !important;
288-
border-bottom: var(--default-grid-baseline) solid var(--color-primary-element) !important;
288+
&::after {
289+
content: '';
290+
position: absolute;
291+
bottom: 2px;
292+
left: 50%;
293+
width: 0;
294+
height: 4px;
295+
border-radius: 999px;
296+
background-color: var(--color-primary-element);
297+
transform: translateX(-50%);
298+
transition: width var(--animation-quick);
299+
}
300+
&:hover {
301+
background-color: var(--color-background-hover);
302+
}
303+
&.checkbox-radio-switch--checked {
304+
background-color: var(--color-background-hover) !important;
305+
&:hover {
306+
background-color: var(--color-background-dark) !important;
307+
}
308+
.checkbox-radio-switch__content {
309+
background: transparent !important;
310+
color: var(--color-main-text) !important;
311+
}
312+
&::after {
313+
width: 80%;
314+
}
289315
}
290316
}
291317
}
292318
293319
&__tab {
294320
flex: 1 1;
295-
&.active {
296-
color: var(--color-primary-element);
297-
}
298321
299322
&-caption {
300323
flex: 0 1 100%;

0 commit comments

Comments
 (0)