feat(grid, col): resolve breakpoints from config - #31518
Open
brandyscarney wants to merge 4 commits into
Open
brandyscarney wants to merge 4 commits into
brandyscarney wants to merge 4 commits into
Conversation
brandyscarney
added this pull request to stack #31503
October 1, 2026 17:24
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Issue number: internal
What is the current behavior?
The previous PR in this stack added the
screenBreakpointsconfig option and the@utils/breakpointshelpers, but nothing consumes them yet.ion-gridgets its responsive padding and fixed widths purely from@mediaqueries, with the thresholds compiled into the CSS.ion-colonly expresses per-breakpoint values through breakpoint-suffixed properties (size-xsthroughsize-xl, plus theorder-*andoffset-*equivalents). Neither reads the configured breakpoints, and neither can targetxxl.ion-gridalso declared its ownION_GRID_BREAKPOINTS/IonGridBreakpoint(carrying aTODO(FW-7285)) rather than using the shared type.What is the new behavior?
ion-gridresolves the active breakpoint in JavaScript and reflects it on the host as ascreen-breakpointattribute. It subscribes viaonBreakpointChangeinconnectedCallbackand unsubscribes indisconnectedCallback, so it re-renders when the screen crosses a configured threshold.@mediacopy scoped to:host(:not([screen-breakpoint])), and an attribute copy:host([screen-breakpoint="md"]). The attribute copy is what the config drives; the@mediacopy is the baseline before the component hydrates and when JavaScript never runs. This split is necessary because CSS media queries cannot read custom properties, so avar()cannot be used to change a breakpoint.ion-colaccepts an object of breakpoint values forsize,orderandoffset:col.size = { xs: 12, md: 6 }. This is resolved against the configured breakpoints.xxlis added to this object. An empty string ornullat a breakpoint resets that column to the default flex layout.ION_GRID_BREAKPOINTS/IonGridBreakpointare replaced by the sharedScreenBreakpoint.Does this introduce a breaking change?
The
size,order, andoffsetprop types have been widened fromstring | undefinedtoBreakpointMap<string | number | null> | number | string | undefined. The suffixed properties continue to work as before.BREAKING.mdhas been updated under 10.x with migration guidance for these deprecations. Thepush/pullentry has also been moved from the Grid section to Col, where the properties are defined.Other information
Preview