core(font-size): comment why source = Other happens #9363
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Provide the steps to reproduce
Or via DevTools.
What is the current behavior?
font-size
will have anUnknown
(10px).What is the expected behavior?
It should not say
Unknown
.how'd I find this?
I was curious when this audit resulted in
Unknown
, so I queried httparchive:result:
That's ~0.05% (very few).
Gettings some URLs to work with:
I picked the first site, saw the unknown
font-size
was 10, and ran this:and looked at some
h3
s set to 10. The CSS that sets thefont-size
to 10 is from a stlesheet, and is even mentioned in other items in thefont-size
table! weird.I set a breakpoint in the
font-size
audit forUnknown
, the stylesheetDeclaration is:Note lack of a
stylesheet
property. This is set in thefont-size
gatherer here:lighthouse/lighthouse-core/gather/gatherers/seo/font-size.js
Line 340 in 7750fe4
Finding the failing nodes for this:
Note a lack of
styleSheetId
/styleSheet
on thecssRule
s. Which I trace back to the limtiting we do:lighthouse/lighthouse-core/gather/gatherers/seo/font-size.js
Line 292 in 7750fe4
So that makes sense. I'll just leave an explanatory comment.