diff --git a/package.json b/package.json index e18fde4868ff7..917cd53bedc92 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.module.css b/packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.module.css index 27f368152f0e7..ef254be7796fb 100644 --- a/packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.module.css +++ b/packages/ui-components/src/Containers/Sidebar/SidebarGroup/index.module.css @@ -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 diff --git a/packages/ui-components/src/Containers/Sidebar/SidebarItem/index.module.css b/packages/ui-components/src/Containers/Sidebar/SidebarItem/index.module.css index efe0a464d90a7..f11585de67303 100644 --- a/packages/ui-components/src/Containers/Sidebar/SidebarItem/index.module.css +++ b/packages/ui-components/src/Containers/Sidebar/SidebarItem/index.module.css @@ -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; } @@ -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; + } } } diff --git a/turbo.json b/turbo.json index cc50ef4e1c4e8..05d180f75104f 100644 --- a/turbo.json +++ b/turbo.json @@ -5,6 +5,9 @@ "//#prettier": { "outputs": [".prettiercache"] }, + "//#prettier:fix": { + "outputs": [".prettiercache"] + }, "build": { "dependsOn": ["^topo"] },