Better search input alignment for mobile

This commit is contained in:
Kalle 2026-01-17 11:30:05 +02:00
parent d536fe2f45
commit aa7cc146bc
4 changed files with 29 additions and 7 deletions

View File

@ -9,7 +9,6 @@
color: var(--color-text-high);
font-size: var(--fonts-xs);
cursor: pointer;
min-width: 180px;
height: var(--input-height-small);
transition: background-color 0.15s;
}
@ -228,7 +227,7 @@
font-size: var(--fonts-sm);
}
@media screen and (max-width: 599px) {
@media screen and (max-width: 1000px) {
.searchKbd {
display: none;
}

View File

@ -108,7 +108,7 @@
}
}
@media screen and (max-width: 900px) {
@media screen and (max-width: 1000px) {
.container {
display: none;
}

View File

@ -4,6 +4,23 @@
margin-left: auto;
}
.searchAndAddContainer {
display: grid;
grid-template-columns: 2fr 1fr;
gap: var(--s-3);
}
.searchWrapper > button,
.addNewWrapper > button {
width: 100%;
}
@media screen and (max-width: 1000px) {
.searchAndAddContainer {
grid-template-columns: 1fr 1fr;
}
}
.button {
display: grid;
place-items: center;

View File

@ -33,10 +33,16 @@ export function TopRightButtons({
</LinkButton>
) : null}
{isLoggedIn ? (
<>
{showSearch ? <CommandPalette /> : null}
<AnythingAdder />
</>
<div className={styles.searchAndAddContainer}>
{showSearch ? (
<div className={styles.searchWrapper}>
<CommandPalette />
</div>
) : null}
<div className={styles.addNewWrapper}>
<AnythingAdder />
</div>
</div>
) : (
<LogInButtonContainer>
<SendouButton type="submit" size="small" icon={<LogIn />}>