- Before clicking on button:
- After clicking on button:
Apart from above solution, We can use CSS preprocessors like SASS. Even if you use SASS you have to pre-process your stylesheets which means that you have to compile it.
To know more about SASS, click here.