When writing css codes, its boring task to add vendor prefixes for different browsers. There are various free online tools which you can use to automatically generate css codes with all vendor prefixes. But the most easiest way would be a feature provides by your code editor. In this tutorial, we will learn how to automatically add css vendor prefixes automatically using visual studio codes.
Before we start VS code trick, let me first mention two online tools which are very good for generating css codes with vendor prefixes.
Auto Prefix CSS codes using VS Code
VScode has few great plugins for this. But I personally love Autoprefixer plugin.
Open your visual studio code editor, and install Autoprefixe plugin.
Open settings of Autoprefixe plugin.
Under Autoprefixer: Options click Edit in settings.json.
Add following codes in section autoprefixer.options.
"last 4 versions",
"ie >= 9",
You may need to restart or reload VS code after saving.
Open any CSS file, press F1 button and run Autoprefixer. Your CSS codes should now have all vendor prefixes.