File tree Expand file tree Collapse file tree 2 files changed +37
-15
lines changed Expand file tree Collapse file tree 2 files changed +37
-15
lines changed Original file line number Diff line number Diff line change 6
6
flex-col
7
7
gap-2;
8
8
9
+ /* Default item list spacing for non-progression groups */
10
+ .itemList {
11
+ @apply flex
12
+ flex-col
13
+ gap-1;
14
+ }
15
+
9
16
& : not (.progression ) {
10
17
.groupName {
11
18
@apply px-2
Original file line number Diff line number Diff line change 7
7
flex
8
8
w-full
9
9
items-center
10
+ gap-1
10
11
overflow-hidden
11
12
rounded-md
12
13
text-sm
13
14
text-neutral-800
14
15
dark:text-neutral-200;
15
16
16
- & : hover {
17
- & : not (.progression ) .label {
18
- /* @see https://github.com/nodejs/nodejs.org/blob/main/packages/ui-components/src/Containers/NavBar/NavItem/index.module.css#L24 */
19
- @apply rounded-sm
20
- bg-neutral-100
21
- text-neutral-900
22
- dark:bg-neutral-900
17
+ & : not (.active ): hover {
18
+ /* Apply hover background to the full item width */
19
+ @apply bg-neutral-100
20
+ dark:bg-neutral-900;
21
+
22
+ /* Ensure text colors contrast with hover background */
23
+ .label {
24
+ @apply text-neutral-900
23
25
dark:text-neutral-100;
24
26
}
25
27
64
66
@apply p-1;
65
67
}
66
68
67
- & : not (. active ) : hover . label {
68
- @apply rounded-sm
69
- bg-neutral-100
69
+ /* On hover, use full-width background on the item (set above) */
70
+ & : not (. active ) : hover {
71
+ @apply bg-neutral-100
70
72
dark:bg-neutral-900;
71
73
}
74
+
75
+ /* Avoid extra pill background on the label when hovering */
76
+ & : not (.active ): hover .label {
77
+ @apply rounded-none
78
+ bg-transparent;
79
+ }
72
80
}
73
81
74
82
& .active {
75
- @apply text-neutral-900
76
- dark:text-white;
83
+ /* Full-width active background and readable text */
84
+ @apply bg-green-600
85
+ text-white;
77
86
78
87
.progressionIcon {
79
88
@apply fill-green-500;
80
89
}
81
90
82
- & : not (.progression ) .label {
83
- @apply rounded-sm
84
- bg-green-600
91
+ /* Remove pill background on the label; keep full-width bg on the item */
92
+ .label {
93
+ @apply rounded-none
94
+ bg-transparent
85
95
text-white;
86
96
}
97
+
98
+ /* Preserve active background on hover */
99
+ & : hover {
100
+ @apply bg-green-600;
101
+ }
87
102
}
88
103
}
You can’t perform that action at this time.
0 commit comments