Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@ export default function NavbarSearch({
children,
className,
}: Props): JSX.Element {
return <div className={clsx(className, styles.searchBox)}>{children}</div>;
return (
<div className={clsx(className, styles.navbarSearchContainer)}>
{children}
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,23 @@
* LICENSE file in the root directory of this source tree.
*/

/*
Workaround to avoid rendering empty search container
See https://github.com/facebook/docusaurus/pull/9385
*/
.navbarSearchContainer:not(:has(> *)) {
display: none;
}

@media (max-width: 996px) {
.searchBox {
.navbarSearchContainer {
position: absolute;
right: var(--ifm-navbar-padding-horizontal);
}
}

@media (min-width: 997px) {
.searchBox {
.navbarSearchContainer {
padding: var(--ifm-navbar-item-padding-vertical)
var(--ifm-navbar-item-padding-horizontal);
}
Expand Down