Output last baselines from all built-in layout algorithms - #1110
Open
nicoburns wants to merge 2 commits into
Open
Output last baselines from all built-in layout algorithms#1110nicoburns wants to merge 2 commits into
nicoburns wants to merge 2 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786752152-last-baseline-output
branch
4 times, most recently
from
August 19, 2026 11:42
f0ad0d8 to
e8eed57
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786752152-last-baseline-output
branch
from
August 21, 2026 11:22
e8eed57 to
088cecd
Compare
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.
Objective
Compute and output the last baseline of a container (
LayoutOutput::baselines.last) from all built-in layout algorithms (flexbox, grid and block), building on theBaselines { first, last }representation introduced in #1107. Last-baseline alignment (align-items: last baseline) is not part of this PR and will follow separately.Context
Last baselines ride along with the existing layout passes — no additional layout computation is performed. Selection rules (per css-align §9.1 "baseline export" / css-flexbox §8.5):
align_and_position_itemnow returns the child'sBaselines(clamped for scroll containers), stored onGridItemaslast_baseline.align-contentoffsets the in-flow group.Since no built-in leaf produces baselines and nothing consumes
baselines.lastyet, this is only observable via custom trees / measure functions, so coverage is a new hand-written test suite (tests/hand_written/last_baseline.rs) with a minimal custom tree whose leaves report fixed first/last baselines, asserting the rootLayoutOutput.baselinesfor flex row/column/wrap/wrap-reverse, grid multi-row, and block containers.cargo fmt/clippy/cargo test --workspaceall pass.Feedback wanted
item.baseline, only set for baseline-aligned items) with a border-box fallback, whereas the new last baseline uses the child's actual reported last baseline. This asymmetry preserves existing first-baseline behaviour; happy to align the first-baseline path with the "actual baseline" approach in a follow-up if desired.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/c0a80d9344d54e918b37cacfb71a2128
Requested by: @nicoburns