Lee182 / vscode-css2stylus

Transform css to stylus inside vscode, save the hassle of external websites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vscode-css2stylus

Transform css to stylus inside vscode, save the hassle of external websites.

The MIT License GitHub Visual Studio Marketplace Visual Studio Marketplace

Features

  • Format selection.
  • Multiple selections support.
  • Keyboard shortcut: Ctrl + Alt + c / ⌘ Command + Alt + c

Installation

Install this extension from the VSCode Marketplace

Usage

  1. Select the css code.
  2. Hit ⌘ Command + ⇧ Shift + p / Ctrl + ⇧ Shift + p
  3. Run Convert CSS to Stylus or Ctrl + Alt + c / ⌘ Command + Alt + c .
  4. 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

About

Transform css to stylus inside vscode, save the hassle of external websites


Languages

Language:JavaScript 98.9%Language:Stylus 1.1%