Skip to content

Commit

Permalink
fix(form-controls): adjust flex properties inside of an item (#29328)
Browse files Browse the repository at this point in the history
Issue number: resolves #29319

---------

## What is the current behavior?
Icons (not slotted) alongside a checkbox, toggle, or radio in an item
using the modern syntax cause the icon to shrink in width.

## What is the new behavior?
Allow the checkbox, toggle, and radio to shrink to accommodate the icon.
This matches the select behavior:
https://github.com/ionic-team/ionic-framework/blob/f0da2c1727a4b4bb5dfeab3fd0be10e5457bbc83/core/src/components/select/select.scss#L84

| Before | After |
| --- | --- |
|
![before](https://github.com/ionic-team/ionic-framework/assets/6577830/ca32e2a7-ee10-427e-b060-3c554e9e7fec)
|
![after](https://github.com/ionic-team/ionic-framework/assets/6577830/8be2d918-0caa-4b7a-8fc7-a57456307a84)
|

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: ionitron <hi@ionicframework.com>
  • Loading branch information
brandyscarney and Ionitron committed Apr 12, 2024
1 parent f0da2c1 commit 9b59138
Show file tree
Hide file tree
Showing 15 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/components/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
}

:host(.in-item) {
flex: 1 1 0;

width: 100%;
height: 100%;
}
Expand Down
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.
2 changes: 2 additions & 0 deletions core/src/components/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ input {
}

:host(.in-item) {
flex: 1 1 0;

width: 100%;
height: 100%;
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/components/toggle/toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
}

:host(.in-item) {
flex: 1 1 0;

width: 100%;
height: 100%;
}
Expand Down

0 comments on commit 9b59138

Please sign in to comment.