This content originally appeared on DEV Community and was authored by Rion Sawabe
Hi✋ I learned how to remove unused CSS in order to polish up the performance score on Lighthouse. That's why I will share this method.
As you can see, if I delete unused CSS, it will improve the web performance.
Let's start to identify the unused CSS in the first place💪 You can click the three dots on the right top position after you open inspect. Then, select More tools and Coverage.
You can click open the CSS file that you want to check, and click the black dot.
Finally, you can see the status of CSS usage.
✅The CSS highlighted in green means that this CSS code is used on the page that you are viewing.
🚫The other one highlighted in red is unused on this page.
You should check the usage of CSS code on other pages as well before deleting it⚠️
Thank you for reading!
This content originally appeared on DEV Community and was authored by Rion Sawabe

Rion Sawabe | Sciencx (2022-04-02T23:18:53+00:00) The one way to remove unused CSS. Retrieved from https://www.scien.cx/2022/04/02/the-one-way-to-remove-unused-css/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.