-
Notifications
You must be signed in to change notification settings - Fork 13.4k
feat(col): modernizing Grid component #30658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This reverts commit 10f3d85.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShaneK I see differences in the offset part, but the original, looks incorrect how it was working... but not 100% sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I agree. I'm not sure why the original was like that, I don't see any reasoning for it in the code. May be missing something, but I think it's fine for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
What is the current behavior?
The existing grid component (
ion-grid
,ion-row
, andion-col
) in Ionic was developed several years ago and has not received significant updates since then. As a result, it does not leverage modern CSS features. For example, the gutter (spacing) between columns is implemented using the border property, which is an outdated technique.What is the new behavior?
--ion-grid-gap
: this new CSS variable, will indicate the gap size in the grid. Defaults to0px
- the current value.ion-col
: has a new way to calculate the width of the column. Additionally a new propertyorder
(and responsive variants) was added, and will control the order of the column.ion-row
: uses the newly introduced custom property--ion-grid-gap
. This property will indicate the gap size in the grid.Does this introduce a breaking change?
The properties
pull
andpush
fromion-col
, have been removed. The functionality achieved with them, is now achieved with the new propertyorder
and the existingsize
. More information and migration examples can be read inBREAKING.md
file.Other information