Skip to content

Commit 2b9031e

Browse files
committed
polish
1 parent ed36538 commit 2b9031e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

packages/docusaurus-theme-classic/src/theme/Navbar/Search/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ export default function NavbarSearch({
1515
children,
1616
className,
1717
}: Props): JSX.Element {
18-
return <div className={clsx(className, styles.navbarSearch)}>{children}</div>;
18+
return (
19+
<div className={clsx(className, styles.navbarSearchContainer)}>
20+
{children}
21+
</div>
22+
);
1923
}

packages/docusaurus-theme-classic/src/theme/Navbar/Search/styles.module.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77

88
/*
99
Workaround to avoid rendering empty search container
10-
See https://github.com/facebook/docusaurus/pull/7990
10+
See https://github.com/facebook/docusaurus/pull/9385
1111
*/
12-
.navbarSearch:not(:has(> *)) {
12+
.navbarSearchContainer:not(:has(> *)) {
1313
display: none;
1414
}
1515

1616
@media (max-width: 996px) {
17-
.navbarSearch {
17+
.navbarSearchContainer {
1818
position: absolute;
1919
right: var(--ifm-navbar-padding-horizontal);
2020
}
2121
}
2222

2323
@media (min-width: 997px) {
24-
.navbarSearch {
24+
.navbarSearchContainer {
2525
padding: var(--ifm-navbar-item-padding-vertical)
2626
var(--ifm-navbar-item-padding-horizontal);
2727
}

0 commit comments

Comments
 (0)