Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBW: suggest CSS containment #719

Open
ebidel opened this issue Sep 29, 2016 · 3 comments
Open

DBW: suggest CSS containment #719

ebidel opened this issue Sep 29, 2016 · 3 comments
Labels
needs-complete-audit-proposal https://github.com/GoogleChrome/lighthouse/blob/master/docs/new-audits.md new_audit P3

Comments

@ebidel
Copy link
Contributor

ebidel commented Sep 29, 2016

Discoverability:
App is doing excessive painting, layout, and style recalcs and invalidating styles on large regions.

@wardpeet
Copy link
Collaborator

wardpeet commented Oct 4, 2016

YES!

@paulirish paulirish added P3 needs-complete-audit-proposal https://github.com/GoogleChrome/lighthouse/blob/master/docs/new-audits.md and removed needs-priority labels Mar 9, 2018
@Seirdy
Copy link

Seirdy commented Apr 4, 2022

Agreed; this could also include improvements to the "avoid excessive DOM size" audit. That audit should take into account the DOM nodes rendered on load and/or the max DOM nodes rendered at once, not the total DOM nodes on the page.

@Seirdy
Copy link

Seirdy commented Apr 5, 2022

Specifically, LH should suggest using content-visibility: auto rather than content-visibility: hidden. auto is accessible to users who search for text in a page (e.g. when using Ctrl+F) and assistive technologies.

That being said, it should only recommend this for sections at the end of the page to avoid introducing layout shifts. Using containment in the middle of the page would require computing the content's intrinsic size, which can be extremely challenging when sites delegate formatting to the user agent.

Notable exceptions: content like complex SVGs with known dimensions can easily be contained without introducing layout shifts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-complete-audit-proposal https://github.com/GoogleChrome/lighthouse/blob/master/docs/new-audits.md new_audit P3
5 participants