naive-ui
naive-ui copied to clipboard
Padding class helper as vuetify has
This function solves the problem (这个功能解决的问题)
like pl-2 for padding left, pr-2 for padding right... the same for margins
Expected API (期望的 API)
like pl-2 for padding left, pr-2 for padding right... the same for margins
I'm not sure this should be added. Since if we don't provide many classes, it would be very easy for user to create some needed classes by themselves. However if we provide many classes, tailwind or bootstrap is the best choice.
I'm not sure this should be added. Since if we don't provide many classes, it would be very easy for user to create some needed classes by themselves. However if we provide many classes, tailwind or bootstrap is the best choice.
so, do you recommend bootstrap be used within naive, in this case?
I'm not sure this should be added. Since if we don't provide many classes, it would be very easy for user to create some needed classes by themselves. However if we provide many classes, tailwind or bootstrap is the best choice.
so, do you recommend bootstrap be used within naive, in this case?
Any relevant library is okay. I just don't think it will fit most users' demand if there's no convincing scene.
As a Vuetify user i can attest to the fact that these types of classes are better when linked to the UI library because you can use the same variables used in the components.
For example (forced to prove the point): If i have a n-list with a n-list-item inside and would like to align an element outside the list with the n-list-item, i would have to to inspect the list, see that the left padding is 20px and add a style to the element. It would be much easier if i had a ml-<global padding step> class knowing that the classes have the same padding steps used in the component.
A workaround would be to modify Tailwind to have the same variables as the components but that would be kind of tedious.
I didn't use Naive UI long enough to know if the paddings and margins used in components are equivalent to Tailwind for example. If that is true i think it should be stated in the documentation to reduce confusion.
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem