fix(mobile): fix sidebar close button and scrollbar (#20)
Show the Sheet close button with sidebar-matching colors instead of hiding it, and hide the native scrollbar on mobile via data-attribute scoped CSS. Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
This commit is contained in:
parent
06fcc5eacb
commit
d9b3e33b6e
@ -195,4 +195,11 @@
|
|||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-mobile="true"] [data-sidebar="content"] {
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
[data-mobile="true"] [data-sidebar="content"]::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@ function Sidebar({
|
|||||||
data-sidebar="sidebar"
|
data-sidebar="sidebar"
|
||||||
data-slot="sidebar"
|
data-slot="sidebar"
|
||||||
data-mobile="true"
|
data-mobile="true"
|
||||||
className="bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden"
|
className="bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:text-sidebar-foreground [&>button]:opacity-80 [&>button]:hover:opacity-100"
|
||||||
style={
|
style={
|
||||||
{
|
{
|
||||||
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user