Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase search bar size on sites with few header links #2766

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Styling tweaks
  • Loading branch information
zenoachtig committed Jan 23, 2025
commit 71141d7f26b5a2c0d0017eb2dcce5be46ef6a8fc
7 changes: 2 additions & 5 deletions packages/gitbook/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ export function Header(props: {
'dark:bg-dark',
withTopHeader ? null : 'lg:hidden',
'text-sm',
'bg-opacity-9',
'bg-opacity-8',
'dark:bg-opacity-9',
'backdrop-blur-lg',
'contrast-more:bg-opacity-11',
@@ -124,13 +124,10 @@ export function Header(props: {
'max-w-lg',
'lg:ml-[max(calc((100%-18rem-48rem-4rem)/2),1rem)]',
'xl:ml-[max(calc((100%-18rem-48rem-14rem-4rem)/2),1rem)]',
'mr-auto',
'lg:mr-auto',
'page-no-toc:lg:ml-[max(calc((100%-18rem-48rem-18rem-4rem)/2),1rem)]',
'order-last',
'lg:order-[unset]',

// isMultiVariants &&
// 'page-no-toc:order-last page-no-toc:ml-0 page-no-toc:grow-0',
]
: ['order-last'],
)}
10 changes: 5 additions & 5 deletions packages/gitbook/src/components/Header/headerLinks.module.css
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
}
}
}
@container headerlinks ( width < 250px ) {
@container headerlinks ( width < 300px ) {
.containerHeaderlinks > :nth-child(n + 2) {
display: none;
}
@@ -32,7 +32,7 @@
}
}
}
@container headerlinks ( width < 350px ) {
@container headerlinks ( width < 400px ) {
.containerHeaderlinks > :nth-child(n + 3) {
display: none;
}
@@ -43,7 +43,7 @@
}
}
}
@container headerlinks ( width < 450px ) {
@container headerlinks ( width < 500px ) {
.containerHeaderlinks > :nth-child(n + 4) {
display: none;
}
@@ -54,7 +54,7 @@
}
}
}
@container headerlinks ( width < 550px ) {
@container headerlinks ( width < 600px ) {
.containerHeaderlinks > :nth-child(n + 5) {
display: none;
}
@@ -65,7 +65,7 @@
}
}
}
@container headerlinks ( width < 650px ) {
@container headerlinks ( width < 700px ) {
.containerHeaderlinks > :nth-child(n + 6) {
display: none;
}
4 changes: 2 additions & 2 deletions packages/gitbook/src/components/Search/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ export function SearchButton(props: { children?: React.ReactNode; style?: ClassV
'transition-all',
'hover:shadow-md',
'hover:scale-102',
'hover:ring-dark/2',
'hover:ring-dark/4',
'hover:text-dark/10',
'focus:shadow-md',
'focus:scale-102',
@@ -93,7 +93,7 @@ export function SearchButton(props: { children?: React.ReactNode; style?: ClassV
'dark:contrast-more:focus:ring-light',

'active:shadow-sm',
'active:scale-98',
'active:scale-100',

'md:justify-start',
'md:w-full',