vscode-css2stylus
Transform css to stylus inside vscode, save the hassle of external websites.
Features
- Format selection.
- Multiple selections support.
- Keyboard shortcut: Ctrl + Alt + c / ⌘ Command + Alt + c
Installation
Install this extension from the VSCode
Marketplace
Usage
- Select the css code.
- Hit ⌘ Command + ⇧ Shift + p / Ctrl + ⇧ Shift + p
- Run
Convert CSS to Stylus
or Ctrl + Alt + c / ⌘ Command + Alt + c .
- Run
Convert Stylus to Css
or Ctrl + Alt + Shift + c / ⌘ Command + Alt + Shift + c .
Keyboard Shortcut
Use the following to embed a shortcut in keybindings.json. Replace with your preferred key bindings.
{
"key": "ctrl+alt+c",
"command": "extension.css2stylus",
}
You can customize your shortcuts too under: File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on macOS)
Check key bindings docs.
Options
Settings object with defaults.
{
"css2stylus": {
"tabs": false, // !editor.options.insertSpaces
"indent": 2,
"unprefix": false,
"keepColons": false,
"cssSyntax": false,
"separateRules": false,
"removeComments": false,
"createColorVariables": false
}
}
Built With
Contributing
Feel free to submit pull request or suggestions here.
Contributors
- Jonathan Lee - Initial work - Lee182