Repository navigation
fix(theme): clip vertical overflow on code block wrapper to prevent paint leak (#5475) - #5537
Closed
akhilrichie23-sys wants to merge 1 commit into
Closed
akhilrichie23-sys wants to merge 1 commit into
akhilrichie23-sys wants to merge 1 commit into
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Adds
overflow-y: clipto.vp-doc div[class*='language-']and.vp-blockalongsideoverflow-x: auto.Under the CSS Overflow specification, setting
overflow-x: autoalone causesoverflow-yto compute toautorather thanvisible. In WebKit/Safari, this turns the rounded outer code block wrapper into an active vertical scroll container, causing paint invalidation and compositing layer boundaries to leak the container's background and horizontal scrollbar over subsequent paragraphs on initial render. Addingoverflow-y: clipexplicitly forbids vertical scrollport creation and strictly bounds the vertical paint edge.Linked Issues
Fixes #5475
Additional Context
preelement.overflow-y: hidden,overflow-y: clipprevents vertical scroll container creation altogether without creating a secondary scrollport.