Closed Bug 1441882 Opened 7 years ago Closed 7 years ago

Update browser_parsable_css.js to check that variables that are defined are actually referenced

Categories

(Firefox :: Theme, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: jaws, Assigned: jaws)

References

Details

Attachments

(1 file)

Bug 1440877 found a case where we were defining a variable (--toolbar-gbimage) but never referenced it. Whether it is a result of a typo or unnecessary CSS, we can alert developers when they are adding effectively dead code to the tree.
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Comment on attachment 8954791 [details] Bug 1441882 - Update browser_parsable_css.js to check that variables that are defined are actually referenced. https://reviewboard.mozilla.org/r/223906/#review229986 Thanks!
Attachment #8954791 - Flags: review?(gijskruitbosch+bugs) → review+
Comment on attachment 8954791 [details] Bug 1441882 - Update browser_parsable_css.js to check that variables that are defined are actually referenced. https://reviewboard.mozilla.org/r/223906/#review230092 ::: browser/base/content/test/static/browser_parsable_css.js:137 (Diff revision 6) > + {propName: "--in-content-category-background", > + isFromDevTools: false}, --in-content-category-background is actually not used. https://searchfox.org/mozilla-central/search?q=--in-content-category-background&case=true&regexp=false&path= ::: browser/base/content/test/static/browser_parsable_css.js:139 (Diff revision 6) > + {propName: "--separator-border-image", > + isFromDevTools: true}, This is not counted because the usage of border-image seems wrong. normally, it should be `border-image: var(--separator-border-image) 1 1;` Atm, it's used as `border-image: var(--separator-border-image);` where var(--separator-border-image) is a gradient, which is incorrect. ::: browser/base/content/test/static/browser_parsable_css.js:141 (Diff revision 6) > + {propName: "--bezier-diagonal-color", > + isFromDevTools: true}, > + {propName: "--bezier-grid-color", > + isFromDevTools: true}, These seem used within a gradient, not sure your code handles that atm.
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e05f1b82846 Update browser_parsable_css.js to check that variables that are defined are actually referenced. r=Gijs
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/e9b33e8d7623 Update browser_parsable_css.js to check that variables that are defined are actually referenced: Remove --breakpoint-hover-background because it has been already fixed. r=bustage-fix CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: