Skip to content

Commit 78e6e7f

Browse files
authored
Enhance tabset styles for improved layout and visual consistency (#2028)
1 parent c466791 commit 78e6e7f

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

assets/css/tabset.css

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,41 @@
22
--borderWidth: 1px;
33
--tabsetPadding: var(--baseLineHeight);
44
margin: var(--baseLineHeight) 0;
5+
border: var(--borderWidth) solid var(--tabBorder);
6+
padding: 0 var(--tabsetPadding);
7+
border-radius: var(--borderRadius);
58
}
69

710
.tabset-tablist {
811
display: flex;
9-
overflow-x: auto;
12+
overflow: auto;
13+
scrollbar-width: thin;
14+
border-bottom-width: 1px;
15+
border-bottom-style: solid;
16+
border-bottom-color: var(--tabBorderTop);
1017
}
1118

1219
.tabset-tab {
13-
padding: .6rem var(--tabsetPadding);
20+
padding: 1.3rem var(--tabsetPadding);
1421
font-family: var(--sansFontFamily);
1522
background-color: var(--tabBackground);
1623
color: var(--tab);
17-
border: var(--borderWidth) solid var(--tabBorder);
1824
margin-right: calc(-1 * var(--borderWidth));
19-
border-top-width: 4px;
20-
border-top-color: var(--tabBorderTop);
21-
border-radius: 0;
22-
border-top-left-radius: 4px;
23-
border-top-right-radius: 4px;
24-
box-shadow: 0 -3px 4px var(--tabShadow) inset;
25+
border:0;
26+
box-shadow: none;
2527
cursor: pointer;
28+
border-bottom-width: 2px;
29+
border-bottom-style: solid;
30+
border-bottom-color: transparent;
31+
transition: var(--transition-all);
32+
}
33+
34+
:hover.tabset-tab {
35+
border-bottom-color: var(--tabBorderTop);
2636
}
2737

2838
.tabset-tab[aria-selected=true] {
29-
border-bottom-color: var(--tabBackground);
30-
border-top-color: var(--mainLight);
31-
box-shadow: none;
32-
z-index: 1;
39+
border-bottom-color: var(--mainLight);
3340
}
3441

3542
/* Keyboard navigation focus state (increased contrast) */
@@ -40,11 +47,6 @@
4047
}
4148

4249
.tabset-panel {
43-
padding: 0 var(--tabsetPadding);
44-
border: var(--borderWidth) solid var(--tabBorder);
45-
margin-top: calc(-1 * var(--borderWidth));
46-
border-bottom-left-radius: var(--borderRadius);
47-
border-bottom-right-radius: var(--borderRadius);
4850
}
4951

5052
@media screen and (max-width: 768px) {

0 commit comments

Comments
 (0)