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

Enable completion of css from the same svelte component #70

Merged
merged 2 commits into from
Nov 3, 2019

Conversation

AleksandrSl
Copy link
Contributor

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.

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
@AleksandrSl
Copy link
Contributor Author

AleksandrSl commented Oct 25, 2019

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
Copy link
Owner

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()

@tomblachut tomblachut merged commit 9c6db91 into tomblachut:master Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants