-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Make it clear that utils configuration has a impact on variant generation #853
Comments
It is specified on the docs here:
And you can see all the class names considered as utils right there in the link Let me know if you have any questions |
@saadeghi I've read the docs, especially this section and I think that the confusion lies on how the framework is dealing with all the "variants". So, I'm looking at the component pages here and It seems weird that similar class names are categorized in different ways from component to component. If I may ask, what's the reasoning behind this convention? Seems very confusing. |
I might need to make it more clear but here's how it is: Let me know if you have any questions |
Cool, what hasn't clicked for me yet is why PS.: Looking from the outside, It seems that "simple modifier" classes should be used for variants like |
@saadeghi I'm gonna give some examples of what I'm talking about:
We have main components mostly defined as a "component" class. However, radio is listed as a "modifier" while input, which is in the same "category" (forms) is a "component". Variant classes like If I can make a suggestion I'd standardize class names by making all current components consistently be named "component", sizing utilities be called "sizing", color variants like primary, and info be called "variant" and everything else that can change a component's behavior to be a "modifier". Of course, the main question here is not about the naming conventions chosen. Although it helps, I think the main problem is presented by the surprise that similar scoped classes are treated differently by the framework. |
Ping @saadeghi. |
Sorry I missed this issue since it wasn't open. I will check it soon. |
class name categorizations for
Let me know if you have any questions. |
Great work @saadeghi!!! ❤️🖤💙🤍💛🧡💚💜🤎 |
As commented here: #828 (comment), while customizing DaisyUI, I caught an unexpected "issue" where variants like
alert-info
were not being generated. The thing is, for this class to be generated properly, one has to have theutils
config set totrue
. The problem here is that the docs do not make this sufficiently clear IMHO. It doesn't help much that while havingutils
set tofalse
, thebtn-info
variant is generated whilealert-info
is not - which can cause confusion.Now, I'm not sure if the best approach is to document this behavior or if variants like
btn-info
should be bound to the same constraints as other components.The text was updated successfully, but these errors were encountered: