-
-
Notifications
You must be signed in to change notification settings - Fork 597
SCSS intellisense stops working for second style block #430
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
Comments
Currently we don't support multi blocks for the same languageID. @octref is it worth adding? |
It's a use case the style guide recommends against, so I'd say no. |
Well is it so much work to add this? Because I use this alot and just because it is against the styleguide doesn't mean a plugin should decide that it's users aren't allowed to do this... |
It's not much work, but you should put global styles inside the top-level
We are already doing it. In the future we might even mark this case as an error and link to the styleguide. |
Sometimes I use a library in a component that requires me to use global styles since scoped styles don't work on dynamically inserted nodes. If I have to make those styles global then I wouldn't put them in App.vue but instead in a .scss file (which is imported in App.vue) but then there are 2 places for that component styles... In the scoped style and .scss file... I don't feel that this makes my code any clearer. To be honest, I would like to use my own code guidelines here and marking my code as an error would force me to use guidelines that I don't fully agree on. I understand that it is work on your part to add this feature and not doing that is totally fine. But if you are going to mark my personal style preferences as error I would really appreciate an option to turn that off. |
We can try to support the completions, and it's the linter's job to complain about user not following the style guide. But because this is not recommended per style guide it'll get less prioritization. |
I'm glad to hear that - thanks. The style guide reference earlier is a 404 now. Maybe it exists elsewhere still but in practice I'd argue two points for addressing this:
|
It's not against the spec: https://vue-loader.vuejs.org/spec.html#style, so I'll try to fix it. |
@octref Any update on this? Right now I'm not able to even have two style blocks because the second block gets overwritten by the first one. (I'm using stylus-supremacy for auto-formatting) |
Please add this feature Vue loader allow us to use two style tag https://vue-loader.vuejs.org/guide/scoped-css.html#mixing-local-and-global-styles Current, when I type css in second style tag, it always show useless snippet. |
Info
Problem
Second
<style lang="scss">
block in a .vue file does not have CSS intellisense.The intellisense popup in the first block works as expected. The second shows the entire list of CSS properties starting with lots of
::moz-...
Tried vetur reinstall.
Reproducible Case
The text was updated successfully, but these errors were encountered: