Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Oct 8, 2023
1 parent ed36538 commit 2b9031e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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.navbarSearch)}>{children}</div>;
return (
<div className={clsx(className, styles.navbarSearchContainer)}>
{children}
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@

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

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

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

0 comments on commit 2b9031e

Please sign in to comment.