Skip to content

Commit

Permalink
Fix variant selector for non-default themes (#2649)
Browse files Browse the repository at this point in the history
  • Loading branch information
zenoachtig authored Dec 19, 2024
1 parent ea1468c commit 0b6ddca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/serious-dancers-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Fix variant selector contrast for non-default themes
20 changes: 19 additions & 1 deletion packages/gitbook/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,25 @@ export function Header(props: {
<HeaderLogo site={site} space={space} customization={customization} />
{!hasSiteSections && isMultiVariants ? (
<div className="z-20 shrink hidden sm:block">
<SpacesDropdown space={space} spaces={spaces} />
<SpacesDropdown
className={tcls(
!isCustomizationDefault &&
withTopHeader && [
'bg-header-link/2',
'dark:bg-header-link/2',
'text-header-link/8',
'dark:text-header-link/8',
'ring-1',
'ring-header-link/4',
'dark:ring-header-link/4',
'contrast-more:bg-header-background',
'contrast-more:text-header-link',
'contrast-more:ring-header-link',
],
)}
space={space}
spaces={spaces}
/>
</div>
) : null}
</div>
Expand Down

0 comments on commit 0b6ddca

Please sign in to comment.