Skip to content

Commit ca134c8

Browse files
authored
Fix an issue where the active site section indicator appeared above any dropdowns. (#2568)
1 parent 7ba67fd commit ca134c8

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.changeset/large-hornets-exist.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'gitbook': minor
3+
---
4+
5+
Fix an issue where the active site section indicator appeared above any dropdowns.

packages/gitbook/src/components/Header/Dropdown.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export function Dropdown<E extends HTMLElement>(props: {
4444
'absolute',
4545
'top-full',
4646
'left-0',
47-
'z-20',
4847
'origin-top-left',
4948
'invisible',
5049
'transition-opacity',

packages/gitbook/src/components/Header/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ export function Header(props: {
7272
)}
7373
>
7474
<HeaderLogo site={site} space={space} customization={customization} />
75-
<span>
75+
<div className="z-20">
7676
{!hasSiteSections && isMultiVariants ? (
7777
<SpacesDropdown space={space} spaces={spaces} />
7878
) : null}
79-
</span>
79+
</div>
8080
<HeaderLinks>
8181
{customization.header.links.map((link, index) => {
8282
return (

packages/gitbook/src/components/Header/HeaderLinkMore.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function HeaderLinkMore(props: {
4343
);
4444

4545
return (
46-
<div className={`${styles.linkEllipsis} items-center`}>
46+
<div className={`${styles.linkEllipsis} items-center z-20`}>
4747
<Dropdown button={renderButton} className="-translate-x-48 md:translate-x-0">
4848
<DropdownMenu>
4949
{links.map((link, index) => (

packages/gitbook/src/components/Header/HeaderLinks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function HeaderLinks({ children }: HeaderLinksProps) {
1313
<div
1414
className={tcls(
1515
styles.containerHeaderlinks,
16-
'flex justify-end items-center gap-x-2.5 mr-2.5 lg:gap-x-5 lg:mr-2.5 *:max-w-56',
16+
'flex justify-end items-center gap-x-2.5 mr-2.5 lg:gap-x-5 lg:mr-2.5 *:max-w-56 z-20',
1717
)}
1818
>
1919
{children}

0 commit comments

Comments
 (0)