Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b348896
Changes to support new version of columns
rugoncalves Aug 25, 2025
dab2be3
Supporting new properties and removing old ones
rugoncalves Aug 27, 2025
72a271b
Adding default gap
rugoncalves Aug 27, 2025
95431df
Moving the CSS variable to the host
rugoncalves Aug 28, 2025
3842d64
Updating breaking changes list
rugoncalves Aug 28, 2025
e1a0648
Code adjustments
rugoncalves Aug 28, 2025
39a9b1e
Small fixes
rugoncalves Aug 28, 2025
53fa8dd
Re-adding the properties push and pull
rugoncalves Sep 3, 2025
83522f8
Deprecating properties
rugoncalves Sep 3, 2025
11166d3
Warning when push or pull properties are used
rugoncalves Sep 3, 2025
b59627f
Removing default value of columns
rugoncalves Sep 3, 2025
30a0ce6
Fix lint problems
rugoncalves Sep 3, 2025
bcc1268
Fixing more lint problems
rugoncalves Sep 3, 2025
13c35b0
Merge branch 'next' into ROU-11882
rugoncalves Sep 3, 2025
06af570
Fixing the css classes
rugoncalves Sep 4, 2025
dc4856f
style: lint
brandyscarney Sep 4, 2025
dd32ece
Update text of breaking change
rugoncalves Sep 5, 2025
7b7c524
Setting good defaults
rugoncalves Sep 5, 2025
25865ee
Changing class names to avoid clash
rugoncalves Sep 5, 2025
306eea9
Removing unwanted css
rugoncalves Sep 5, 2025
e411078
Updating tests to not use pull and push
rugoncalves Sep 5, 2025
f8a83e9
Adding new page with deprecated tests for pull & push
rugoncalves Sep 5, 2025
35903c0
chore(): add updated snapshots
Ionitron Sep 5, 2025
00f8abd
Running lint
rugoncalves Sep 5, 2025
d47c1bd
Updating migration path
rugoncalves Sep 5, 2025
3649dec
Adding max-width to the columns
rugoncalves Sep 9, 2025
98f2630
Fixing lint
rugoncalves Sep 9, 2025
2200674
Revert "chore(): add updated snapshots"
rugoncalves Sep 9, 2025
1b707c0
chore(): add updated snapshots
Ionitron Sep 9, 2025
1a5f74b
Merge branch 'next' into ROU-11882
rugoncalves Sep 9, 2025
09fcdc7
Updating text to reflect the test
rugoncalves Sep 10, 2025
d407ed2
Update BREAKING.md
rugoncalves Sep 10, 2025
1a9e6af
Update BREAKING.md
rugoncalves Sep 10, 2025
bd81597
Update BREAKING.md
rugoncalves Sep 10, 2025
47ba9bb
Code review feedback
rugoncalves Sep 10, 2025
d213920
Merge branch 'ROU-11882' of https://github.com/ionic-team/ionic-frame…
rugoncalves Sep 10, 2025
cba75d6
Revert "chore(): add updated snapshots"
rugoncalves Sep 12, 2025
c7f5633
chore(): add updated snapshots
Ionitron Sep 12, 2025
fdfb0f3
Adding a comment to clarify the variable value [skip-ci]
rugoncalves Sep 12, 2025
98e977c
Merge branch 'ROU-11882' of https://github.com/ionic-team/ionic-frame…
rugoncalves Sep 12, 2025
8909df2
Improving comment and running lint
rugoncalves Sep 12, 2025
122a7d7
Removing variable initialization
rugoncalves Sep 15, 2025
8334750
Adding overflow auto to columns
rugoncalves Sep 15, 2025
706efb3
Updating api.txt
rugoncalves Sep 15, 2025
10f3d85
chore(): add updated snapshots
Ionitron Sep 15, 2025
1bdebf1
Changing font-size in test pages
rugoncalves Sep 15, 2025
4c2b555
Revert "chore(): add updated snapshots"
rugoncalves Sep 15, 2025
d881cf5
chore(): add updated snapshots
Ionitron Sep 15, 2025
17e5a37
Changing the font-size for a given sample
rugoncalves Sep 15, 2025
9cd243a
chore(): add updated snapshots
Ionitron Sep 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver
- [Button](#version-9x-button)
- [Card](#version-9x-card)
- [Chip](#version-9x-chip)
- [Grid](#version-9x-grid)

<h2 id="version-9x-components">Components</h2>

Expand All @@ -32,3 +33,51 @@ This is a comprehensive list of the breaking changes introduced in the major ver
<h4 id="version-9x-chip">Chip</h4>

- The `border-radius` of the `ios` and `md` chip now defaults to `10px` and `8px`, respectively, instead of `16px` in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"round"`, or override the `--border-radius` CSS variable to specify a different value.

<h4 id="version-9x-grid">Grid</h4>
- The properties `pull` and `push`, have been removed. The similar look can be achieved with the newly added property `order`.

<h5>Example 1: Swap two columns</h5>

**Version up to 8.x**
```html
<ion-grid>
<ion-row>
<ion-col push="4">1</ion-col>
<ion-col pull="4">2</ion-col>
<ion-col>3</ion-col>
</ion-row>
</ion-grid>
```
**Version 9.x+**
```html
<ion-grid>
<ion-row>
<ion-col order="2">1</ion-col>
<ion-col order="1">2</ion-col>
<ion-col order="3">3</ion-col>
</ion-row>
</ion-grid>
```

<h5>Example 2: Reorder columns with specific sizes</h5>
To reorder two columns where column 1 has `size="9" push="3"` and column 2 has `size="3" pull="9"`:

**Version up to 8.x**
```html
<ion-grid>
<ion-row>
<ion-col push="3">1</ion-col>
<ion-col pull="9">2</ion-col>
</ion-row>
</ion-grid>
```
**Version 9.x+**
```html
<ion-grid>
<ion-row>
<ion-col order="2">1</ion-col>
<ion-col size="3" order="1">2</ion-col>
</ion-row>
</ion-grid>
```
18 changes: 6 additions & 12 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,18 +622,12 @@ ion-col,prop,offsetMd,string | undefined,undefined,false,false
ion-col,prop,offsetSm,string | undefined,undefined,false,false
ion-col,prop,offsetXl,string | undefined,undefined,false,false
ion-col,prop,offsetXs,string | undefined,undefined,false,false
ion-col,prop,pull,string | undefined,undefined,false,false
ion-col,prop,pullLg,string | undefined,undefined,false,false
ion-col,prop,pullMd,string | undefined,undefined,false,false
ion-col,prop,pullSm,string | undefined,undefined,false,false
ion-col,prop,pullXl,string | undefined,undefined,false,false
ion-col,prop,pullXs,string | undefined,undefined,false,false
ion-col,prop,push,string | undefined,undefined,false,false
ion-col,prop,pushLg,string | undefined,undefined,false,false
ion-col,prop,pushMd,string | undefined,undefined,false,false
ion-col,prop,pushSm,string | undefined,undefined,false,false
ion-col,prop,pushXl,string | undefined,undefined,false,false
ion-col,prop,pushXs,string | undefined,undefined,false,false
ion-col,prop,order,string | undefined,undefined,false,false
ion-col,prop,orderLg,string | undefined,undefined,false,false
ion-col,prop,orderMd,string | undefined,undefined,false,false
ion-col,prop,orderSm,string | undefined,undefined,false,false
ion-col,prop,orderXl,string | undefined,undefined,false,false
ion-col,prop,orderXs,string | undefined,undefined,false,false
ion-col,prop,size,string | undefined,undefined,false,false
ion-col,prop,sizeLg,string | undefined,undefined,false,false
ion-col,prop,sizeMd,string | undefined,undefined,false,false
Expand Down
96 changes: 24 additions & 72 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,53 +928,29 @@ export namespace Components {
*/
"offsetXs"?: string;
/**
* The amount to pull the column, in terms of how many columns it should shift to the start of the total available.
* The order of the column, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pull"?: string;
"order"?: string;
/**
* The amount to pull the column for lg screens, in terms of how many columns it should shift to the start of the total available.
* The order of the column for lg screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pullLg"?: string;
"orderLg"?: string;
/**
* The amount to pull the column for md screens, in terms of how many columns it should shift to the start of the total available.
* The order of the column for md screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pullMd"?: string;
"orderMd"?: string;
/**
* The amount to pull the column for sm screens, in terms of how many columns it should shift to the start of the total available.
* The order of the column for sm screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pullSm"?: string;
"orderSm"?: string;
/**
* The amount to pull the column for xl screens, in terms of how many columns it should shift to the start of the total available.
* The order of the column for xl screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pullXl"?: string;
"orderXl"?: string;
/**
* The amount to pull the column for xs screens, in terms of how many columns it should shift to the start of the total available.
* The order of the column for xs screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pullXs"?: string;
/**
* The amount to push the column, in terms of how many columns it should shift to the end of the total available.
*/
"push"?: string;
/**
* The amount to push the column for lg screens, in terms of how many columns it should shift to the end of the total available.
*/
"pushLg"?: string;
/**
* The amount to push the column for md screens, in terms of how many columns it should shift to the end of the total available.
*/
"pushMd"?: string;
/**
* The amount to push the column for sm screens, in terms of how many columns it should shift to the end of the total available.
*/
"pushSm"?: string;
/**
* The amount to push the column for xl screens, in terms of how many columns it should shift to the end of the total available.
*/
"pushXl"?: string;
/**
* The amount to push the column for xs screens, in terms of how many columns it should shift to the end of the total available.
*/
"pushXs"?: string;
"orderXs"?: string;
/**
* The size of the column, in terms of how many columns it should take up out of the total available. If `"auto"` is passed, the column will be the size of its content.
*/
Expand Down Expand Up @@ -6862,53 +6838,29 @@ declare namespace LocalJSX {
*/
"offsetXs"?: string;
/**
* The amount to pull the column, in terms of how many columns it should shift to the start of the total available.
*/
"pull"?: string;
/**
* The amount to pull the column for lg screens, in terms of how many columns it should shift to the start of the total available.
*/
"pullLg"?: string;
/**
* The amount to pull the column for md screens, in terms of how many columns it should shift to the start of the total available.
*/
"pullMd"?: string;
/**
* The amount to pull the column for sm screens, in terms of how many columns it should shift to the start of the total available.
*/
"pullSm"?: string;
/**
* The amount to pull the column for xl screens, in terms of how many columns it should shift to the start of the total available.
*/
"pullXl"?: string;
/**
* The amount to pull the column for xs screens, in terms of how many columns it should shift to the start of the total available.
*/
"pullXs"?: string;
/**
* The amount to push the column, in terms of how many columns it should shift to the end of the total available.
* The order of the column, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"push"?: string;
"order"?: string;
/**
* The amount to push the column for lg screens, in terms of how many columns it should shift to the end of the total available.
* The order of the column for lg screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pushLg"?: string;
"orderLg"?: string;
/**
* The amount to push the column for md screens, in terms of how many columns it should shift to the end of the total available.
* The order of the column for md screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pushMd"?: string;
"orderMd"?: string;
/**
* The amount to push the column for sm screens, in terms of how many columns it should shift to the end of the total available.
* The order of the column for sm screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pushSm"?: string;
"orderSm"?: string;
/**
* The amount to push the column for xl screens, in terms of how many columns it should shift to the end of the total available.
* The order of the column for xl screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pushXl"?: string;
"orderXl"?: string;
/**
* The amount to push the column for xs screens, in terms of how many columns it should shift to the end of the total available.
* The order of the column for xs screens, in terms of where the column should position itself in the columns renderer. If no value is passed, the column order implicit value will be the order in the html structure.
*/
"pushXs"?: string;
"orderXs"?: string;
/**
* The size of the column, in terms of how many columns it should take up out of the total available. If `"auto"` is passed, the column will be the size of its content.
*/
Expand Down
32 changes: 32 additions & 0 deletions core/src/components/col/col.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
// --------------------------------------------------

:host {
/**
* @prop --col-unit-size: The size of each Column unit.
*/
--col-unit-size: calc((100% - (var(--ion-grid-columns, 12) - 1) * var(--ion-grid-gap)) / var(--ion-grid-columns, 12));

/**
* @prop --ion-grid-columns: The number of total Columns in the Grid
* @prop --ion-grid-column-padding: Padding for the Column
Expand All @@ -27,3 +32,30 @@
max-width: 100%;
min-height: 1px; // Prevent columns from collapsing when empty
}

:host(.ion-grid-col-auto){
flex: 0 0 auto;
}

:host(
[class^="ion-grid-col-"],
[class*=" ion-grid-col-"]) {
flex: 0 0
calc(var(--ion-grid-col-span) * var(--col-unit-size) +
(var(--ion-grid-col-span) - 1) * var(--ion-grid-gap));
}

:host(
[class^="ion-grid-offset-col-"],
[class*=" ion-grid-offset-col-"]) {
--margin-calc: calc(var(--col-unit-size) * var(--ion-grid-col-margin) + (var(--ion-grid-gap) * var(--ion-grid-col-margin)));

@include margin-horizontal(var(--margin-calc), 0);
}

$max: 12;
@for $i from 1 through $max {
.ion-grid-col-#{$i} { --ion-grid-col-span: #{$i}; }
.ion-grid-order-col-#{$i} { order: #{$i}; }
.ion-grid-offset-col-#{$i} { --ion-grid-col-margin: #{$i};}
}
Loading
Loading