WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
141599
Web Inspector: CSS Report: Unused / dead code
https://bugs.webkit.org/show_bug.cgi?id=141599
Summary
Web Inspector: CSS Report: Unused / dead code
Joseph Pecoraro
Reported
Saturday, February 14, 2015 5:53:51 AM UTC
* 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/
>
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
Saturday, February 14, 2015 5:54:04 AM UTC
<
rdar://problem/19837134
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug