[Performance] Fix the `unused-css-rules` issue reported by lighthouse-ci
Description
Currently, the lighthouse ci github action fails the assertion results for unused-css-rules as seen here .
Expected Behavior
The assertion test for the above rules should pass in the lighthouse ci run.
Screenshots
Environment:
- Host OS:
- Browser:
Contributor Resources and Handbook
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.
- π See contributing instructions.
- π¨ Wireframes and designs for Layer5 site in Figma.
- ππΎππΌ Questions: Discussion Forum and Community Slack.
Join the Layer5 Community by submitting your community member form.
hey @ayushthe1 ,i can work on this!
Great @nitheesh-daram :+1: .I assigned you the issue.
@ayushthe1 based on my brief over-view it looks like unused css and js are being imported from "GlobalStyle", which as the name states has global CSS rules, some of which are used by the pages but not all, and it is difficult to figure out which is using which. Possible Solutions :
- will have to rework some CSS files.
- can specify which assertions we want licl to run .
P.S.: I may be wrong, feel free to correct me.
I will ping @Nikhil-Ladha for your doubts but I believe you are on right path. And it's not an option to disable any of the assertion test as already pointed out by Lee, however difficult or frustrating the issue may be .π
hey @nitheesh-daram ,can you please contact nikhil or anyone else on slack and ask your doubts regarding this issue there as people are more active there and you will get resolution to your doubts fast. You can also ask in the websites channel on slack.
@Anand-Theertha Would you like to take on this issue
I'm on this. Although, I think it's better to create two issues - one for unused-css-rules and another for unused-js, as there might be a considerable amount of changes.
I'm on this. Although, I think it's better to create two issues - one for unused-css-rules and another for unused-js, as there might be a considerable amount of changes.
You can open a pr for whichever issue you solve .I will correspondingly change the name of this issue to match your pr.
btw which issue are you working on ?
Sounds good. I'm working on resolving the unused css rules first.
Thanks ,i will assign it to you then .
Sorry for the delay. I have removed my assignment as this is more complex than I thought it would be. I am happy to share my learnings and progress incase someone picks this up.
@ayushthe1 I have gone through this issue. But the logs for this github action have expired and are no longer available. Is there any way to view the logs related to this issue?
I'd like to work on this @ayushthe1