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

Sidebar colors and tooltip #120

Open
Pbotsaris opened this issue Dec 28, 2024 · 1 comment
Open

Sidebar colors and tooltip #120

Pbotsaris opened this issue Dec 28, 2024 · 1 comment

Comments

@Pbotsaris
Copy link

Pbotsaris commented Dec 28, 2024

Hey guys – thanks for the great work!

I noticed that mix salad.init is not generating the css variables and related tailwind.colors.json config for some classes required by the sidebar component.

{
  ...

   "sidebar": {
      "background": "hsl(var(--sidebar-background))",
      "foreground": "hsl(var(--sidebar-foreground))",
      "primary": "hsl(var(--sidebar-primary))",
      "primary-foreground": "hsl(var(--sidebar-primary-foreground))",
      "accent": "hsl(var(--sidebar-accent))",
      "accent-foreground": "hsl(var(--sidebar-accent-foreground))",
      "border": "hsl(var(--sidebar-border))",
      "ring": "hsl(var(--sidebar-ring))"
   }
}

I may be missing something, but I noticed that the tooltip for sidebar_menu_button does not appear when setting its display to block, as shown here:

<.tooltip class="block">

Additionally, when the sidebar is collapsed, the overflow: hidden and overflow-auto style applied to the parent container seems to prevent the tooltip from being visible in collapsed mode when the tooltip would be the most useful:

"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",

@bluzky
Copy link
Owner

bluzky commented Jan 5, 2025

thanks @Pbotsaris, I'll add the css to the generator.

Regarding to

Additionally, when the sidebar is collapsed, the overflow: hidden and overflow-auto style applied to the parent container seems to prevent the tooltip from being visible in collapsed mode

It's the limitation of pure css approach, I'm working to add JS hook for better accessibility in v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants