Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7afba1a
feat(content): add recipe and tokens
thetaPC Apr 24, 2026
32d2fdb
feat(content): cleanup
thetaPC Apr 30, 2026
57c3140
feat(content): more cleanup
thetaPC Apr 30, 2026
5983c3b
refactor(utils): created waitForComponent
thetaPC Apr 30, 2026
76a32dd
feat(styles): remove webkit-overflow-scrolling
thetaPC Apr 30, 2026
7646ae6
feat(content): improvements
thetaPC Apr 30, 2026
412806f
feat(contenet): remove transition theme
thetaPC Apr 30, 2026
c8f817c
refactor(contenet): update padding variables
thetaPC Apr 30, 2026
6a496be
feat(content): remove unused config
thetaPC May 4, 2026
2904ea8
feat(padding): add content padding
thetaPC May 4, 2026
ca169b0
feat(content): update to use new content padding variables
thetaPC May 4, 2026
6dd900b
feat(padding): update padding class
thetaPC May 4, 2026
ec21b54
Merge branch 'ionic-modular' of
thetaPC May 4, 2026
ec39980
feat(content): add css fallbacks
thetaPC May 5, 2026
7b8d89c
feat(content): update core ionic styles
thetaPC May 5, 2026
5d7fb5f
test(scripts): add deep merge
thetaPC May 5, 2026
68c7136
feat(content): remove fallbacks when necessary
thetaPC May 5, 2026
dab1803
feat(content): use global padding variables
thetaPC May 5, 2026
4704cc1
docs(content): add ion-padding comment
thetaPC May 6, 2026
94e7f36
feat(content): use new token for menu global style
thetaPC May 6, 2026
dddcd4e
docs(content): add internal variables reason
thetaPC May 6, 2026
095398c
feat(content): add a fallback for font-family
thetaPC May 6, 2026
32ea3b7
docs(content): add Jira ticket to TODO
thetaPC May 6, 2026
6f20e80
feat(config): clean up type
thetaPC May 8, 2026
bc743b4
feat(content): remove right property
thetaPC May 8, 2026
6337586
docs(BREAKING): add content
thetaPC May 8, 2026
a56e8ce
docs(BREAKING): update content section
thetaPC May 18, 2026
e167474
feat(helpers): change utility name
thetaPC May 18, 2026
944296c
fix(content): add auto fallback
thetaPC May 18, 2026
718f411
Merge branch 'ionic-modular' of github.com:ionic-team/ionic-framework…
thetaPC May 18, 2026
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
48 changes: 48 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
- [Content](#version-9x-content)
- [Datetime](#version-9x-datetime)
- [Grid](#version-9x-grid)
- [Input Otp](#version-9x-input-otp)
Expand Down Expand Up @@ -82,6 +83,53 @@ 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.

<h4 id="version-9x-content">Content</h4>
Comment thread
brandyscarney marked this conversation as resolved.

The following breaking changes apply to `ion-content`:

1. `--background` and `--color` CSS variables have been replaced.
2. `--padding-*` CSS variables are no longer part of the documented public API (but remain functional).
3. `--keyboard-offset`, `--offset-top`, and `--offset-bottom` have been renamed to the `--internal-*` namespace with no replacement.
4. Theme classes (`ion-content.md`, `ion-content.ios`) are no longer supported.

<h5>Removed CSS variables</h5>

`--background` and `--color` have been removed. 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) |
|---|---|---|
| `--background` | `IonContent.background` | `--ion-content-background` |
| `--color` | `IonContent.color` | `--ion-content-color` |

<h5>Padding variables</h5>

New code should use the token-based API:

| Old (8.x) | New token (global) | New CSS variable (component-specific) |
|---|---|---|
| `--padding-top` | `IonContent.padding.top` | `--ion-content-padding-top` |
| `--padding-end` | `IonContent.padding.end` | `--ion-content-padding-end` |
| `--padding-bottom` | `IonContent.padding.bottom` | `--ion-content-padding-bottom` |
| `--padding-start` | `IonContent.padding.start` | `--ion-content-padding-start` |

> **Note:** The `--padding-*` overrides and `.ion-padding`, `.ion-padding-*` utility classes in `css/padding.scss` continue to work — `ion-content` honors them as a fallback when the new token is unset. They are no longer part of the documented public API (only `--ion-content-padding-*` is listed in `core/api.txt`), but existing usage will not break.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> **Note:** The `--padding-*` overrides and `.ion-padding`, `.ion-padding-*` utility classes in `css/padding.scss` continue to work — `ion-content` honors them as a fallback when the new token is unset. They are no longer part of the documented public API (only `--ion-content-padding-*` is listed in `core/api.txt`), but existing usage will not break.
> [!NOTE]
> The `--padding-*` overrides and `.ion-padding`, `.ion-padding-*` utility classes in `css/padding.scss` continue to work — `ion-content` honors them as a fallback when the new token is unset. They are no longer part of the documented public API (only `--ion-content-padding-*` is listed in `core/api.txt`), but existing usage will not break.

Recommend using GitHub's blockquote highlighting.


<h5>Internal-only variables</h5>

The following CSS variables were previously documented `@prop`s on `ion-content` and have been renamed to the `--internal-*` namespace, removing them from the public API:

| Old (8.x) | New |
|---|---|
| `--keyboard-offset` | `--internal-keyboard-offset` |
| `--offset-top` | `--internal-offset-top` |
| `--offset-bottom` | `--internal-offset-bottom` |

These are managed by `ion-content` itself (keyboard avoidance and header/footer offsets) and were never intended for consumer override. There is no replacement — any code that was setting them directly should be removed.

<h5>Theme classes</h5>

Remove any instances that target the theme classes: `ion-content.md`, `ion-content.ios`.

<h4 id="version-9x-datetime">Datetime</h4>

- The `ion-buttons` component has been removed from the internal implementation of `ion-datetime` and is no longer required when passing custom buttons to the `slot="buttons"`. When providing custom buttons, use a `div` element instead of `ion-buttons`. While existing code using `ion-buttons` may continue to work visually, future updates to the `ion-buttons` component may cause any styles you rely on to break.
Expand Down
18 changes: 8 additions & 10 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,6 @@ ion-content,prop,mode,"ios" | "md",undefined,false,false
ion-content,prop,scrollEvents,boolean,false,false,false
ion-content,prop,scrollX,boolean,false,false,false
ion-content,prop,scrollY,boolean,true,false,false
ion-content,prop,theme,"ios" | "md" | "ionic",undefined,false,false
ion-content,method,getScrollElement,getScrollElement() => Promise<HTMLElement>
ion-content,method,scrollByPoint,scrollByPoint(x: number, y: number, duration: number) => Promise<void>
ion-content,method,scrollToBottom,scrollToBottom(duration?: number) => Promise<void>
Expand All @@ -809,15 +808,14 @@ ion-content,method,scrollToTop,scrollToTop(duration?: number) => Promise<void>
ion-content,event,ionScroll,ScrollDetail,true
ion-content,event,ionScrollEnd,ScrollBaseDetail,true
ion-content,event,ionScrollStart,ScrollBaseDetail,true
ion-content,css-prop,--background
ion-content,css-prop,--color
ion-content,css-prop,--keyboard-offset
ion-content,css-prop,--offset-bottom
ion-content,css-prop,--offset-top
ion-content,css-prop,--padding-bottom
ion-content,css-prop,--padding-end
ion-content,css-prop,--padding-start
ion-content,css-prop,--padding-top
ion-content,css-prop,--ion-content-background
ion-content,css-prop,--ion-content-color
ion-content,css-prop,--ion-content-font-family
ion-content,css-prop,--ion-content-overflow
ion-content,css-prop,--ion-content-padding-bottom
ion-content,css-prop,--ion-content-padding-end
ion-content,css-prop,--ion-content-padding-start
ion-content,css-prop,--ion-content-padding-top
ion-content,part,background
ion-content,part,scroll

Expand Down
32 changes: 23 additions & 9 deletions core/scripts/testing/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DEFAULT_THEME = 'md';
const DEFAULT_PALETTE = 'light';

(function() {

/**
* The `rtl` param is used to set the directionality of the
* document. This can be `true` or `false`.
Expand Down Expand Up @@ -128,6 +128,27 @@ const DEFAULT_PALETTE = 'light';
);
}

/**
* Deep merges two objects, with source properties overriding target properties
* @param target The target object to merge into
* @param source The source object to merge from
* @returns The merged object
*/
// TODO(FW-6750): Remove this once the theme tokens can be imported directly into the test pages
const deepMerge = (target, source) => {
const result = { ...target };

for (const key in source) {
if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
result[key] = deepMerge(result[key] ?? {}, source[key]);
} else {
result[key] = source[key];
}
}
return result;
};

// TODO(FW-6750): Determine if this function can be removed once the theme tokens can be imported directly into the test pages
async function loadThemeTokens(themeName, paletteName) {
try {
// Store existing theme set from the app initialization
Expand All @@ -138,14 +159,7 @@ const DEFAULT_PALETTE = 'light';

// Merge with existing theme to preserve any customizations
if (customTheme) {
theme = {
...theme,
...customTheme,
palette: {
...theme.palette,
...customTheme.palette,
},
};
theme = deepMerge(theme, customTheme);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change mimics exactly how we are loading themes in the theme.ts file.

}

// If a specific palette is requested, modify the palette structure
Expand Down
12 changes: 2 additions & 10 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RouteID, RouterDirection, RouterEventDetail, RouteWrite } from "./compo
import { BreadcrumbCollapsedClickEventDetail } from "./components/breadcrumb/breadcrumb-interface";
import { CheckboxChangeEventDetail } from "./components/checkbox/checkbox-interface";
import { IonChipFill, IonChipHue, IonChipShape, IonChipSize } from "./components/chip/chip.interfaces";
import { ScrollBaseDetail, ScrollDetail } from "./components/content/content-interface";
import { ScrollBaseDetail, ScrollDetail } from "./components/content/content.interfaces";
import { DatetimeChangeEventDetail, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, DatetimePresentation, FormatOptions, TitleSelectedDatesFormatter } from "./components/datetime/datetime-interface";
import { SpinnerTypes } from "./components/spinner/spinner-configs";
import { InputChangeEventDetail, InputInputEventDetail } from "./components/input/input-interface";
Expand Down Expand Up @@ -58,7 +58,7 @@ export { RouteID, RouterDirection, RouterEventDetail, RouteWrite } from "./compo
export { BreadcrumbCollapsedClickEventDetail } from "./components/breadcrumb/breadcrumb-interface";
export { CheckboxChangeEventDetail } from "./components/checkbox/checkbox-interface";
export { IonChipFill, IonChipHue, IonChipShape, IonChipSize } from "./components/chip/chip.interfaces";
export { ScrollBaseDetail, ScrollDetail } from "./components/content/content-interface";
export { ScrollBaseDetail, ScrollDetail } from "./components/content/content.interfaces";
export { DatetimeChangeEventDetail, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, DatetimePresentation, FormatOptions, TitleSelectedDatesFormatter } from "./components/datetime/datetime-interface";
export { SpinnerTypes } from "./components/spinner/spinner-configs";
export { InputChangeEventDetail, InputInputEventDetail } from "./components/input/input-interface";
Expand Down Expand Up @@ -1118,10 +1118,6 @@ export namespace Components {
* @default true
*/
"scrollY": boolean;
/**
* The theme determines the visual appearance of the component.
*/
"theme"?: "ios" | "md" | "ionic";
}
interface IonDatetime {
/**
Expand Down Expand Up @@ -7093,10 +7089,6 @@ declare namespace LocalJSX {
* @default true
*/
"scrollY"?: boolean;
/**
* The theme determines the visual appearance of the component.
*/
"theme"?: "ios" | "md" | "ionic";
}
interface IonDatetime {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
flex-shrink: 2;
overscroll-behavior-y: contain;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-webkit-overflow-scrolling has become obsolete since iOS 13.

pointer-events: all;

background: var(--background);
Expand Down
1 change: 0 additions & 1 deletion core/src/components/alert/alert.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
.alert-message,
.alert-input-group {
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
overflow-y: auto;
overscroll-behavior-y: contain;
}
Expand Down
1 change: 0 additions & 1 deletion core/src/components/alert/alert.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@

border-top: $alert-ios-list-border-top;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}

.alert-tappable {
Expand Down
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was because I synced the padding between themes to be consistent. ionic wasn't using padding-* on ion-content.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 22 additions & 5 deletions core/src/components/card/test/shape/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,33 @@
/>
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script>
// Need to be called before loading Ionic else
// the scripts.js logic runs too early.
window.Ionic = {
config: {
customTheme: {
components: {
IonContent: {
background: '#dde2ef',
padding: {
start: '16px',
end: '16px',
top: '16px',
bottom: '16px',
},
},
},
},
},
};
</script>
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>

<!-- Styles only for testing purposes to identify the card shape -->
<style>
ion-content {
--background: #dde2ef;
}

.container {
padding: 8px;
}
Expand All @@ -33,7 +50,7 @@
</ion-toolbar>
</ion-header>

<ion-content class="ion-padding ion-text-center" id="content" no-bounce>
<ion-content class="ion-text-center" id="content" no-bounce>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the padding through the config since I already had to pass the background value there. Figured that I would keep it all in one place by adding the padding.

<h1>Default</h1>
<div id="default" class="container">
<ion-card>
Expand Down
20 changes: 16 additions & 4 deletions core/src/components/card/test/theme-ionic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,26 @@
/>
<link href="../../../../../css/ionic/bundle.ionic.css" rel="stylesheet" />
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
<script>
// Need to be called before loading Ionic else
// the scripts.js logic runs too early.
window.Ionic = {
config: {
customTheme: {
components: {
IonContent: {
background: '#dde2ef',
},
},
},
},
};
</script>
<script src="../../../../../scripts/testing/scripts.js"></script>
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>

<style>
ion-content {
--background: #dde2ef;
}
.ion-margin-top {
margin-top: 32px;
}
Expand All @@ -32,7 +44,7 @@
</ion-toolbar>
</ion-header>

<ion-content class="ion-padding-space-400" id="content" no-bounce>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the class because it wasn't set anywhere.

<ion-content id="content" no-bounce>
<h4>Preview options</h4>

<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { GestureDetail } from '../../interface';
import type { IonPadding } from '../../themes/themes.interfaces';

export interface ScrollBaseDetail {
isScrolling: boolean;
Expand All @@ -19,3 +20,15 @@ export interface ScrollBaseCustomEvent extends CustomEvent {
export interface ScrollCustomEvent extends ScrollBaseCustomEvent {
detail: ScrollDetail;
}

export interface IonContentRecipe {
background?: string;
color?: string;

font?: {
family?: string;
};

overflow?: string;
padding?: IonPadding;
}
Loading
Loading