SVG support in HTML/CSS files using plain JSON files.
- HTML support: microsoft/vscode#62976
- CSS support: microsoft/vscode#64164
The data are pulled from:
- SVG 2 spec and GitHub
- MDN SVG reference
- mdn/browser-compat-data
- Open this folder in VS Code 1.31+
- Try creating a HTML/CSS file and edit in it. You should get SVG tags and attributes in HTML files, and SVG specific CSS properties in CSS files.
- (VS Code Insiders only): Look into the
contributes
section ofpackage.json
. You can package this project into an extension withvsce
. Alternatively, you can download the pre-packaged versions from releases.
This setting checks the custom data against latest schema:
{
"json.schemas": [
{
"fileMatch": ["/data/svg-html-contribution.json"],
"url": "https://raw.githubusercontent.com/Microsoft/vscode-html-languageservice/master/docs/customData.schema.json"
},
{
"fileMatch": ["/data/svg-css-contribution.json"],
"url": "https://raw.githubusercontent.com/Microsoft/vscode-css-languageservice/master/docs/customData.schema.json"
}
]
}
MIT