Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 2, 2022 11:18 pm GMT

The way to remove unused CSS

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.
Image description

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.

Image description

You can click open the CSS file that you want to check, and click the black dot.

Image description

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

Image description

Thank you for reading!


Original Link: https://dev.to/sawabe0912/the-way-to-remove-unused-css-5g05

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To