You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking to optimize the site's performance and that of the homepage specifically, the Lighthouse tool in Chromium browsers has made some suggestions. Some of these will have repercussions throughout the app so we're going to make them their own tickets.
Recommendation: Remove unused CSS
Remove dead rules from stylesheets and defer the loading of CSS not used for above-the-fold content to reduce unnecessary bytes consumed by network activity. details
Overview
For the homepage in particular, we're including the elections-hash.css; Is this necessary?
Would like to prune the css so we're only including what is actually being used.
Benefit (the 80 of 80/20)
Little? Likely less than its effort
Effort (the 20 of 80/20)
Minimal to extensive
We could simply remove unused script tags and leave everything else alone
and/or
We could re-structure scss/css files and/or build so each page loads exactly the CSS it needs.
Complications
With all the sass inheritance, we could quickly get tangled up in untangling variables, mixins, etc.
While untangling, we could wind up making our lives harder by duplicating code
With templates being shared and inherited, we should look out for removing css from one page when it's being used by another page that's using the same template—could require additional templates.
Will need to account for additional modules and feature-flagged features: we should make sure to include necessary css for flag-activated features but not necessarily include it when the feature isn't 'on'.
Background
Looking to optimize the site's performance and that of the homepage specifically, the Lighthouse tool in Chromium browsers has made some suggestions. Some of these will have repercussions throughout the app so we're going to make them their own tickets.
Recommendation: Remove unused CSS
Remove dead rules from stylesheets and defer the loading of CSS not used for above-the-fold content to reduce unnecessary bytes consumed by network activity. details
Overview
For the homepage in particular, we're including the elections-hash.css; Is this necessary?
Would like to prune the css so we're only including what is actually being used.
Benefit (the 80 of 80/20)
Little? Likely less than its effort
Effort (the 20 of 80/20)
Minimal to extensive
We could simply remove unused script tags and leave everything else alone
and/or
We could re-structure scss/css files and/or build so each page loads exactly the CSS it needs.
Complications
Related tickets
The text was updated successfully, but these errors were encountered: