-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bug: "Important" setting from tailwind is not followed #2669
Comments
Thank you @unlocomqx
for reporting issues. It helps daisyUI a lot 💚
|
It's how Tailwind's Can I ask about your project and why you need a parent selector for daisyUI classes? Also another way to add a parent selector to all styles would be using a Post CSS plugin for that. There are some Post CSS plugins on NPM to do it. I'm going to close this issue because there's nothing I can do about it on my end, it should either be done by Tailwind CSS (because it's their config) or it can be done by other tools. |
Hi @saadeghi I develop ecommerce plugins so my interfaces are embedded inside other websites, that's why I needed the classes to be encapsulated. I use the parent selector Component classes can be encapsulated easily using the Tailwind API. Tailwind leaves the choice to the plugin authors. addComponents(buttons, {
respectImportant: true
}); If you could make this change on the plugin calls, it would be a huge help for me. Thank you! |
If you fear this could lead to breakage in existing apps, I can add it as an option to the plugin. If you'd like, I can write a PR for it. daisyui({
respectImportant: true
}) |
That sounds great! I didn't know that. Is this option documented on Tailwind website? Before adding this to daisyUI I have to make sure it doesn't break anything because daisyUI itself uses |
Thank you for your reply It's documented for addUtilities in v1 and v2, but not in v3 (although the option still works) Search for respectImportant here |
any progress here? it would be awesome to have this feature implemented! |
What version of daisyUI are you using?
latest
Which browsers are you seeing the problem on?
All browsers
Reproduction URL
https://play.tailwindcss.com/Yw301gqz1B
Describe your issue
The important setting of tailwind is not taken into account when adding components
It's useful for me because I'd like to use daisyUI in an embedded app and not affect the rest of the page.
PS: Tailwind plugin API allows passing an option to apply the important setting when adding components
The text was updated successfully, but these errors were encountered: