-
Notifications
You must be signed in to change notification settings - Fork 36
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
When using class props built in classes has higher priority #247
Comments
Or at the very least, default classes should come first, that will also partially solve the problem. |
@stepanorda This has come up multiple times already. If you take a look at the code, default classes already come first. E.g. svelte-multiselect/src/lib/MultiSelect.svelte Line 467 in a24075f
Have a look at #140 for why this is not enough. Not sure if the situation changed in Svelte v4. If not, it might in Svelte v5. If you'd like to investigate that, please do! I see no problem with a prop to remove default classes. Happy to take a PR. |
Also related: #44 |
@janosh How about changing it to something like:
that way if you set it, it will not apply the default class. |
That might result in unexpected behavior. Some might want to keep the default styles and only make slight changes. This will drop all default styles as soon as you make a tweak. |
So one global switch headlessMode that disables all default classes are fine by you? I can make PR for that. |
Please do! Make sure we have test coverage for it and it doesn't affect current behavior if |
When I am styling something with the tailwind, a lot of built-in CSS has higher priority and I am not being able to tweak it properly.
I see 2 solutions:
I can create a PR if you agree that this is a future you want to have.
The text was updated successfully, but these errors were encountered: