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

Make the <style> tag collapsible #523

Closed
UltraCakeBakery opened this issue Sep 5, 2020 · 4 comments
Closed

Make the <style> tag collapsible #523

UltraCakeBakery opened this issue Sep 5, 2020 · 4 comments
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.

Comments

@UltraCakeBakery
Copy link

Is your feature request related to a problem? Please describe.
As you can see in this image the style tag isn't collapsible.

image

With big CSS heavy components it would be nice to be able to close the entire style tag instead of only each css block individually

Describe the solution you'd like
This, but without the need for extra tabs
image

Describe alternatives you've considered
Not care. But I care too much.

@jasonlyu123 jasonlyu123 added the feature request New feature or request label Sep 5, 2020
@jasonlyu123
Copy link
Member

jasonlyu123 commented Sep 6, 2020

I tried to implement it but found this is not a simple task to do. We didn't implement a folding range feature so the folding range seems to be generated by vscode and it seems to base on indentation and matching brackets or tags.

Once the custom folding kicks in the default one would be disabled which means we probably need to implement the folding range in a lot of embed languages, like the pug, sass/scss and typescript/javascript. Or somehow recreate the default folding ranges when we don't know how to fold the embed language. Otherwise, it might be a worse experience for others.

@dummdidumm
Copy link
Member

I feared this might be the case. What's worse is that for the script we could not rely on the TS language service results (if if has such a method) because it would give us folding ranges for the translated JSX which is wrong.

@UltraCakeBakery
Copy link
Author

Not to be that guy, but how do other plugins solve this issue? Vetur for example can do both. Where do they get their folding ranges from?

@dummdidumm
Copy link
Member

Luckily there's a "folding" property which we can use in the language-configuration.json which will do the trick.

@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

3 participants