Issue number: internal --------- ## What is the current behavior? Input Otp uses `scoped` encapsulation. This causes issues with CSP compatibility and is inconsistent with our goal of having all components use Shadow DOM. ## What is the new behavior? - Converts `ion-input-otp` to `shadow` with `formAssociated: true` - Adds shadow parts for inner elements ## Does this introduce a breaking change? - [x] Yes - [ ] No BREAKING CHANGE: Input Otp has been converted to use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). If you were targeting the internals of `ion-input-otp` in your CSS, you will need to target the `group`, `container`, `native`, `separator` or `description` [Shadow Parts](https://ionicframework.com/docs/theming/css-shadow-parts) instead, or use the provided CSS Variables. --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
6.8 KiB
Breaking Changes
This is a comprehensive list of the breaking changes introduced in the major version releases of Ionic Framework.
Versions
Version 9.x
Components
Button
- The
border-radiusof theiosandmdbutton now defaults to6pxand999pxinstead of14pxand4px, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set theshapeto"soft"formdand override the--border-radiusCSS variable foriosto14px, or set it to a different value entirely.
Card
-
ion-card: The
border-radiusof theiosandmdcard now defaults to14pxand12pxinstead of8pxand4px, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set theshapeto"soft", or override the--border-radiusCSS variable to specify a different value. -
ion-card-content: The
ion-card-contentcomponent has been updated to Shadow DOM. With this update, all card-related components now use Shadow DOM for style encapsulation. The default styles for heading elements insideion-card-contenthave been removed. If you need custom styling for headings, you can add your own CSS targeting these elements. For example:ion-card-content h1 { margin-top: 0; margin-bottom: 2px; font-size: 1.5rem; } ion-card-content h2 { margin-top: 2px; margin-bottom: 2px; font-size: 1rem; } ion-card-content h3, ion-card-content h4, ion-card-content h5, ion-card-content h6 { margin-top: 2px; margin-bottom: 2px; font-size: 0.875rem; }
Chip
- The
border-radiusof theiosandmdchip now defaults to10pxand8px, respectively, instead of16pxin accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set theshapeto"round", or override the--border-radiusCSS variable to specify a different value.
Datetime
- The
ion-buttonscomponent has been removed from the internal implementation ofion-datetimeand is no longer required when passing custom buttons to theslot="buttons". When providing custom buttons, use adivelement instead ofion-buttons. While existing code usingion-buttonsmay continue to work visually, future updates to theion-buttonscomponent may cause any styles you rely on to break.
Grid
- The properties
pullandpushhave been deprecated and no longer work. A similar look can be achieved with the newly added propertyorder.
Example 1: Swap two columns
Version up to 8.x
<ion-grid>
<ion-row>
<ion-col push="4">1</ion-col>
<ion-col pull="4">2</ion-col>
<ion-col>3</ion-col>
</ion-row>
</ion-grid>
Version 9.x+
<ion-grid>
<ion-row>
<ion-col order="2">1</ion-col>
<ion-col order="1">2</ion-col>
<ion-col order="3">3</ion-col>
</ion-row>
</ion-grid>
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":
Version up to 8.x
<ion-grid>
<ion-row>
<ion-col push="3">1</ion-col>
<ion-col pull="9">2</ion-col>
</ion-row>
</ion-grid>
Version 9.x+
<ion-grid>
<ion-row>
<ion-col order="2">1</ion-col>
<ion-col size="3" order="1">2</ion-col>
</ion-row>
</ion-grid>
Example 3: Push
<ion-grid>
<ion-row>
<ion-col size="auto" push="1">
<div>ion-col push 1</div>
</ion-col>
<ion-col size="auto" push="1">
<div>ion-col push 1</div>
</ion-col>
</ion-row>
</ion-grid>
Version 9.x+
<ion-grid>
<ion-row>
<ion-col size="auto" offset="1">
<div>ion-col size="auto" offset="1"</div>
</ion-col>
<ion-col size="auto">
<div>ion-col size="auto"</div>
</ion-col>
</ion-row>
</ion-grid>
Example 4: Push and Pull
<ion-grid>
<ion-row>
<ion-col size="3" size-md="6" push="9" push-md="6">
<div>ion-col size="3" size-md="6" push="9" push-md="6"</div>
</ion-col>
<ion-col size="9" size-md="6" pull="3" pull-md="6">
<div>ion-col size="9" size-md="6" pull="3" pull-md="6"</div>
</ion-col>
</ion-row>
</ion-grid>
Version 9.x+
<ion-grid>
<ion-row>
<ion-col size="auto" order="2" order-md="2">
<div>ion-col size="auto" order="2" order-md="2"</div>
</ion-col>
<ion-col size="auto" order="1" order-md="1">
<div>ion-col size="auto" order="1" order-md="1"</div>
</ion-col>
</ion-row>
</ion-grid>
Input Otp
Converted ion-input-otp to use Shadow DOM.
If you were targeting the internals of ion-input-otp in your CSS, you will need to target the group, container, native, separator or description Shadow Parts instead, or use the provided CSS Variables.
Radio Group
Converted ion-radio-group to use Shadow DOM.
If you were targeting the internals of ion-radio-group in your CSS, you will need to target the supporting-text, helper-text or error-text Shadow Parts instead, or use the provided CSS Variables.
Additionally, the radio-group-wrapper div element has been removed, causing slotted elements to be direct children of the ion-radio-group.
Textarea
Converted ion-textarea to use Shadow DOM.
If you were targeting the internals of ion-textarea in your CSS, you will need to target the wrapper, container, label, native, supporting-text, helper-text, error-text, counter, or bottom Shadow Parts instead, or use the provided CSS Variables.