Drop whitespace between flex items regardless of what flanks it - #52
Open
brainkim wants to merge 1 commit into
Open
Drop whitespace between flex items regardless of what flanks it#52brainkim wants to merge 1 commit into
brainkim wants to merge 1 commit into
Conversation
Whitespace-only text between flex items was kept as an anonymous item when an inline element flanked it, so it consumed gap and justify-content space. Every element child of a flex container is a flex item of its own, inline display or not, so any element ends a text run; only display: none children are skipped, because they generate no box. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C8sSHf9EvBZroVnsXJbJSD
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.
Whitespace-only text between flex items was kept as an anonymous item when an inline element flanked it, so it consumed
gapandjustify-contentspace. Browsers render nothing for collapsible white space between flex items (css-flexbox-1 §4) no matter what the neighboring items display as.The fix: every element child of a flex container is a flex item of its own, inline display or not, so any element ends a whitespace text run. Only
display: nonechildren are skipped, because they generate no box. Preserved white space (white-space: pre/pre-wrapon the container) still stays an item.Tests cover inline-flanked, block-flanked, and mixed runs.
🤖 Generated with Claude Code
https://claude.ai/code/session_01C8sSHf9EvBZroVnsXJbJSD