Open Bug 1546067 Opened 5 years ago Updated 2 years ago

Do not show CSS warnings for styles that do not apply to the current page

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: rcaliman, Unassigned)

References

(Blocks 1 open bug)

Details

This is a follow-up from feedback received on bug 1093953 to restrict the CSS warnings in the console only to the ones applicable to the current page.

Currently, CSS warnings show as a result of running the CSS Parser over stylesheets. If there is a cause for a warning in a stylesheet, it will show in the console for all pages, regardless if that style is used or not.

For stylesheets with many CSS warnings, this adds needless overhead for developers in trying to figure out which warnings are applicable to the current page.

Equally, I think CSS warnings that are emitted inside @supports rules that do not evaluate to true on the current browser should not be emitted.

I guess we could have an array of those harmless CSS Warnings on the server side, and on DOM mutation check if any of those messages' selector match an element, send it to the client (and remove it from the server-side array).

I'm not sure how that would impact performance though (but at least those messages are only emitted when the CSS filter is ON)

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.