CSS Grid algorithm 2/N: auto-placement#1994
Open
intergalacticspacehighway wants to merge 4 commits into
Open
Conversation
Implements the CSS Grid item placement algorithm for grid-auto-flow: row with sparse packing, per the spec: https://www.w3.org/TR/css-grid-1/#auto-placement-algo - AutoPlacement: the four-step placement algorithm - LinePlacement: grid-line resolution, including invalid-input handling (line 0 is treated as auto; span 0 and negative spans clamp to 1) - OccupancyGrid: overlap tracking for placed items - C++ unit and integration tests Dense packing and column flow (grid-auto-flow: dense / column) are not yet implemented.
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.
Summary
Implements the CSS Grid auto placement algorithm (§8.5).
How?
line 0is treated asauto, andspan 0/ negative spans clamp to1.Not yet implemented
These will be introduced later. Default
grid-auto-flowisrowso it won't be an issue.grid-auto-flow: dense)grid-auto-flow: column)Notes
GridItem.h/GridTrack.h— those belong to CSS Grid algorithm 1/N: data structures #1923.cc - @rozele This a small chunk from #1894 PR.