diff --git a/BREAKING.md b/BREAKING.md index fc500f64888..e48fe76f98d 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -19,6 +19,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) + - [Col](#version-9x-col) - [Content](#version-9x-content) - [Datetime](#version-9x-datetime) - [Grid](#version-9x-grid) @@ -27,6 +28,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver - [Item Divider](#version-9x-item-divider) - [Menu Toggle](#version-9x-menu-toggle) - [Radio Group](#version-9x-radio-group) + - [Row](#version-9x-row) - [Spinner](#version-9x-spinner) - [Text](#version-9x-text) - [Textarea](#version-9x-textarea) @@ -87,6 +89,25 @@ This is a comprehensive list of the breaking changes introduced in the major ver - Specific theme classes (e.g., `ion-chip.md`) are no longer supported. Style modifications based on the active theme must be implemented using theme tokens rather than direct class targeting. - 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 `IonChip.shape.round.border.radius` to specify a different value for global styles and `--ion-chip-shape-round-border-radius` for component-specific styles. +

Col

+ +The following breaking changes apply to `ion-col`: + +1. `--ion-grid-column-padding-*` CSS variables have been replaced with per-side, per-breakpoint tokens in the `col` namespace. [1](#version-9x-col-padding-variables) +2. Theme classes (`ion-col.md`, `ion-col.ios`) are no longer supported. [2](#version-9x-col-theme-classes) + +
Padding variables
+ +Column padding was a single value per breakpoint and is now set per-side, and the variables have moved from the `grid` namespace to the `col` namespace. Use the new token structure for global styles, or the corresponding CSS variable for component-specific overrides: + +| Old (8.x) | New token (global) | New CSS variable (component-specific) | +|---|---|---| +| `--ion-grid-column-padding-{bp}` | `IonCol.breakpoint.{bp}.padding.{top\|end\|bottom\|start}` | `--ion-col-breakpoint-{bp}-padding-{top\|end\|bottom\|start}` | + +
Theme classes
+ +Remove any instances that target the theme classes: `ion-col.md`, `ion-col.ios`. +

Content

The following breaking changes apply to `ion-content`: @@ -141,9 +162,32 @@ Remove any instances that target the theme classes: `ion-content.md`, `ion-conte

Grid

-- The properties `pull` and `push` have been deprecated and no longer work. A similar look can be achieved with the newly added property `order`. +The following breaking changes apply to `ion-grid`: + +1. `--ion-grid-padding-*` CSS variables have been replaced with per-side, per-breakpoint tokens. [1](#version-9x-grid-padding-variables) +2. `--ion-grid-width-*` CSS variables for the fixed grid have been replaced with per-breakpoint tokens. [2](#version-9x-grid-fixed-width-variables) +3. The `push` and `pull` properties have been deprecated. [3](#version-9x-grid-deprecated-push-and-pull-properties) +4. Theme classes (`ion-grid.md`, `ion-grid.ios`) are no longer supported. [4](#version-9x-grid-theme-classes) + +
Padding variables
-
Example 1: Swap two columns
+Grid padding was a single value per breakpoint and is now set per-side. Use the new token structure for global styles, or the corresponding CSS variable for component-specific overrides: + +| Old (8.x) | New token (global) | New CSS variable (component-specific) | +|---|---|---| +| `--ion-grid-padding-{bp}` | `IonGrid.breakpoint.{bp}.padding.{top\|end\|bottom\|start}` | `--ion-grid-breakpoint-{bp}-padding-{top\|end\|bottom\|start}` | + +
Fixed width variables
+ +| Old (8.x) | New token (global) | New CSS variable (component-specific) | +|---|---|---| +| `--ion-grid-width-{bp}` | `IonGrid.breakpoint.{bp}.width` | `--ion-grid-breakpoint-{bp}-width` | + +
Deprecated push and pull properties
+ +The `push` and `pull` properties have been disabled. They now log a deprecation warning and no longer affect layout. Use the `order` property to achieve a similar result. + +**Example 1: Swap two columns** **Version up to 8.x** @@ -169,7 +213,7 @@ Remove any instances that target the theme classes: `ion-content.md`, `ion-conte ``` -
Example 2: Reorder columns with specific sizes
+**Example 2: Reorder columns with specific sizes** To reorder two columns where column 1 has `size="9" push="3"` and column 2 has `size="3" pull="9"`: @@ -195,7 +239,7 @@ To reorder two columns where column 1 has `size="9" push="3"` and column 2 has ` ``` -
Example 3: Push
+**Example 3: Push** ```html @@ -225,7 +269,7 @@ To reorder two columns where column 1 has `size="9" push="3"` and column 2 has ` ``` -
Example 4: Push and Pull
+**Example 4: Push and Pull** ```html @@ -255,6 +299,10 @@ To reorder two columns where column 1 has `size="9" push="3"` and column 2 has ` ``` +
Theme classes
+ +Remove any instances that target the theme classes: `ion-grid.md`, `ion-grid.ios`. +

Image

The following breaking changes apply to `ion-img`: @@ -304,6 +352,16 @@ If you were targeting the internals of `ion-radio-group` in your CSS, you will n Additionally, the `radio-group-wrapper` div element has been removed, causing slotted elements to be direct children of the `ion-radio-group`. +

Row

+ +The following breaking changes apply to `ion-row`: + +1. Theme classes (`ion-row.md`, `ion-row.ios`) are no longer supported. [1](#version-9x-row-theme-classes) + +
Theme classes
+ +Remove any instances that target the theme classes: `ion-row.md`, `ion-row.ios`. +

Spinner

- Component CSS variables have been removed. The component now utilizes the centralized Ionic Theming system. Global updates should be managed via the theme tokens file, while component-specific overrides are handled through localized CSS variables. diff --git a/core/api.txt b/core/api.txt index 56e39615965..36040cb0c13 100644 --- a/core/api.txt +++ b/core/api.txt @@ -781,15 +781,26 @@ ion-col,prop,sizeMd,string | undefined,undefined,false,false ion-col,prop,sizeSm,string | undefined,undefined,false,false ion-col,prop,sizeXl,string | undefined,undefined,false,false ion-col,prop,sizeXs,string | undefined,undefined,false,false -ion-col,prop,theme,"ios" | "md" | "ionic",undefined,false,false -ion-col,css-prop,--col-unit-size -ion-col,css-prop,--ion-grid-column-padding -ion-col,css-prop,--ion-grid-column-padding-lg -ion-col,css-prop,--ion-grid-column-padding-md -ion-col,css-prop,--ion-grid-column-padding-sm -ion-col,css-prop,--ion-grid-column-padding-xl -ion-col,css-prop,--ion-grid-column-padding-xs -ion-col,css-prop,--ion-grid-columns +ion-col,css-prop,--ion-col-breakpoint-lg-padding-bottom +ion-col,css-prop,--ion-col-breakpoint-lg-padding-end +ion-col,css-prop,--ion-col-breakpoint-lg-padding-start +ion-col,css-prop,--ion-col-breakpoint-lg-padding-top +ion-col,css-prop,--ion-col-breakpoint-md-padding-bottom +ion-col,css-prop,--ion-col-breakpoint-md-padding-end +ion-col,css-prop,--ion-col-breakpoint-md-padding-start +ion-col,css-prop,--ion-col-breakpoint-md-padding-top +ion-col,css-prop,--ion-col-breakpoint-sm-padding-bottom +ion-col,css-prop,--ion-col-breakpoint-sm-padding-end +ion-col,css-prop,--ion-col-breakpoint-sm-padding-start +ion-col,css-prop,--ion-col-breakpoint-sm-padding-top +ion-col,css-prop,--ion-col-breakpoint-xl-padding-bottom +ion-col,css-prop,--ion-col-breakpoint-xl-padding-end +ion-col,css-prop,--ion-col-breakpoint-xl-padding-start +ion-col,css-prop,--ion-col-breakpoint-xl-padding-top +ion-col,css-prop,--ion-col-breakpoint-xs-padding-bottom +ion-col,css-prop,--ion-col-breakpoint-xs-padding-end +ion-col,css-prop,--ion-col-breakpoint-xs-padding-start +ion-col,css-prop,--ion-col-breakpoint-xs-padding-top ion-content,shadow ion-content,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record | undefined,undefined,false,true @@ -1043,19 +1054,32 @@ ion-gallery,prop,theme,"ios" | "md" | "ionic",undefined,false,false ion-grid,shadow ion-grid,prop,fixed,boolean,false,false,false ion-grid,prop,mode,"ios" | "md",undefined,false,false -ion-grid,prop,theme,"ios" | "md" | "ionic",undefined,false,false -ion-grid,css-prop,--ion-grid-padding -ion-grid,css-prop,--ion-grid-padding-lg -ion-grid,css-prop,--ion-grid-padding-md -ion-grid,css-prop,--ion-grid-padding-sm -ion-grid,css-prop,--ion-grid-padding-xl -ion-grid,css-prop,--ion-grid-padding-xs -ion-grid,css-prop,--ion-grid-width -ion-grid,css-prop,--ion-grid-width-lg -ion-grid,css-prop,--ion-grid-width-md -ion-grid,css-prop,--ion-grid-width-sm -ion-grid,css-prop,--ion-grid-width-xl -ion-grid,css-prop,--ion-grid-width-xs +ion-grid,css-prop,--ion-grid-breakpoint-lg-padding-bottom +ion-grid,css-prop,--ion-grid-breakpoint-lg-padding-end +ion-grid,css-prop,--ion-grid-breakpoint-lg-padding-start +ion-grid,css-prop,--ion-grid-breakpoint-lg-padding-top +ion-grid,css-prop,--ion-grid-breakpoint-lg-width +ion-grid,css-prop,--ion-grid-breakpoint-md-padding-bottom +ion-grid,css-prop,--ion-grid-breakpoint-md-padding-end +ion-grid,css-prop,--ion-grid-breakpoint-md-padding-start +ion-grid,css-prop,--ion-grid-breakpoint-md-padding-top +ion-grid,css-prop,--ion-grid-breakpoint-md-width +ion-grid,css-prop,--ion-grid-breakpoint-sm-padding-bottom +ion-grid,css-prop,--ion-grid-breakpoint-sm-padding-end +ion-grid,css-prop,--ion-grid-breakpoint-sm-padding-start +ion-grid,css-prop,--ion-grid-breakpoint-sm-padding-top +ion-grid,css-prop,--ion-grid-breakpoint-sm-width +ion-grid,css-prop,--ion-grid-breakpoint-xl-padding-bottom +ion-grid,css-prop,--ion-grid-breakpoint-xl-padding-end +ion-grid,css-prop,--ion-grid-breakpoint-xl-padding-start +ion-grid,css-prop,--ion-grid-breakpoint-xl-padding-top +ion-grid,css-prop,--ion-grid-breakpoint-xl-width +ion-grid,css-prop,--ion-grid-breakpoint-xs-padding-bottom +ion-grid,css-prop,--ion-grid-breakpoint-xs-padding-end +ion-grid,css-prop,--ion-grid-breakpoint-xs-padding-start +ion-grid,css-prop,--ion-grid-breakpoint-xs-padding-top +ion-grid,css-prop,--ion-grid-breakpoint-xs-width +ion-grid,css-prop,--ion-grid-columns ion-header,none ion-header,prop,collapse,"condense" | "fade" | undefined,undefined,false,false @@ -2255,8 +2279,7 @@ ion-router-outlet,prop,theme,"ios" | "md" | "ionic",undefined,false,false ion-row,shadow ion-row,prop,mode,"ios" | "md",undefined,false,false -ion-row,prop,theme,"ios" | "md" | "ionic",undefined,false,false -ion-row,css-prop,--ion-grid-gap +ion-row,css-prop,--ion-row-gap ion-searchbar,scoped ion-searchbar,prop,animated,boolean,false,false,false diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 23b33be9ec3..0e1bafc4319 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1043,10 +1043,6 @@ export namespace Components { * The size of the column for xs screens, 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. */ "sizeXs"?: string; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonContent { /** @@ -1512,10 +1508,6 @@ export namespace Components { * The mode determines the platform behaviors of the component. */ "mode"?: "ios" | "md"; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonHeader { /** @@ -3463,7 +3455,7 @@ export namespace Components { * The mode determines the platform behaviors of the component. * @default getIonMode(this) */ - "mode": "ios" | "md"; + "mode": "md" | "ios"; "setRouteId": (id: string, params: ComponentProps | undefined, direction: RouterDirection, animation?: AnimationBuilder) => Promise; "swipeHandler"?: SwipeGestureHandler; /** @@ -3476,10 +3468,6 @@ export namespace Components { * The mode determines the platform behaviors of the component. */ "mode"?: "ios" | "md"; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonSearchbar { /** @@ -7062,10 +7050,6 @@ declare namespace LocalJSX { * The size of the column for xs screens, 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. */ "sizeXs"?: string; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonContent { /** @@ -7520,10 +7504,6 @@ declare namespace LocalJSX { * The mode determines the platform behaviors of the component. */ "mode"?: "ios" | "md"; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonHeader { /** @@ -9511,7 +9491,7 @@ declare namespace LocalJSX { * The mode determines the platform behaviors of the component. * @default getIonMode(this) */ - "mode"?: "ios" | "md"; + "mode"?: "md" | "ios"; "onIonNavDidChange"?: (event: IonRouterOutletCustomEvent) => void; "onIonNavWillChange"?: (event: IonRouterOutletCustomEvent) => void; "onIonNavWillLoad"?: (event: IonRouterOutletCustomEvent) => void; @@ -9526,10 +9506,6 @@ declare namespace LocalJSX { * The mode determines the platform behaviors of the component. */ "mode"?: "ios" | "md"; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonSearchbar { /** @@ -11229,7 +11205,7 @@ declare namespace LocalJSX { "target": string | undefined; } interface IonRouterOutletAttributes { - "mode": "ios" | "md"; + "mode": "md" | "ios"; "animated": boolean; } interface IonSearchbarAttributes { diff --git a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Chrome-linux.png b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Chrome-linux.png index 28138808c3a..56e9941cb1e 100644 Binary files a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Chrome-linux.png and b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Firefox-linux.png b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Firefox-linux.png index f7a56d923a7..626dba67148 100644 Binary files a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Firefox-linux.png and b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Safari-linux.png b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Safari-linux.png index c5a575bfc19..69d462f2039 100644 Binary files a/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Safari-linux.png and b/core/src/components/action-sheet/test/translucent/action-sheet.e2e.ts-snapshots/action-sheet-translucent-ios-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/action-sheet/test/translucent/index.html b/core/src/components/action-sheet/test/translucent/index.html index cfae303e7e6..1eef4d3849a 100644 --- a/core/src/components/action-sheet/test/translucent/index.html +++ b/core/src/components/action-sheet/test/translucent/index.html @@ -14,10 +14,16 @@ + + + +
ion-col
+
ion-col
+
ion-col
+
ion-col
+
ion-col[width-50]
+
ion-col
+
ion-col
+
+ + +
ion-col[width-25]
+
ion-col
+
ion-col[width-25]
+
+ + +
ion-col[width-25]
+
ion-col[width-25][offset-25]
+
+ + +
ion-col
+
ion-col
#
+
ion-col
#
#
+
ion-col
#
#
#
+
+ + +
ion-col[top]
+
ion-col[center]
+
ion-col[bottom]
+
ion-col
#
#
+
+ + +
[top] ion-col
+
[top] ion-col
+
[top] ion-col[bottom]
+
ion-col
#
#
+
+ + +
[center] ion-col
+
[center] ion-col
+
[center] ion-col
+
ion-col
#
#
+
+ + +
[bottom] ion-col
+
[bottom] ion-col[top]
+
[bottom] ion-col
+
ion-col
#
#
+
+ + +
[responsive-sm] ion-col
+
[responsive-sm] ion-col
+
[responsive-sm] ion-col
+
[responsive-sm] ion-col
+
+ + +
[responsive-md] ion-col
+
[responsive-md] ion-col
+
[responsive-md] ion-col
+
[responsive-md] ion-col
+
+ + +
[responsive-lg] ion-col[width-50][offset-25]
+
[responsive-lg] ion-col[width-25]
+
+
+ `, + config + ); + + const grid = page.locator('ion-grid'); + + /** + * Grid overflows the default viewport, causing + * unrendered areas to appear black in the screenshot. + * Resizing to fit content. + */ + const box = await grid.boundingBox(); + await page.setViewportSize({ width: Math.ceil(box!.width), height: Math.ceil(box!.height) }); + + await expect(grid).toHaveScreenshot(screenshot('grid-basic')); + }); + + test('should not have visual regressions for custom columns', async ({ page }) => { + await page.setContent( + ` + + + + +
16
+
+ +
8
+
8
+
+ +
13
+
3
+
+ +
size 10, offset 6
+
+
+ `, + config + ); await page.setIonViewport(); - await expect(page).toHaveScreenshot(screenshot(`grid-basic`)); + const grid = page.locator('ion-grid'); + + await expect(grid).toHaveScreenshot(screenshot('grid-custom-columns')); }); }); }); diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Chrome-linux.png index 707caaecc13..66bbd9ed32b 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Chrome-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Firefox-linux.png index 8c1b5d84f49..23d1b31a72c 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Firefox-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Safari-linux.png index e020cae2f68..a4b61ab6fb5 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Safari-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Chrome-linux.png index 762d30ab638..bb5b50218a7 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Chrome-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Firefox-linux.png index 673cf5e73da..817413227da 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Firefox-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Safari-linux.png index b7ffb15e9eb..456341d34eb 100644 Binary files a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Safari-linux.png and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-basic-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..58da0f16b63 Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..7fe743605df Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..28a9979669f Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..75d9fb08861 Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..ebff9076e0e Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..447779de36a Binary files /dev/null and b/core/src/components/grid/test/basic/grid.e2e.ts-snapshots/grid-custom-columns-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/basic/index.html b/core/src/components/grid/test/basic/index.html index c351e8840d7..2a8ee1ae3a3 100644 --- a/core/src/components/grid/test/basic/index.html +++ b/core/src/components/grid/test/basic/index.html @@ -12,6 +12,24 @@ + @@ -23,7 +41,8 @@ - +

Default Columns

+
ion-col
@@ -205,16 +224,55 @@
-
- +

Custom Column Count

+ + + +
ion-col[size-16] full width
+
+
+ + + +
ion-col[size-8] half
+
+ +
ion-col[size-8] half
+
+
+ + + +
ion-col[size-4]
+
+ +
ion-col[size-4]
+
+ +
ion-col[size-4]
+
+ +
ion-col[size-4]
+
+
+ + + +
ion-col[size-13]
+
+ +
ion-col[size-3]
+
+
+ + + +
ion-col[size-10][offset-6]
+
+
+
+ diff --git a/core/src/components/grid/test/fixed/grid.e2e.ts b/core/src/components/grid/test/fixed/grid.e2e.ts new file mode 100644 index 00000000000..b90e7b5972c --- /dev/null +++ b/core/src/components/grid/test/fixed/grid.e2e.ts @@ -0,0 +1,55 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +import { defaultTheme as mdTheme } from '../../../../themes/md/default.tokens'; +import { SIZE_TO_MEDIA } from '../../../../utils/media'; +import { ION_GRID_BREAKPOINTS } from '../../grid.interface'; + +const ionGridBreakpoints = mdTheme.components!.IonGrid!.breakpoint!; + +/** + * Parse the min-width (in px) out of each `SIZE_TO_MEDIA` entry. These are + * the same activation thresholds `matchBreakpoint` evaluates at runtime and + * that `$screen-breakpoints` defines on the SCSS side. + */ +const minWidthFor = (bp: (typeof ION_GRID_BREAKPOINTS)[number]): number => { + const match = (SIZE_TO_MEDIA[bp] as string).match(/\(min-width:\s*(\d+)px\)/); + return match ? parseInt(match[1], 10) : 0; +}; + +/** + * Viewport width that activates each breakpoint. `max(400, minWidth)` lands + * exactly on the threshold for sm/md/lg/xl (firing only that breakpoint's + * rule and nothing above it) while giving xs a renderable non-zero viewport. + */ +const VIEWPORT_AT_BREAKPOINT = Object.fromEntries( + ION_GRID_BREAKPOINTS.map((bp) => [bp, Math.max(400, minWidthFor(bp))]) +) as Record<(typeof ION_GRID_BREAKPOINTS)[number], number>; + +/** + * This behavior does not vary across modes/directions. + */ +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('grid: fixed'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/grid/test/fixed', config); + }); + + for (const breakpoint of ION_GRID_BREAKPOINTS) { + test(`fixed grid matches the ${breakpoint} width token`, async ({ page }) => { + const viewportWidth = VIEWPORT_AT_BREAKPOINT[breakpoint]; + await page.setViewportSize({ width: viewportWidth, height: 800 }); + + const grid = page.locator('ion-grid'); + const measuredWidth = await grid.evaluate((el) => el.getBoundingClientRect().width); + + const expected = ionGridBreakpoints[breakpoint]!.width!; + const expectedPx = expected === '100%' ? viewportWidth : parseInt(expected, 10); + + // Allow 1px tolerance for sub-pixel rounding in the browser. + expect(measuredWidth).toBeGreaterThanOrEqual(expectedPx - 1); + expect(measuredWidth).toBeLessThanOrEqual(expectedPx + 1); + }); + } + }); +}); diff --git a/core/src/components/grid/test/fixed/index.html b/core/src/components/grid/test/fixed/index.html new file mode 100644 index 00000000000..b9957d44291 --- /dev/null +++ b/core/src/components/grid/test/fixed/index.html @@ -0,0 +1,220 @@ + + + + + Grid - Fixed + + + + + + + + + + + + + Grid - Fixed + + + + + + + +
ion-col
+
+ +
ion-col
+
+ +
ion-col
+
+ +
ion-col
+
+ + +
ion-col[width-50]
+
+ +
ion-col
+
+ +
ion-col
+
+
+ + + +
ion-col[width-25]
+
+ +
ion-col
+
+ +
ion-col[width-25]
+
+
+ + + +
ion-col[width-25]
+
+ +
ion-col[width-25][offset-25]
+
+
+ + + +
ion-col
+
+ +
+ ion-col +
# +
+
+ +
+ ion-col +
#
# +
+
+ +
+ ion-col +
#
#
# +
+
+
+ + + +
ion-col[top]
+
+ +
ion-col[center]
+
+ +
ion-col[bottom]
+
+ +
+ ion-col +
#
# +
+
+
+ + + +
[top] ion-col
+
+ +
[top] ion-col
+
+ +
[top] ion-col[bottom]
+
+ +
+ ion-col +
#
# +
+
+
+ + + +
[center] ion-col
+
+ +
[center] ion-col
+
+ +
[center] ion-col
+
+ +
+ ion-col +
#
# +
+
+
+ + + +
[bottom] ion-col
+
+ +
[bottom] ion-col[top]
+
+ +
[bottom] ion-col
+
+ +
+ ion-col +
#
# +
+
+
+ + + +
[responsive-sm] ion-col
+
+ +
[responsive-sm] ion-col
+
+ +
[responsive-sm] ion-col
+
+ +
[responsive-sm] ion-col
+
+
+ + + +
[responsive-md] ion-col
+
+ +
[responsive-md] ion-col
+
+ +
[responsive-md] ion-col
+
+ +
[responsive-md] ion-col
+
+
+ + + +
[responsive-lg] ion-col[width-50][offset-25]
+
+ +
[responsive-lg] ion-col[width-25]
+
+
+
+
+ + +
+ + diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts index b4a22e9c1ab..078b855d083 100644 --- a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts +++ b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts @@ -1,3 +1,4 @@ +// TODO(FW-7557): Remove this in a major release. import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; @@ -5,13 +6,13 @@ import { configs, test } from '@utils/test/playwright'; * ion-grid does not have different styling per-mode */ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { - test.describe(title('grid: offsets'), () => { + test.describe(title('grid: pull/push'), () => { test('should not have visual regressions', async ({ page }) => { await page.goto(`/src/components/grid/test/offsets-pull-push`, config); await page.setIonViewport(); - await expect(page).toHaveScreenshot(screenshot(`grid-offsets`)); + await expect(page).toHaveScreenshot(screenshot('grid-pull-push')); }); }); }); diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 1f12db2d4f7..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index bbc2aac6fa6..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 8f955733bf6..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 140e0624bd6..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 07f94379599..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 09d8dfdb812..00000000000 Binary files a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..0eae371344d Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..1b0ff1c3909 Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..d75bbb80ed1 Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..2ca09e8bd19 Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..bf5d4df52de Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..4a590eb62ca Binary files /dev/null and b/core/src/components/grid/test/offsets-pull-push/grid.e2e.ts-snapshots/grid-pull-push-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/offsets-pull-push/index.html b/core/src/components/grid/test/offsets-pull-push/index.html index 4117f49d4ae..901679053e7 100644 --- a/core/src/components/grid/test/offsets-pull-push/index.html +++ b/core/src/components/grid/test/offsets-pull-push/index.html @@ -1,8 +1,9 @@ + - Grid - Pull & Push + Grid - Pull & Push (deprecated) - Grid - Offsets + Grid - Pull & Push (deprecated) -

Push

+

Push (deprecated)

@@ -35,7 +36,7 @@

Push

-

Push and Pull

+

Push and Pull (deprecated)

@@ -57,43 +58,8 @@

Push and Pull

- -

Offset

- - - -
ion-col offset=5
-
- -
ion-col offset="2"
-
-
-
- -

Dynamic Offset

- - - -
ion-col offset="2" offset-md="5"
-
- -
ion-col offset="2" offset-md="5"
-
-
-
- -
- - + +
+ + +
order 2
+
order 1
+
+
+ + + +
order 2, order-md 1
+
order 1, order-md 2
+
+
+
+ `, + config + ); await page.setIonViewport(); - await expect(page).toHaveScreenshot(screenshot(`grid-offsets`)); + const order = page.locator('#order'); + + await expect(order).toHaveScreenshot(screenshot('grid-offsets-order')); + }); + + test('should shift the column by its offset count in column units', async ({ page }) => { + await page.setContent( + ` + + + offset 1 + offset 0 + + + `, + config + ); + + const { rowWidth, offsetMargin, noOffsetMargin } = await page.locator('ion-row').evaluate((row) => { + const offsetCol = row.querySelector('ion-col[offset="1"]')!; + const noOffsetCol = row.querySelector('ion-col[offset="0"]')!; + + return { + rowWidth: row.clientWidth, + offsetMargin: parseFloat(getComputedStyle(offsetCol).marginInlineStart), + noOffsetMargin: parseFloat(getComputedStyle(noOffsetCol).marginInlineStart), + }; + }); + + // One column unit is rowWidth / 12 (12 column grid, no gap). + const columnUnit = rowWidth / 12; + + expect(offsetMargin).toBeCloseTo(columnUnit, 0); + expect(noOffsetMargin).toBe(0); + }); + + test('should scale the offset margin with the offset count', async ({ page }) => { + await page.setContent( + ` + + + offset 5 + offset 2 + + + `, + config + ); + + const { rowWidth, largeOffsetMargin, smallOffsetMargin } = await page.locator('ion-row').evaluate((row) => { + const largeOffsetCol = row.querySelector('ion-col[offset="5"]')!; + const smallOffsetCol = row.querySelector('ion-col[offset="2"]')!; + + return { + rowWidth: row.clientWidth, + largeOffsetMargin: parseFloat(getComputedStyle(largeOffsetCol).marginInlineStart), + smallOffsetMargin: parseFloat(getComputedStyle(smallOffsetCol).marginInlineStart), + }; + }); + + // One column unit is rowWidth / 12 (12 column grid, no gap). + const columnUnit = rowWidth / 12; + + expect(largeOffsetMargin).toBeCloseTo(columnUnit * 5, 0); + expect(smallOffsetMargin).toBeCloseTo(columnUnit * 2, 0); + }); + + test('updating the offset prop updates the column margin', async ({ page }) => { + await page.setContent( + ` + + + offset + + + `, + config + ); + + const { rowWidth, offsetMargin } = await page.locator('ion-row').evaluate((row) => { + const dynamicOffsetCol = row.querySelector('#dynamic-offset')!; + + return { + rowWidth: row.clientWidth, + offsetMargin: parseFloat(getComputedStyle(dynamicOffsetCol).marginInlineStart), + }; + }); + + // One column unit is rowWidth / 12 (12 column grid, no gap). + const columnUnit = rowWidth / 12; + + expect(offsetMargin).toBeCloseTo(columnUnit * 2, 0); + + // Updating the offset from 2 to 4 shifts the column by two more units. + const dynamicOffsetCol = page.locator('#dynamic-offset'); + await dynamicOffsetCol.evaluate((col) => col.setAttribute('offset', '4')); + + const updatedMargin = () => + dynamicOffsetCol.evaluate((col) => parseFloat(getComputedStyle(col).marginInlineStart)); + + await expect.poll(updatedMargin).toBeCloseTo(columnUnit * 4, 0); }); }); }); diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index f7d75c3e428..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index d4e6e57c6f4..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 750b79cd2e6..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index e6ef703ec9d..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 77d81d121ca..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 619687ddb61..00000000000 Binary files a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..dad60ed968e Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..d0232835623 Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..206b8e54440 Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..a2775683d72 Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..c537417db18 Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..1ec6c839ba7 Binary files /dev/null and b/core/src/components/grid/test/offsets/grid.e2e.ts-snapshots/grid-offsets-order-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/offsets/index.html b/core/src/components/grid/test/offsets/index.html index eebd67a699f..954161297f6 100644 --- a/core/src/components/grid/test/offsets/index.html +++ b/core/src/components/grid/test/offsets/index.html @@ -22,65 +22,69 @@ - -

Offset

- - - -
ion-col offset 1
-
- -
ion-col offset 0
-
-
-
+ +
+

Offset

+ + + +
ion-col offset 1
+
+ +
ion-col offset 0
+
+
+
-

Order

- - - -
ion-col order 2
-
- -
ion-col order 1
-
-
-
+

Order

+
+ + + +
ion-col order 2
+
+ +
ion-col order 1
+
+
+
- - - -
ion-col size="3" size-md="6" order="2" order-md="1"
-
- -
ion-col size="9" size-md="6" order="1" order-md="2"
-
-
-
+ + + +
ion-col size="3" size-md="6" order="2" order-md="1"
+
+ +
ion-col size="9" size-md="6" order="1" order-md="2"
+
+
+
+
-

Offset

- - - -
ion-col offset=5
-
- -
ion-col offset="2"
-
-
-
+

Offset

+ + + +
ion-col offset=5
+
+ +
ion-col offset="2"
+
+
+
-

Dynamic Offset

- - - -
ion-col offset="2" offset-md="5"
-
- -
ion-col offset="2" offset-md="5"
-
-
-
+

Dynamic Offset

+ + + +
ion-col offset="2" offset-md="5"
+
+ +
ion-col offset="2" offset-md="5"
+
+
+
+
diff --git a/core/src/components/grid/test/padding/grid.e2e.ts b/core/src/components/grid/test/padding/grid.e2e.ts index 71947ec4e8f..438f58bb440 100644 --- a/core/src/components/grid/test/padding/grid.e2e.ts +++ b/core/src/components/grid/test/padding/grid.e2e.ts @@ -2,16 +2,191 @@ import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; /** - * ion-grid does not have different styling per-mode + * This behavior does not vary across modes. */ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { test.describe(title('grid: padding'), () => { - test('should not have visual regressions', async ({ page }) => { - await page.goto(`/src/components/grid/test/padding`, config); + test('should remove all padding with the no padding utility', async ({ page }) => { + await page.setContent( + ` + + + col + + + `, + config + ); + + const padding = await page.locator('ion-grid').evaluate((grid) => { + const styles = getComputedStyle(grid); + + return { + top: styles.paddingTop, + end: styles.paddingInlineEnd, + bottom: styles.paddingBottom, + start: styles.paddingInlineStart, + }; + }); + + expect(padding).toEqual({ top: '0px', end: '0px', bottom: '0px', start: '0px' }); + }); + + test('should not have visual regressions for a nested grid', async ({ page }) => { + await page.setContent( + ` + + +
+ + + + + +
col
+
col
+
+
+
+
col
+
col
+
col
+
+
+
+ `, + config + ); + + await page.setIonViewport(); + + const nested = page.locator('#nested'); + + await expect(nested).toHaveScreenshot(screenshot('grid-padding-nested')); + }); + + test('should not have visual regressions for default padding', async ({ page }) => { + await page.setContent( + ` + + + + +
col
+
col
+
col
+
col
+
+
+ `, + config + ); await page.setIonViewport(); - await expect(page).toHaveScreenshot(screenshot(`grid-padding`)); + const grid = page.locator('ion-grid'); + + await expect(grid).toHaveScreenshot(screenshot('grid-padding-default')); + }); + + test('should apply custom grid padding from the breakpoint variables', async ({ page }) => { + await page.setContent( + ` + + + + + col + + + `, + config + ); + + const padding = await page.locator('ion-grid').evaluate((grid) => { + const styles = getComputedStyle(grid); + + return { + top: styles.paddingTop, + end: styles.paddingInlineEnd, + bottom: styles.paddingBottom, + start: styles.paddingInlineStart, + }; + }); + + expect(padding).toEqual({ top: '8px', end: '8px', bottom: '8px', start: '8px' }); + }); + + test('should apply custom column padding from the breakpoint variables', async ({ page }) => { + await page.setContent( + ` + + + + + col + + + `, + config + ); + + const padding = await page.locator('ion-col').evaluate((col) => { + const styles = getComputedStyle(col); + + return { + top: styles.paddingTop, + end: styles.paddingInlineEnd, + bottom: styles.paddingBottom, + start: styles.paddingInlineStart, + }; + }); + + expect(padding).toEqual({ top: '2px', end: '2px', bottom: '2px', start: '2px' }); }); }); }); diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..cac6e4bf7a0 Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..cf8fe9f9f9d Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..3074e3895bb Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..6fc9b2b8342 Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..54cd57856d4 Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..d5b43d12f9b Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-default-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 1216197bc36..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 98df458853e..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index 9615d03cf0e..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index 435ac076ac9..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index ed7faba7740..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 70c06d0ca95..00000000000 Binary files a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..78cf5acebbe Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..db809c2491a Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..7d291e0a125 Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..6c70f4a438f Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..e3314dcede2 Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..0169cde203d Binary files /dev/null and b/core/src/components/grid/test/padding/grid.e2e.ts-snapshots/grid-padding-nested-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/padding/index.html b/core/src/components/grid/test/padding/index.html index 84a1c14f330..4d1c53c7c28 100644 --- a/core/src/components/grid/test/padding/index.html +++ b/core/src/components/grid/test/padding/index.html @@ -24,7 +24,7 @@

No Grid Padding

- +
ion-col
@@ -42,7 +42,7 @@

No Grid Padding

No Grid Padding / Nested

- + @@ -69,7 +69,7 @@

No Grid Padding / Nested

Default Grid Padding

- +
ion-col
@@ -87,7 +87,7 @@

Default Grid Padding

Custom Grid Padding By Breakpoint

- +
ion-col
@@ -105,18 +105,18 @@

Custom Grid Padding By Breakpoint

Custom Column Padding By Breakpoint

- + - +
ion-col
- +
ion-col
- +
ion-col
- +
ion-col
@@ -136,19 +136,57 @@

Custom Column Padding By Breakpoint

} .custom-grid-padding { - --ion-grid-padding-xs: 0; - --ion-grid-padding-sm: 10px; - --ion-grid-padding-md: 20px; - --ion-grid-padding-lg: 30px; - --ion-grid-padding-xl: 40px; + --ion-grid-breakpoint-xs-padding-top: 0; + --ion-grid-breakpoint-xs-padding-end: 0; + --ion-grid-breakpoint-xs-padding-bottom: 0; + --ion-grid-breakpoint-xs-padding-start: 0; + + --ion-grid-breakpoint-sm-padding-top: 10px; + --ion-grid-breakpoint-sm-padding-end: 10px; + --ion-grid-breakpoint-sm-padding-bottom: 10px; + --ion-grid-breakpoint-sm-padding-start: 10px; + + --ion-grid-breakpoint-md-padding-top: 20px; + --ion-grid-breakpoint-md-padding-end: 20px; + --ion-grid-breakpoint-md-padding-bottom: 20px; + --ion-grid-breakpoint-md-padding-start: 20px; + + --ion-grid-breakpoint-lg-padding-top: 30px; + --ion-grid-breakpoint-lg-padding-end: 30px; + --ion-grid-breakpoint-lg-padding-bottom: 30px; + --ion-grid-breakpoint-lg-padding-start: 30px; + + --ion-grid-breakpoint-xl-padding-top: 40px; + --ion-grid-breakpoint-xl-padding-end: 40px; + --ion-grid-breakpoint-xl-padding-bottom: 40px; + --ion-grid-breakpoint-xl-padding-start: 40px; } .custom-column-padding { - --ion-grid-column-padding-xs: 2px; - --ion-grid-column-padding-sm: 5px; - --ion-grid-column-padding-md: 10px; - --ion-grid-column-padding-lg: 15px; - --ion-grid-column-padding-xl: 25px; + --ion-col-breakpoint-xs-padding-top: 2px; + --ion-col-breakpoint-xs-padding-end: 2px; + --ion-col-breakpoint-xs-padding-bottom: 2px; + --ion-col-breakpoint-xs-padding-start: 2px; + + --ion-col-breakpoint-sm-padding-top: 5px; + --ion-col-breakpoint-sm-padding-end: 5px; + --ion-col-breakpoint-sm-padding-bottom: 5px; + --ion-col-breakpoint-sm-padding-start: 5px; + + --ion-col-breakpoint-md-padding-top: 10px; + --ion-col-breakpoint-md-padding-end: 10px; + --ion-col-breakpoint-md-padding-bottom: 10px; + --ion-col-breakpoint-md-padding-start: 10px; + + --ion-col-breakpoint-lg-padding-top: 15px; + --ion-col-breakpoint-lg-padding-end: 15px; + --ion-col-breakpoint-lg-padding-bottom: 15px; + --ion-col-breakpoint-lg-padding-start: 15px; + + --ion-col-breakpoint-xl-padding-top: 25px; + --ion-col-breakpoint-xl-padding-end: 25px; + --ion-col-breakpoint-xl-padding-bottom: 25px; + --ion-col-breakpoint-xl-padding-start: 25px; } ion-col { diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts b/core/src/components/grid/test/sizes/grid.e2e.ts index 0f03cb6050d..9b4d8ee2a7d 100644 --- a/core/src/components/grid/test/sizes/grid.e2e.ts +++ b/core/src/components/grid/test/sizes/grid.e2e.ts @@ -2,16 +2,148 @@ import { expect } from '@playwright/test'; import { configs, test } from '@utils/test/playwright'; /** - * ion-grid does not have different styling per-mode + * This behavior does not vary across modes. */ configs({ modes: ['md'] }).forEach(({ title, screenshot, config }) => { test.describe(title('grid: sizes'), () => { - test('should not have visual regressions', async ({ page }) => { - await page.goto(`/src/components/grid/test/sizes`, config); + test('should not have visual regressions for responsive sm columns', async ({ page }) => { + await page.setContent( + ` + + + + +
col
+
col
+
col
+
col
+
+
+ `, + config + ); + + await page.setIonViewport(); + + const grid = page.locator('ion-grid'); + + await expect(grid).toHaveScreenshot(screenshot('grid-sizes-responsive-sm')); + }); + + test('should not have visual regressions for auto sized columns', async ({ page }) => { + await page.setContent( + ` + + + + +
col
+
col with extra text to make it auto
+
col
+
col
+
+
+ `, + config + ); await page.setIonViewport(); - await expect(page).toHaveScreenshot(screenshot(`grid-sizes`)); + const grid = page.locator('ion-grid'); + + await expect(grid).toHaveScreenshot(screenshot('grid-sizes-size-auto')); + }); + + test('should not have visual regressions for breakpoint sizes', async ({ page }) => { + await page.setContent( + ` + + +
+ + +
size 12, sm 6, md 4, lg 3, xl 1
+
size 12, sm 6, md 4, lg 3, xl 1
+
size 12, sm 6, md 4, lg 3, xl 1
+
size 12, sm 6, md 4, lg 3, xl 1
+
+
+ + + +
size 2
+
size 1
+
size 2
+
size 3
+
+
+
+ `, + config + ); + + await page.setIonViewport(); + + const breakpointSizes = page.locator('#breakpoint-sizes'); + + await expect(breakpointSizes).toHaveScreenshot(screenshot('grid-sizes-breakpoint-sizes')); + }); + + test('should size each column to its fraction of a 10 column grid', async ({ page }) => { + await page.setContent( + ` + + + 1 + 3 + 3 + 2 + 1 + + + `, + config + ); + + const { rowWidth, columns } = await page.locator('ion-row').evaluate((row) => { + const cols = Array.from(row.querySelectorAll('ion-col')); + + return { + rowWidth: row.clientWidth, + columns: cols.map((col) => ({ + size: Number(col.getAttribute('size')), + width: col.getBoundingClientRect().width, + })), + }; + }); + + // The grid overrides columns to 10, so one column unit is rowWidth / 10 + const columnUnit = rowWidth / 10; + + for (const column of columns) { + expect(column.width).toBeCloseTo(columnUnit * column.size, 0); + } }); }); }); diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..ee4c3c0ce35 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..fd25ea43076 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..77f503df099 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..9495658c583 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..f33ecb26a06 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..6d08789fefc Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-breakpoint-sizes-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Chrome-linux.png deleted file mode 100644 index 09c16d9e1ab..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Firefox-linux.png deleted file mode 100644 index 41213501c0e..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Safari-linux.png deleted file mode 100644 index c494d3c0568..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-ltr-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Chrome-linux.png deleted file mode 100644 index f613b3dfdb8..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Chrome-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Firefox-linux.png deleted file mode 100644 index 652036aee9a..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Firefox-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Safari-linux.png deleted file mode 100644 index 6ef89a3a744..00000000000 Binary files a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-md-rtl-Mobile-Safari-linux.png and /dev/null differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..63a82ab124c Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..b196d3256b0 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..21db37ecc65 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..65170ad77e8 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..a79ab3a44c0 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..70b749dd113 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-responsive-sm-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..104c3c8f7d1 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..bc642754601 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Safari-linux.png new file mode 100644 index 00000000000..6e49a100cc0 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-ltr-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Chrome-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Chrome-linux.png new file mode 100644 index 00000000000..bb38041af09 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Firefox-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Firefox-linux.png new file mode 100644 index 00000000000..9e5b7cb15ef Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Firefox-linux.png differ diff --git a/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Safari-linux.png b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Safari-linux.png new file mode 100644 index 00000000000..66312840998 Binary files /dev/null and b/core/src/components/grid/test/sizes/grid.e2e.ts-snapshots/grid-sizes-size-auto-md-rtl-Mobile-Safari-linux.png differ diff --git a/core/src/components/grid/test/sizes/index.html b/core/src/components/grid/test/sizes/index.html index c2c4b682cfc..6c20d06a467 100644 --- a/core/src/components/grid/test/sizes/index.html +++ b/core/src/components/grid/test/sizes/index.html @@ -24,12 +24,12 @@

10 Column Layout

- +

Responsive sm

- +
ion-col
@@ -47,7 +47,7 @@

Responsive sm

Size auto

- +
ion-col
@@ -65,39 +65,41 @@

Size auto

Breakpoint Sizes

- - - -
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
-
- -
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
-
- -
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
-
- -
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
-
-
-
+
+ + + +
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
+
+ +
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
+
+ +
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
+
+ +
ion-col size="12" size-sm="6" size-md="4" size-lg="3" size-xl="1"
+
+
+
- - - -
ion-col size="2"
-
- -
ion-col size="1"
-
- -
ion-col size="2"
-
- -
ion-col size="3"
-
-
-
+ + + +
ion-col size="2"
+
+ +
ion-col size="1"
+
+ +
ion-col size="2"
+
+ +
ion-col size="3"
+
+
+
+