[Webkit-unassigned] [Bug 141599] New: Web Inspector: CSS Report: Unused / dead code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 13 21:53:51 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=141599

            Bug ID: 141599
           Summary: Web Inspector: CSS Report: Unused / dead code
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: benjamin at webkit.org, graouts at webkit.org,
                    joepeck at webkit.org, jonowells at apple.com,
                    mattbaker at apple.com, nvasilyev at apple.com,
                    timothy at apple.com, webkit-bug-importer at group.apple.com

* SUMMARY
CSS Report: Unused / dead code.

When we do Reports, a useful CSS report feature to have would be warning about unused rules, or dead code within stylesheets.

Examples:
- warn about unused rules (could be dead code, or could just not be affecting this page)
- warn about explicitly dead code, overruled within the styles:
  "b{color:red} b{color:blue}" => the first rule is dead code and can be eliminated
  ".a.b{...} .b.a{...}" => more complex, but these two selectors match, possible dead code

Doing a quick web search, there are tools that do similar things:
- css-eliminator <https://www.npmjs.com/package/css-eliminator>
- uncss - <http://davidwalsh.name/uncss>
- unused-css - <https://unused-css.com> (I think this actually checks on multiple pages to essentially get code-coverage of a stylesheet across many pages)
- cssess - <http://razorfast.com/2010/11/21/announcing-cssess-the-bookmarklet-that-finds-unused-css-selectors/>
- helium-css - <https://github.com/geuis/helium-css>
- deadweight - <https://github.com/aanand/deadweight>
- CSS Scanner - <http://sourceforge.net/projects/cssscanner/>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150214/8494e912/attachment-0002.html>


More information about the webkit-unassigned mailing list