Skip to content

Commit

Permalink
Fix variant dropdown styling in header (#2730)
Browse files Browse the repository at this point in the history
  • Loading branch information
zenoachtig authored Jan 14, 2025
1 parent 26e6401 commit 5664e5a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wicked-apricots-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Fix variant dropdown styling in header
21 changes: 20 additions & 1 deletion packages/gitbook/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,26 @@ export function Header(props: {

{isMultiVariants && (
<div className="hidden page-no-toc:flex mr-auto">
<SpacesDropdown space={space} spaces={spaces} />
<SpacesDropdown
space={space}
spaces={spaces}
className={
!isCustomizationDefault
? `bg-header-link/2 text-header-link ring-header-link/4
dark:bg-header-link/2 dark:text-header-link dark:ring-header-link/4
group-hover/dropdown:bg-header-link/3 group-hover/dropdown:text-header-link group-hover/dropdown:ring-header-link/6
dark:group-hover/dropdown:bg-header-link/3 dark:group-hover/dropdown:text-header-link dark:group-hover/dropdown:ring-header-link/6
group-focus-within/dropdown:bg-header-link/3 group-focus-within/dropdown:text-header-link group-focus-within/dropdown:ring-header-link/6
dark:group-focus-within/dropdown:bg-header-link/3 dark:group-focus-within/dropdown:text-header-link dark:group-focus-within/dropdown:ring-header-link/6
contrast-more:bg-header-background contrast-more:text-header-link contrast-more:ring-header-link
contrast-more:group-hover/dropdown:text-header-link contrast-more:group-hover/dropdown:ring-header-link
contrast-more:dark:group-hover/dropdown:text-header-link contrast-more:dark:group-hover/dropdown:ring-header-link
contrast-more:group-focus-within/dropdown:text-header-link contrast-more:group-focus-within/dropdown:ring-header-link
contrast-more:dark:group-focus-within/dropdown:text-header-link contrast-more:dark:group-focus-within/dropdown:ring-header-link`
: ''
}
/>
</div>
)}

Expand Down

0 comments on commit 5664e5a

Please sign in to comment.