Code Monkey home page Code Monkey logo

vscode-cssvar's Introduction

CSSVar (A VSCode Extension)

CssVar Icon CssVar Icon

This extension helps to autocomplete globally shared CSS Variables.

Only those variables that are present in files, provided in Extension files config, will be considered as global.

Supported Configs:

This Extension supports the following properties as of now:

  • cssvar.files: Array of Strings: string[]
    • Support glob patterns
  • cssvar.extensions: Array of String: string[]
  • cssvar.themes: Array of String: string[]
    • Eg: cssvar.themes: ["dark"]. This will help the extension distinguish between similarly named variables.
  • cssvar.excludeThemedVariables: boolean
  • cssvar.disableSort: boolean
    • Disables VSCode's default sorting functionality for this extension.

cssvar.files should contain relative/absolute path from your workspace root folder.

Following are defaults, which you can override in your User settings.json or Workspace settings.json.

  • cssvar.files: ["index.css"]
  • cssvar.extensions: ["css", "scss", "sass", "less"]
  • cssvar.themes: []
  • cssvar.excludeThemedVariables: false
  • cssvar.disableSort: false

Screeshots:

How to Install

How to install

Working Example

Working Example

Theming Support:

Theming

Exclude Themed Variables

Supported Features:

  • Show Auto Completion dialogue on trigger chars: --
  • Show Color Values and Colors in Autocomplete popup.
  • Minimal support for CSS Modules, using postcss.
    • This is to make sure, the extension doesn't breaks on CSS Module Files.
  • Themed CSS Variable support.

Issues:

  • SASS/LESS variables, or any specific CSS extension language feature.
    • For eg. setting CSS variable to a SASS Variable will work, but will not be considered as a CSS color.
    • Workaround
      • Create a separate CSS compatible SASS/LESS (variables) file.
      • Remove SASS One line Comments. Use proper CSS block comments.

vscode-cssvar's People

Contributors

phoenisx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.