Last Updated: August 26, 2019
· webjac

CSS comment toggle trick

So I recently found a comment toggle trick by Alexander Brevig (https://coderwall.com/p/zbc2zw) but I noticed that it won't work on CSS.

So I figured one for CSS code:

Just do:

/* */
your.css { code:here; }
/* */

This code is active at this point. And to toggle the comment ON or OFF just remove the last / character of the first line. Like this:

 /* *
your.css { code:here; }
/* */

This way the code is commented.