Scan Your Code with SLDS Validator

With a single file or an entire project open in VS Code, SLDS Validator recommendations are highlighted in your CSS file.

  1. Open your CSS file or project that contains CSS files in VS Code.

    An example CSS file open in VS Code with a highlight on line 4 -–sds-g-sizing-border, 1px.

  2. Hover over the SLDS Validator recommendation.

    An example SLDS Validator recommendation.

  3. Review the recommendation info available in the window. The recommendation contains:

  • A description of the issue. In this example, a styling hook is deprecated.

  • A View Problem link with more info

  • A Quick Fix link

    An example Quick Fix.

  1. Hover over Quick Fix to see and select a replacement value.

As you write code in VS Code, use SLDS Validator to autocomplete code. Just type --slds,.slds, or slds- to receive a full list of available options.

An example SLDS Validator autocomplete recommendation.