[6.x] Some CSS rendering performance optimisations - #15156
Merged
jaygeorge merged 6 commits intoAug 11, 2026
Conversation
jaygeorge
deleted the
css-contain-and-content-visibility-performance-optimisations
branch
August 11, 2026 13:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the Problem
Parts of the CP are self-contained UI “islands” (stacks, asset tiles, listing rows, page-tree branches, fieldtype picker cards). Without CSS containment, small updates inside those islands can force the browser to reconsider layout for much larger parts of the page.
This may bet be noticeable in normal use, but we can make small/cheap changes here to optimise things for the browser.
What this PR Does
Uses CSS's
containmentandcontent-visibilityproperties to isolate browser rendering.This is low-risk CSS rendering isolation.
I've intentionally avoided paint/content containment and content-visibility on parts of the CP that are variable-height such as the publish form, where there's a risk of increasing cumulative layout shift (CLS) and clipping.
How to Reproduce
/cp/assetsgrid; select tiles, open menus/cp/nav/default/edit(expand all, scroll, drag) or a structured collection tree/cp/collections/pages(or any index); hover/select rowsExpect little visible change when the CPU is idle. Worth checking for clipped shadows/outlines, jumpy scroll on large trees, and drag-and-drop still feeling correct on the nav/page tree.