fix(grid): justify-self baseline aligns columns via orthogonal synth - #1
Draft
julia-script wants to merge 4 commits into
Draft
fix(grid): justify-self baseline aligns columns via orthogonal synth#1julia-script wants to merge 4 commits into
julia-script wants to merge 4 commits into
Conversation
`justify-items`/`justify-self: baseline` was treated as start. In a multi-item column sharing group Chrome positions from Blink's Major-group delta (`trackBaseline - synthesizedBaseline`), reading baselines in an orthogonal writing mode (vertical-lr in LTR, vertical-rl in RTL). Horizontal items always synthesize there: flipped-lines (LTR) yields 0, otherwise the item's width, plus the block-start margin in that mode. RTL widths 30+20 now share x=70 instead of sitting at start-per-item (70/80); LTR margin-left differences shift the whole group. Clears 7 fuzz-batch findings. css-align-3 §6.1, css-grid-1 §11; Blink ComputeBaselineOffset @ branch-heads/7922. Co-authored-by: Julia Ortiz <julia-script@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pins the RTL width-sharing case (30+20 → both at x=70) and the LTR margin-left group shift. Fails without the orthogonal-synth offset. Co-authored-by: Julia Ortiz <julia-script@users.noreply.github.com>
cursor
Bot
force-pushed
the
jo/grid-justify-items-self-200a
branch
from
August 1, 2026 18:14
b88b125 to
f27ca39
Compare
When the flex container's main size is unknown but available space is a definite length (non-stretched grid item, abspos, root under a viewport), the shrink-to-fit path summed flex bases. A shrinkable empty `flex-basis: 55px` item then sized the container to 55 where Chrome gives 0 — revealed by `justify-items: start|end|center` on a grid (stretch hid it by forcing the used size to the track). Mirror the content-contribution clamps: explicit basis replaces the style main size, floors only when non-shrinkable, caps when non-growable, and honours style max-*. Empty shrinkable row bases collapse to the automatic minimum; `width: 55` and `flex-basis: 10; width: 55` stay at 55 and 10; `width: 200; max-width: 1` contributes 1. Columns keep flooring by an explicit basis (same asymmetry as the §9.9.3 loop). Co-authored-by: Julia Ortiz <julia-script@users.noreply.github.com>
Pins justify-items:start cases: empty shrinkable basis → 0, flex-shrink:0 keeps the basis, style width contributes, explicit basis caps width, and max-width clamps the preferred size. Co-authored-by: Julia Ortiz <julia-script@users.noreply.github.com>
cursor
Bot
force-pushed
the
jo/grid-justify-items-self-200a
branch
from
August 1, 2026 18:15
d3c340e to
8133e79
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.
Summary
Two fixes from the fuzz-batch loop, starting at the
justifyItems/justifySelfenrichment cluster.1.
fix(grid): justify-self baseline— orthogonal column synthjustify-items/justify-self: baselinewas treated asstart. In a multi-item column baseline-sharing group, Chrome positions from Blink’s Major-group delta (trackBaseline - synthesizedBaseline), reading baselines in an orthogonal writing mode (vertical-lrin LTR,vertical-rlin RTL).Horizontal-tb items always synthesize there:
vertical-lr, flipped-lines) → synth0vertical-rl) → synth = border-box widthmargin-left/margin-right)RTL widths 30+20 share
x=70(not start-per-item 70/80). Spec: css-align-3 §6.1, css-grid-1 §11. Blink @refs/branch-heads/7922.2.
fix(flex): shrink-to-fit contribution clampsNon-stretch
justify-itemsrevealed that shrink-to-fit (unknown main size + definite available) summed flex bases. A shrinkable emptyflex-basis: 55pxsized the container to 55 where Chrome gives 0. Stretch hid it by forcing the used size to the track.Now uses the same §9.9.3 clamps as intrinsic sizing (including style
max-*; columns keep flooring by an explicit basis).Batch progress (rehydrated open set of 917)
justifyItems/justifySelfTest plan
pnpm test— 5448 passed, no regressionsfuzz_grid_justify_baseline_columnfuzz_flex_shrink_to_fit_basis