Open balabambe opened 3 years ago
Here is my solution below:
In app/templates/entry/server-entry.js
(same as app/templates/entry/client-entry.js
)
In quasar.conf.js
Will get the great result:
If the idea is great please let me PR to dev, thanks alot.
Works like a charm. Thanks for that solution.
Quasar is a great tool. Adding this kind of flexibility helps alot.
Is it considered by the team ?
this feature is needed
It would be good to have an option to skip styles completely or per component.
this feature is needed
THis feature is required
This feature will help a lot when migrating to Quaser from normal use of Vuejs, also will help a lot if we can import specific styles for quasar components so that we can add scoped styles. And we'll be able to migrate easily and even add quasar components without a big problem.
So that depends on what the core team see as core feature of Quasar, is it multi-platform support only or Quasar components holds a big place in those features.
Hope the core team does it.
Damn how this quasar.css is annoying. For example when you use tailwind's flex it also applies quasar's flex that has this wrap rule in it. That's not good
Okay everyone, I hit the same issue this morning but after going through quasar source code - for Quasar with Vite with SASS I managed to modify quasar.config.js
module.exports = configure(function (/* ctx */) {
return {
(...)
build: {
(...)
alias: {
'quasar/dist/quasar.sass': path.resolve(__dirname, './src/css/quasar.sass'),
},
}
}
}
Then I created empty src/css/quasar.sass
file so the build does not fail.
Result: Quasar stylesheets are gone and I can enjoy using tailwind without any issues in my SSR :)
Bro saved my life. Was tryna scope quasar style to just apply to elements inside #q-app for my wordpress project shot my goat!
Is your feature request related to a problem? Please describe. I want a feature to remove quasar.sass in client-entry.js or server-entry.js.
Describe the solution you'd like Set a variable in quasar.conf.js to disable default quasar.sass. ex: framework.removeDefaultCss.
Describe alternatives you've considered Use other frameworks (ex: Nuxt.js). see reasons below.
Additional context I was build a page via SSR to build clean html code, but framework will load default quasar.sass in html, it's very very long long long lines in html builded code, so I try to remove it, but saw the source code (app/templates/entry/server-entry.js) did not controlled by any variables:
so can teams add the variable to switch off the default css for clean html? I was love the framework, and much appreciated to add the feature, thanks alot.
P.S. Sorry for my poor english. :(