Add opt-in line-box strut support - #10
Open
nicoburns wants to merge 1 commit into
Open
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:
|
This was referenced Aug 12, 2026
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786407000-stack-2
branch
from
August 18, 2026 21:53
e06ca44 to
98db0dd
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786407000-stack-1
branch
from
August 18, 2026 21:53
663b822 to
3016486
Compare
staging-devin-ai-integration Bot
pushed a commit
to DioxusLabs/blitz
that referenced
this pull request
Aug 18, 2026
…tive-leading fixes - Inline-block uses its last in-flow line box baseline, but inline flex/grid containers use their first baseline per css-align. - Bump parley to DioxusLabs/parley#10 which fixes clamping of negative half-leading in line extents and adds opt-in CSS2 \u00a7 10.8 line-box strut support; enable the strut in Blitz's inline layout. - With an explicit baseline, an inline box's line-height contribution may legitimately be negative, so only clamp reserved space for bottom-aligned boxes, and position baseline-aligned boxes from the top of their margin box.
staging-devin-ai-integration Bot
pushed a commit
to DioxusLabs/blitz
that referenced
this pull request
Aug 19, 2026
…tive-leading fixes - Inline-block uses its last in-flow line box baseline, but inline flex/grid containers use their first baseline per css-align. - Bump parley to DioxusLabs/parley#10 which fixes clamping of negative half-leading in line extents and adds opt-in CSS2 \u00a7 10.8 line-box strut support; enable the strut in Blitz's inline layout. - With an explicit baseline, an inline box's line-height contribution may legitimately be negative, so only clamp reserved space for bottom-aligned boxes, and position baseline-aligned boxes from the top of their margin box.
staging-devin-ai-integration Bot
pushed a commit
to DioxusLabs/blitz
that referenced
this pull request
Aug 19, 2026
…tive-leading fixes - Inline-block uses its last in-flow line box baseline, but inline flex/grid containers use their first baseline per css-align. - Bump parley to DioxusLabs/parley#10 which fixes clamping of negative half-leading in line extents and adds opt-in CSS2 \u00a7 10.8 line-box strut support; enable the strut in Blitz's inline layout. - With an explicit baseline, an inline box's line-height contribution may legitimately be negative, so only clamp reserved space for bottom-aligned boxes, and position baseline-aligned boxes from the top of their margin box.
staging-devin-ai-integration Bot
pushed a commit
to DioxusLabs/blitz
that referenced
this pull request
Aug 21, 2026
…tive-leading fixes - Inline-block uses its last in-flow line box baseline, but inline flex/grid containers use their first baseline per css-align. - Bump parley to DioxusLabs/parley#10 which fixes clamping of negative half-leading in line extents and adds opt-in CSS2 \u00a7 10.8 line-box strut support; enable the strut in Blitz's inline layout. - With an explicit baseline, an inline box's line-height contribution may legitimately be negative, so only clamp reserved space for bottom-aligned boxes, and position baseline-aligned boxes from the top of their margin box.
Builders gain set_compute_strut(true), which computes CSS 2 \u00a7 10.8 strut metrics from the root style's first available font and line-height, and merges them into every line that has in-flow content.
staging-devin-ai-integration
Bot
force-pushed
the
devin/1786407000-stack-2
branch
from
September 1, 2026 20:08
98db0dd to
fa087de
Compare
staging-devin-ai-integration
Bot
changed the base branch from
devin/1786407000-stack-1
to
main
September 1, 2026 20:11
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.
LLM Contributions: This PR (code and description) was authored by Devin, directed and reviewed by @nicoburns.
Middle PR of the stack (#9 → #10 → #7).
Adds the CSS 2 § 10.8 "strut": without it, a line whose only content is an inline box (e.g. an
<img>) got no baseline metrics from the block's font/line-height and rendered too short (Group C1 in DioxusLabs/blitz#627).set_compute_strut(true);build_into_layoutthen computesStrutMetrics { ascent, descent, line_height }from the resolved root style and stores them asLayoutData::strut.first-available-font-003/004.finish_linemerges the strut'stext_extentsinto every line thathave_metrics(has in-flow content); genuinely empty, whitespace-only, or out-of-flow-only lines intentionally get no strut, matching CSS's zero-height treatment of line boxes without inline-level content.FontMetrics::from_font/FontMetrics::font_covers_charlive inparley_enginebecauseskrifais optional inparleyitself;LayoutContextkeeps the resolvedroot_styleso the strut can be computed at build time.Changelog
Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/6ab608fbe6fb46479d6dab03fedceb25