How do I enable auto prefix in visual studio code?

Viewed 1002

I've been trying to make my website more responsive but I'm having trouble enabling auto prefixer in visual studio code. I installed the extension but it doesn't seem to work. Any help would be appreciated.

2 Answers

You shoud go to visual studio extensions.

1 - Install Autoprefixer. Autoprefixer extension

2 - Ctrl + Shift + P > Type "Preferences: Open Settings(JSON)". enter image description here

3 - Add this code snippet : "autoprefixer.options": { "browsers": [ "last 4 versions", "ie >= 9", "> 5%" ] } enter image description here

4- Restart Visual Studio Code.



5 - Select the css code you want to prefix.

6 - Ctrl + Shift + P > Type "Autoprefixer: Run". enter image description here


That's it.

Related