mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-17 07:50:59 +00:00
style(web): keep market tag filter on a single horizontal-scroll row
With many category tags the quick-filter row used `sm:flex-wrap` on desktop, so once tags overflowed the available width they wrapped onto a second, center-aligned line — leaving an orphan tag floating under the row (looked broken and only gets worse as more tags are added). Make the row a single, never-wrapping line that scrolls horizontally at every breakpoint, left-aligned, with the scrollbar hidden and a subtle right-edge fade to signal there's more to scroll. Adds a reusable `.scrollbar-hide` utility to global.css.
This commit is contained in:
@@ -74,6 +74,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar while keeping scroll behaviour (horizontal tag/filter rows). */
|
||||||
|
.scrollbar-hide {
|
||||||
|
-ms-overflow-style: none; /* IE / Edge */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
}
|
||||||
|
.scrollbar-hide::-webkit-scrollbar {
|
||||||
|
display: none; /* Chrome / Safari / WebKit */
|
||||||
|
}
|
||||||
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
|
|||||||
@@ -787,8 +787,9 @@ function MarketPageContent({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 用真实标签做快速筛选 */}
|
{/* 用真实标签做快速筛选 —— 始终单行横向滚动,避免标签变多时换行错位 */}
|
||||||
<div className="mx-auto flex w-full max-w-4xl items-center gap-2 overflow-x-auto pb-1 sm:flex-wrap sm:justify-center sm:overflow-visible">
|
<div className="relative mx-auto w-full max-w-4xl">
|
||||||
|
<div className="scrollbar-hide flex items-center gap-2 overflow-x-auto pb-1 pr-6">
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
variant={selectedTags.length === 0 ? 'secondary' : 'ghost'}
|
variant={selectedTags.length === 0 ? 'secondary' : 'ghost'}
|
||||||
@@ -820,6 +821,9 @@ function MarketPageContent({
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
{/* 右侧渐隐,提示还有更多标签可横向滚动查看 */}
|
||||||
|
<div className="pointer-events-none absolute right-0 top-0 bottom-1 w-8 bg-gradient-to-l from-background to-transparent" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Scrollable extension list section */}
|
{/* Scrollable extension list section */}
|
||||||
|
|||||||
Reference in New Issue
Block a user