master-css-language-service
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-beta.84 • Public • Published

Master CSS

Master CSS Language Service for Visual Studio Code

On this page

Install to Visual Studio Code now

Features

Code-completion

Smart suggestions for style names, values, semantics and selectors.

code-completion

Syntax highlighting

Highlight class names to make them easier to read and identify.

syntax-highlighting

Master CSS has pioneered applying syntax highlighting to class names in markup, which solves the problem of unreadable classes that are too long.

Generate preview

Hover over Master class names to see their CSS generation.

rendering-preview

Settings

We have given friendly presets based on mainstream frameworks and languages. If you think there are other commonly used ones that should be built in, please send a feature issue to us.

The following examples are default values:

editor.quickSuggestions

"editor.quickSuggestions": {
    "strings": true
},

masterCSS.languages

Configure which languages should apply the Master CSS Language Service.

"masterCSS.languages": [
  "html",
  "php",
  "javascript",
  "typescript",
  "javascriptreact",
  "typescriptreact",
  "vue",
  "svelte",
  "rust"
],

masterCSS.files.exclude

Configure a glob pattern to prevent Master CSS Language Service from being applied.

"masterCSS.files.exclude": [
    "**/.git/**",
    "**/node_modules/**",
    "**/.hg/**"
],

masterCSS.classNameMatches

Configure Regex patterns as conditions for triggering Suggestions and generating previews.

"masterCSS.classNameMatches": [
  "(class(?:Name)?\\s?=\\s?)((?:\"[^\"]+\")|(?:'[^']+')|(?:`[^`]+`))",
  "(class(?:Name)?={)([^}]*)}",
  "(?:(\\$|(?:(?:element|el)\\.[^\\s.`]+)`)([^`]+)`)",
  "(classList.(?:add|remove|replace|replace|toggle)\\()([^)]*)\\)",
  "(template\\s*\\:\\s*)((?:\"[^\"]+\")|(?:'[^']+')|(?:`[^`]+`))"
],

masterCSS.previewColor: true

Render color boxes by color-related class names as previews.

masterCSS.previewOnHover: true

Preview the generated CSS rules when hovering over a class name.

masterCSS.suggestions: true

Enable autocomplete suggestions.

Readme

Keywords

none

Package Sidebar

Install

npm i master-css-language-service

Weekly Downloads

78

Version

2.0.0-beta.84

License

MIT

Unpacked Size

8.71 kB

Total Files

3

Last publish

Collaborators

  • 1aron