fix: add page-break-inside: avoid for Safari column compatibility in masonry (#1348)#1358
Open
Pcmhacker-piro wants to merge 2 commits into
Open
fix: add page-break-inside: avoid for Safari column compatibility in masonry (#1348)#1358Pcmhacker-piro wants to merge 2 commits into
Pcmhacker-piro wants to merge 2 commits into
Conversation
Safari misplaces items (especially the third item) in CSS column layouts when items have varying heights. Adding page-break-inside: avoid alongside break-inside: avoid provides a well-known WebKit workaround that improves column item placement in Safari without affecting Chrome/Firefox. Closes SAPTARSHI-coder#1348
Author
|
heyy @SAPTARSHI-coder |
Contributor
📊 CSS Bundle Size BenchmarkThis PR changes the size of
|
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.
Closes #1348
Pull Request Description
Safari's CSS column algorithm misplaces items (especially the third item) when items have varying heights inside
ease-masonry-*. Addingpage-break-inside: avoidalongsidebreak-inside: avoidis a well-known WebKit workaround that fixes column item ordering in Safari without affecting Chrome/Firefox.Type of Change
Submission Checklist
submissions/examples/your-feature-name/demo.html— self-contained, opens in browser with no serverstyle.css— raw CSS for the proposed featureREADME.md— what it does, how to use it, why it fits EaseMotion CSScore/components/— onlycomponents/masonry.cssFeature Description
What does this add?
Adds
page-break-inside: avoidto all.ease-masonry > *,.ease-masonry-2 > *,.ease-masonry-3 > *, and.ease-masonry-4 > *child item rules.How does a developer use it?
No usage change — the masonry component now works correctly in Safari with items of varying heights.