-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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 Report][3.4.6] Disabling utility classes breaks some components blueprints and styling #18846
Comments
I don't think we can disable utility classes without side effect #12597 (reply in thread) |
@kingyue737 thanks for linking the discussion! I realize it might not be easy/feasible to do but it would be nice if all components came bundled with required stylings based on the blueprint being used. As is mentioned in the linked thread TailwindCSS (or similar libraries like UnoCSS and PandaCSS) have become somewhat of a standard in terms of usage. They also come with VSCode extensions that provide a better developer experience. It seems like component libraries are embracing this like https://tailwind.primevue.org/ and which give developers the ability to mix and match without consequences. Still love Vuetify more than other component libraries but at times it feels like utility classes are limited slightly different subset of more comprehensive existing styling solutions. |
I have the same feeling. Using CSS utility classes is the worst DX I've experienced in Vuetify. No intellisense. I need to check the document each time I want to add a class. Not util at all. |
I think I've got most of them memorized by now with the exception of needing to check I feel like most Vuetify specific things are prefixed with a "v" so doing the same with utility classes might actually avoid conflicts while also being more explicit:
|
@mcfarljw, I would suggest the opposite, i.e. the names of the available utility classes should follow Tailwind, just like e.g. UnoCSS does. Perhaps they could be a reasonable subset of what one can find there. I think that it could make sense for those who might want to use them. That said, from my perspective utility classes go against the idea of CSS and are just a short form of writing inline As a side note, I would like to point out that the blueprints are faulty in some ways anyway and that they require some more love, e.g. in MD3 the button text should not use |
up I'm also concerned by this issue, by disabling utilities classes, few components are not working as expected (i.e. As suggested @kingyue737, bunding/compiling those classes component level could avoid this issue but have an impact on potential payload overhead. Why not supporting unocss engine as a replacement of SASS utilities ? |
What a dream that would be! |
I do believe the documentation can be improved for working with SASS. But I don't think we're going to see much improvement with this stuff without vuetify reworking itself to have unstyled components to play with. |
Environment
Vuetify Version: 3.4.6
Vue Version: 3.3.11
Browsers: Chrome 120.0.0.0
OS: Mac OS 10.15.7
Steps to reproduce
npm i
npm run dev
Expected Behavior
Disabling utility classes doesn't break the default Vuetify components.
VBtn
should be rounded with a cursor on hoverVTab
should use the correct colors with a cursor when hovering and be roundedVNavigationDrawer
should not have a borderActual Behavior
Disabling utility classes cases several components to not be styled correctly.
VBtn
is not rounded without a cursor on hoverVTab
is not the correct color when hovering and is not roundedVNavigationDrawer
has a border despite it being set to 0Reproduction Link
https://github.com/mcfarljw/vuetify-disabled-class-utilities
Other comments
In general I've been having a lot of trouble following the documentation for SASS Variables (https://vuetifyjs.com/en/features/sass-variables). I'm trying to disable the utility classes so that I can use TailwindCSS, UnoCSS, or PandaCSS without conflicts but in this example I'm just trying to disable the utility classes without breaking the default styling based on the selected blueprint.
Utility classes disabled:
Utility classes enabled:
The text was updated successfully, but these errors were encountered: