Reported and marked by Razem to revise and remove other unused CSS/JS

Remove unused JavaScript
Remove unused CSS
Defining a library
Code coverage at Google

Contributed by Razem to feed the Drupal pack for Lighthouse Stack Packs

lighthouse-stack-packs drupal.js

Problem/Motivation

Having a performance coverage issue of 100% not used CSS from the

Print layout style.

print.layout.css
On all media pages, which should only load for media: print

Steps to reproduce

Switch off CSS and JavaScript aggregation and advanced aggregations
Find Unused JavaScript And CSS With The Coverage Tab
Visit the site with an anonymous or basic authenticated
But do not ask to print or review the page for printing
The page should not load the print.layout.css asset file

Proposed resolution

Change to css/layout/print.layout.css: { media: print }

Remaining tasks

  • Fix
  • Performance coverage test
  • Functional test
  • Review
  • Release

User interface changes

  • None

API changes

  • None

Data model changes

  • None

Comments

RajabNatshah created an issue. See original summary.

  • RajabNatshah committed 41b32cf on 9.0.x
    Issue #3210528: Fix Vartheme BS4 performance coverage for print layout...
Rajab Natshah’s picture

Assigned: Unassigned » Mohammed J. Razem
Status: Active » Needs review
Issue tags: +varbase-9.0.0-rc3, +varbase-9.0.0
Rajab Natshah’s picture

Assigned: Mohammed J. Razem » Unassigned
Rajab Natshah’s picture

Rajab Natshah’s picture

Title: Fix Vartheme BS4 performance coverage for print layout CSS loaded for all medias, which should only load for media: print » Fix Vartheme BS4 performance code coverage for print layout CSS loaded for all medias, which should only load for media: print
Issue summary: View changes
Issue tags: +code-coverage, +code coverage
Rajab Natshah’s picture

Issue summary: View changes
Rajab Natshah’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Rajab Natshah’s picture

Issue tags: -varbase-9.0.0-rc3