tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
485 stars 38 forks source link

Enable completion of css from the same svelte component #70

Closed AleksandrSl closed 5 years ago

AleksandrSl commented 5 years ago

Related to #60.

I will try to dug deeper to enable support for css from separate .css files. As far as I understand, <style> in svelte component is local to component, so there is no need to add completion from neighbour svelte components.

AleksandrSl commented 5 years ago

Comments about completion from other .css files:

Solution is copied form vue plugin where it works the same way. Content from all .css files takes part in completion, no matter whether .css file is added to the final page or not

tomblachut commented 5 years ago

Thx!

About styles from other components, according to https://svelte.dev/docs#style there's :global(...) modifier, but I'd argue that anyone using it to create new global classes instead of contextual overrides is breaking maintainable code principles. We want to help with day-to-day work and not support every possible edge case because that would take to much time, so it's fine to ignore :global()