2

I'm developing lwc in VSCODE, and today my editor suddenly shows a bunch of SLDS problems just like thisproblems

enter image description here

it is annoying and I do not want to fix it by update the token to a new version or make a custom component... I just want to ignoring the infos by SLDS validation.

ps: adding filters in PROBLEMS do not meet my need, the underline of infos and warnings are still in the editor: enter image description here

3
  • Please note that the old styles were planned for deprecation this release (Summer '21). This change has been postponed, but you should not rely on these styles being usable for much longer. This is like having the Check Engine light on in your car. You're not in immediate trouble, but if you don't fix it soon, you'll definitely be in trouble.
    – sfdcfox
    Commented Jun 7, 2021 at 7:04
  • @sfdcfox thank you for the information, this change is huge... is there a way to auto fix every token or I have to fix them one-by-one, which will take me pretty much time.
    – Lanjinest
    Commented Jun 7, 2021 at 7:15
  • We were given a year to make the changes. Presumably salesforce.com knows not everyone made it yet, so we've been given a bit of a grace period. Realistically, all you probably need to do is search your html files for -- and selectively replace them with _ instead. Make sure you review your changes and have a backup, but this is actually a fairly "small" change in most cases.
    – sfdcfox
    Commented Jun 7, 2021 at 7:20

3 Answers 3

7

There is a extension installed in VS Code along with Salesforce Extension Pack - SLDS Validator. You should disable it if you don't want any warnings and error highlights related to SLDS in your code markup.

enter image description here

1
  • 2
    Note that this was supposed to be deprecated this release, but was postponed. These are problems that shouldn't be ignored for much longer...
    – sfdcfox
    Commented Jun 7, 2021 at 7:06
1

enter image description here

If you click on the SLDS Validator Extension setting there is a setting for Mobile Validation disable it.

0

I found the deprecation warning useful at least for padding (no longer use -var-) but as I use lightning-datatable it became very annoying to get a warning for each one that it won't work in mobile. Fine! It is for desktop UI.. As of now (March 2023) I discovered you can right click on the error in the Problems section and tell it to ignore mobile SLDS validation warnings for this line or this file, which is quite useful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .