https://github.com/SimonSiefke/vscode-svg-preview
Svg Preview for VSCode
https://github.com/SimonSiefke/vscode-svg-preview
preview svg svg-preview
Last synced: 3 months ago
JSON representation
Svg Preview for VSCode
- Host: GitHub
- URL: https://github.com/SimonSiefke/vscode-svg-preview
- Owner: SimonSiefke
- License: mit
- Archived: true
- Created: 2019-04-05T13:54:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T07:34:42.000Z (over 3 years ago)
- Last Synced: 2024-08-03T09:13:12.612Z (7 months ago)
- Topics: preview, svg, svg-preview
- Language: TypeScript
- Homepage:
- Size: 24.2 MB
- Stars: 45
- Watchers: 2
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - vscode-svg-preview
README
[](https://travis-ci.com/SimonSiefke/vscode-svg-preview) [](https://marketplace.visualstudio.com/items?itemName=SimonSiefke.svg-preview) [](https://renovatebot.com/)
# Svg Preview for VSCode

## Features
- Live editing of svg files and svg's inside files
- Panning and zooming of the preview (up to 32767%)## Commands
| Command | Keybinding |
| ------------------------------------- | ------------ |
| Svg Preview: Open Preview to the Side | `ctrl+alt+p` |
| Svg Preview: Reload Preview | none |## Settings
| Property | Description | Default |
| --------------------- | ------------------------------------------------------------------------------------- | ------- |
| svgPreview.autoOpen | Automatically open the preview when a svg file is opened | `false` |
| svgPreview.scaleToFit | Whether or not the svg should be scaled to fit the viewport or keep its original size | `true` |
| svgPreview.style | Custom style for the preview | `{}` |## How to use the `svgPreview.style` setting
You can change the background color:

```json
{
"svgPreview.style": {
"html": {
"background": "white"
}
}
}
```Or you can make a checkerboard background:

```json
{
"svgPreview.style": {
"html": {
"background-position": "0 0, 13px 13px",
"background-size": "26px 26px",
"background-image": "linear-gradient(45deg, #141414 25%, transparent 25%, transparent 75%, #141414 75%, #141414), linear-gradient(45deg, #141414 25%, transparent 25%, transparent 75%, #141414 75%, #141414)"
}
}
}
```