Skip to content
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

Add option to wrap vuetify components in CSS Cascade Layer #285

Closed
nmarshall23 opened this issue Jan 5, 2023 · 4 comments
Closed

Add option to wrap vuetify components in CSS Cascade Layer #285

nmarshall23 opened this issue Jan 5, 2023 · 4 comments
Assignees

Comments

@nmarshall23
Copy link

While we are waiting for vuetify to implement CSS Cascade Layers. See 15596

It would be trivia to add this when using the styles config File option.

Just need to replace:

`@use "${configFile}"\n@use "${target}"`

With:

`@use 'sass:meta';\n @use "${configFile};\n @layer framework {\n @include meta.load-css("${target}");\n }\n`

I didn't find any down sides to loading using meta.load-css.

The end user needs to set their Cascade Layers in main.scss like this:

@layer framework, component, util;

thoughts?

@KaelWD KaelWD self-assigned this Jan 9, 2023
@leonceaklin
Copy link

Just found this issue by googling "vuetify styles inside cascade layer". This would solve all the problems we have with overriding Vuetify's !important rules!

@ananthachetan
Copy link

@nmarshall23 Would you please tell where should we

While we are waiting for vuetify to implement CSS Cascade Layers. See 15596

It would be trivia to add this when using the styles config File option.

Just need to replace:

`@use "${configFile}"\n@use "${target}"`

With:

`@use 'sass:meta';\n @use "${configFile};\n @layer framework {\n @include meta.load-css("${target}");\n }\n`

I didn't find any down sides to loading using meta.load-css.

The end user needs to set their Cascade Layers in main.scss like this:

@layer framework, component, util;

thoughts?

Would you please explain where and how do we need to make this change? I did not completely understand this.

@nmarshall23
Copy link
Author

For the vite plugin change
stylesPlugin.ts

It would end up looking like

@use 'sass:meta';
@use "${configFile};
@layer framework {
   @include meta.load-css("${target}");
}

@KaelWD
Copy link
Member

KaelWD commented Dec 8, 2023

We're moving the entire thing over to layers anyway in a couple of months, not worth having a half-assed version here.

@KaelWD KaelWD closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants