Skip to content

CSS/LessCSS/SASS/SCSS#

Server#

For more information about the LSP server, check css.

Installation#

This Server supports automatic install. Install this language server with M-xlsp-install-serverRETcss-lsRET.

npm install -g vscode-langservers-extracted

Debugger: Not available#

Available configurations#

lsp-css-completion-trigger-property-value-completion#

Type: boolean

Default: t

By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior.


lsp-css-experimental-custom-data#

Type: (repeat string)

Default: nil

A list of JSON file paths that define custom CSS data that loads custom properties, at directives, pseudo classes / elements.


lsp-css-lint-arguments-in-color-function#

Type: (choice (const ignore) (const warning) (const error))

Default: error

Invalid number of parameters.


lsp-css-lint-box-model#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore


lsp-css-lint-compatible-vendor-prefixes#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

When using a vendor-specific prefix make sure to also include all other vendor-specific properties.


lsp-css-lint-duplicate-properties#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

Do not use duplicate style definitions.


lsp-css-lint-empty-rules#

Type: (choice (const ignore) (const warning) (const error))

Default: warning

Do not use empty rulesets.


lsp-css-lint-float#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore


lsp-css-lint-font-face-properties#

Type: (choice (const ignore) (const warning) (const error))

Default: warning


lsp-css-lint-hex-color-length#

Type: (choice (const ignore) (const warning) (const error))

Default: error

Hex colors must consist of three or six hex numbers.


lsp-css-lint-id-selector#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

Selectors should not contain IDs because these rules are too tightly coupled with the HTML.


lsp-css-lint-ie-hack#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

IE hacks are only necessary when supporting IE7 and older.


lsp-css-lint-import-statement#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

Import statements do not load in parallel.


lsp-css-lint-important#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore


lsp-css-lint-property-ignored-due-to-display#

Type: (choice (const ignore) (const warning) (const error))

Default: warning


lsp-css-lint-universal-selector#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore


lsp-css-lint-unknown-at-rules#

Type: (choice (const ignore) (const warning) (const error))

Default: warning

Unknown at-rule.


lsp-css-lint-unknown-properties#

Type: (choice (const ignore) (const warning) (const error))

Default: warning

Unknown property.


lsp-css-lint-unknown-vendor-specific-properties#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

Unknown vendor specific property.


lsp-css-lint-valid-properties#

Type: (repeat string)

Default: nil

A list of properties that are not validated against the unknownProperties rule.


lsp-css-lint-vendor-prefix#

Type: (choice (const ignore) (const warning) (const error))

Default: warning

When using a vendor-specific prefix, also include the standard property.


lsp-css-lint-zero-units#

Type: (choice (const ignore) (const warning) (const error))

Default: ignore

No unit for zero needed.


lsp-css-trace-server#

Type: (choice (const off) (const messages) (const verbose))

Default: off

Traces the communication between VS Code and the CSS language server.


lsp-css-validate#

Type: boolean

Default: t

Enables or disables all validations.



Last update: April 27, 2024