An Interest In:
Web News this Week
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
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.
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!
Original Link: https://dev.to/sawabe0912/the-way-to-remove-unused-css-5g05
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To