Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cloudflare:preview": "turbo cloudflare:preview",
"deploy": "turbo deploy",
"dev": "turbo dev",
"format": "turbo prettier:fix lint:fix",
"format": "turbo //#prettier:fix prettier:fix lint:fix",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"lint:staged": "lint-staged",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
flex-col
gap-2;

/* Default item list spacing for non-progression groups */
.itemList {
@apply flex
flex-col
gap-1;
}

&:not(.progression) {
.groupName {
@apply px-2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
flex
w-full
items-center
gap-1
overflow-hidden
rounded-md
text-sm
text-neutral-800
dark:text-neutral-200;

&:hover {
&:not(.progression) .label {
/* @see https://github.com/nodejs/nodejs.org/blob/main/packages/ui-components/src/Containers/NavBar/NavItem/index.module.css#L24 */
@apply rounded-sm
bg-neutral-100
text-neutral-900
dark:bg-neutral-900
&:not(.active):hover {
/* Apply hover background to the full item width */
@apply bg-neutral-100
dark:bg-neutral-900;

/* Ensure text colors contrast with hover background */
.label {
@apply text-neutral-900
dark:text-neutral-100;
}

Expand Down Expand Up @@ -64,25 +66,38 @@
@apply p-1;
}

&:not(.active):hover .label {
@apply rounded-sm
bg-neutral-100
/* On hover, use full-width background on the item (set above) */
&:not(.active):hover {
@apply bg-neutral-100
dark:bg-neutral-900;
}

/* Avoid extra pill background on the label when hovering */
&:not(.active):hover .label {
@apply rounded-none
bg-transparent;
}
}

&.active {
@apply text-neutral-900
dark:text-white;
/* Full-width active background and readable text */
@apply bg-green-600
text-white;

.progressionIcon {
@apply fill-green-500;
}

&:not(.progression) .label {
@apply rounded-sm
bg-green-600
/* Remove pill background on the label; keep full-width bg on the item */
.label {
@apply rounded-none
bg-transparent
text-white;
}

/* Preserve active background on hover */
&:hover {
@apply bg-green-600;
}
}
}
3 changes: 3 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"//#prettier": {
"outputs": [".prettiercache"]
},
"//#prettier:fix": {
"outputs": [".prettiercache"]
},
"build": {
"dependsOn": ["^topo"]
},
Expand Down
Loading