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

[css][html] SVG language support #66053

Open
octref opened this issue Jan 4, 2019 · 11 comments
Open

[css][html] SVG language support #66053

octref opened this issue Jan 4, 2019 · 11 comments
Assignees
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality html HTML support issues
Milestone

Comments

@octref
Copy link
Contributor

octref commented Jan 4, 2019

Currently, we have no SVG support:

  • In HTML, SVG tags don't receive auto completion
  • In CSS, SVG attributes don't receive auto completion
  • Syntax highlighting are problematic for both SVG tags/attributes in HTML/CSS
  • Emmet do not get SVG completions

However, with custom tag/property support in HTML/CSS, we should be able to trivially write a SVG package that describes the set of tags/attributes for SVG, and let HTML/CSS language services do the support work.

@octref octref added feature-request Request for new features or functionality html HTML support issues labels Jan 4, 2019
@octref octref added this to the Backlog milestone Jan 4, 2019
@chpxu
Copy link

chpxu commented Jan 5, 2019

Since SVG is an XML variant, would support for XML be included? Or would that have to be a request under Atom's XML package?

@octref
Copy link
Contributor Author

octref commented Jan 7, 2019

This issue only concerns SVG. VS Code has some support for XML, and there are extensions for XML too: https://marketplace.visualstudio.com/search?term=xml&target=VSCode&category=All%20categories&sortBy=Relevance

@aeschli aeschli changed the title SVG language support [css][html] SVG language support Jan 8, 2019
@octref octref added the css-less-scss Issues and items concerning CSS,Less,SCSS styling label Jan 8, 2019
@hinell
Copy link

hinell commented Jul 13, 2019

Would be nice to have standard emmet abbreviation completion.

@felixfbecker
Copy link
Contributor

<style> tags inside SVG files also have no CSS syntax highlighting or autocompletion, but do in HTML files.

@tjx666
Copy link
Contributor

tjx666 commented Sep 23, 2020

any progress? It would be great to support emmet syntax in svg. By using following setting, I can get emmet suggestion, but can't get svg specific tag suggestion

"emmet.includeLanguages": {
        "svg": "html"
 },

screenshot_2020-09-20_00-53-39
screenshot_2020-09-20_00-54-01

@ghost
Copy link

ghost commented May 29, 2021

I am not sure how much of this is implemented in jock's brilliant SVG extension, but at a cursory glance I noticed a huge number of the features you've all requested. We need to start comparing and figure out what features are missing.

@ghost
Copy link

ghost commented Jul 7, 2021

Related: #124901 (SVG previewing)

@hinell
Copy link

hinell commented Jul 8, 2021

@4086606 I think we all could collaborate and create better separate extension for that. Thanks anyway.

@ghost
Copy link

ghost commented Jul 8, 2021

The SCM textual diff view for SVGs is nigh useless unless you're minifying a SVG.

E.g. material-extensions/vscode-material-icon-theme@cda3339

The text view is meaningless here while the rich diff preview is much much more useful

@starball5
Copy link

Note: Related on Stack Overflow: How can I get IntelliSense for SVG in HTML, CSS, and JS in VS Code?

@MasterInQuestion
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality html HTML support issues
Projects
None yet
Development

No branches or pull requests

9 participants