Skip to content

fix: add missing tooltip-neutral color variant#4519

Closed
OfirHaf wants to merge 1 commit into
saadeghi:masterfrom
OfirHaf:fix/tooltip-neutral-variant
Closed

fix: add missing tooltip-neutral color variant#4519
OfirHaf wants to merge 1 commit into
saadeghi:masterfrom
OfirHaf:fix/tooltip-neutral-variant

Conversation

@OfirHaf
Copy link
Copy Markdown

@OfirHaf OfirHaf commented May 10, 2026

Problem

tooltip-neutral was never defined in tooltip.css, making it a silent no-op. Every other semantic color variant exists (tooltip-primary, tooltip-secondary, tooltip-accent, tooltip-info, tooltip-success, tooltip-warning, tooltip-error) but neutral was skipped.

This means:

  • tooltip-neutral has no effect on styling
  • It does not appear in autocomplete (Tailwind Play, IDE plugins)
  • Users expecting consistent API across all color variants are left with a broken class

Fix

Added .tooltip-neutral following the exact same pattern as the other color variants — sets --tt-bg to var(--color-neutral) and applies text-neutral-content to the tooltip content.

The placement in the file follows alphabetical ordering relative to the other variants.

Closes #4492

tooltip-neutral was the only semantic color variant missing from the
tooltip component. All others (primary, secondary, accent, info,
success, warning, error) were defined but neutral was not, making
the class a no-op and absent from autocomplete.

Fixes saadeghi#4492
@saadeghi saadeghi self-assigned this May 10, 2026
@saadeghi
Copy link
Copy Markdown
Owner

Hey, Thanks for the PR.
Tooltip uses neutral color by default. So there would be no visual difference between tooltip and tooltip tooltip-neutral

@OfirHaf
Copy link
Copy Markdown
Author

OfirHaf commented May 11, 2026

Good point — you're right that tooltip already defaults to neutral. The main use case I was thinking of is resetting an inherited color modifier back to the default (e.g. inside a container that applies tooltip-primary to all tooltips), but I agree that's a pretty narrow edge case for a component library to handle explicitly. Happy to close this if you'd rather keep the API surface minimal.

@saadeghi
Copy link
Copy Markdown
Owner

inside a container that applies tooltip-primary

I wouldn't suggest doing that. And I won't guarantee that it will work in future versions 😅
Use modifiers on the same element to modify them it will be easier to work with and easier to read the code.

Thr goal for daisyUI is not to provide every class name for every color. We're trying to be more practical and be close to real life use cases.

Please let me know if you have any questions 🌼

@saadeghi saadeghi closed this May 11, 2026
@OfirHaf
Copy link
Copy Markdown
Author

OfirHaf commented May 12, 2026

Makes total sense, thanks for the clear explanation! Keeping modifiers on the same element is definitely cleaner. Appreciate you taking the time to review it 🌼

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

Successfully merging this pull request may close these issues.

bug: tooltip-neutral is not generated

2 participants