Add Position::Static (new default) and Position::Fixed - #1140
Open
nicoburns wants to merge 3 commits 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 21, 2026
staging-devin-ai-integration
Bot
force-pushed
the
devin/1787345886-position-static-fixed
branch
4 times, most recently
from
August 25, 2026 17:09
ee5f7bd to
6caef10
Compare
staging-devin-ai-integration
Bot
force-pushed
the
devin/1787345886-position-static-fixed
branch
from
August 26, 2026 12:56
6caef10 to
d105605
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
First step towards browser-correct out-of-flow (absolute/fixed) hoisting: make the
Positionenum reflect the full CSSpositionmodel.PositiongainsStaticandFixedvariants, plusis_out_of_flow()/is_positioned()helpersPosition::StaticreplacesPosition::Relativeas the default (matching CSS).Staticis normal flow but ignoresinsetand (once hoisting lands) will not act as a containing block for absolute descendantsFixedis treated as out-of-flow everywhereAbsolutewas; it currently behaves identically toAbsolute(positioned relative to its parent). True containing-block hoisting (nearest positioned ancestor forabsolute, root forfixed) lands in a follow-up PRparsefeature) accepts all four keywords:static | relative | absolute | fixedContext
Part of the OOF-hoisting plan discussed with @nicoburns: candidate bubbling through
LayoutOutput, a shared CB-side positioning pass, CB-relativeLayout.location, and rounding-via-CB recursion follow in the next PR. This PR only introduces the style-level model so the layout changes can build on it.Mechanical changes:
position == Absolutetoposition.is_out_of_flow(), and relative-inset application gated onposition == Relative(soStaticignores insets)relativetostatic; test fixtures that relied on the old default for inset behavior now declareposition: relativeexplicitly, and generated tests were regeneratedStatic→ legacyRelativeandFixed→ legacyAbsolutefor the taffy 0.3 / yoga comparisons (yoga'sPositionType::Staticis used directly)cargo test --workspace,cargo fmt,cargo clippyall pass.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/65c5463061c8403bade7888271d5eeb4
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/65c5463061c8403bade7888271d5eeb4?variant=devin-insiders