usus icon indicating copy to clipboard operation
usus copied to clipboard

Pseudo classes missing from extracted CSS?

Open davidhund opened this issue 7 years ago • 2 comments

I noticed extractStyles and inlineStyles does not produce any pseudo classes. E.g. a:hover was left out.

I realize this is all not usus specific (but CSS Coverage) but I was wondering why. Also: for critical styles I would expect these to be included.

davidhund avatar Jul 13 '17 11:07 davidhund

I realize this is all not usus specific (but CSS Coverage) but I was wondering why. Also: for critical styles I would expect these to be included.

This is definitely doable.

The reason it is not included is because browser never needed to use them. To make it include these styles, I would need to instruct Chrome to trigger "hover" for all elements in the DOM as part of the page loading.

This would be a separate option.

gajus avatar Jul 13 '17 12:07 gajus

I'm not sure if it's 'critical' but it could surely cause some a11y issues on slow loading pages.

PS: I can understand now why they're not included since they're all user-initiated state changes. Thanks!

davidhund avatar Jul 13 '17 13:07 davidhund