mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(many): form components do not take up full width in slot (#27306)
Issue number: resolves #27305 --------- <!-- Please refer to our contributing documentation for any questions on submitting a pull request, or let us know here if you need any help: https://ionicframework.com/docs/building/contributing --> <!-- Some docs updates need to be made in the `ionic-docs` repo, in a separate PR. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation for details. --> <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Checkbox, radio, range, select, and toggle take up 100% of its width even when in a start/end slot. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Checkbox, radio, range, select, and toggle do not take up 100% of its width even when in a start/end slot. . The "no slot" behavior is unchanged and aligns with the legacy select. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
This commit is contained in:
@ -42,8 +42,14 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host(.in-item[slot="start"]:not(.legacy-checkbox)),
|
||||
:host(.in-item[slot="end"]:not(.legacy-checkbox)) {
|
||||
/**
|
||||
* Checkbox can be slotted
|
||||
* in components such as item and
|
||||
* toolbar which is why we do not
|
||||
* limit the below behavior to just ion-item.
|
||||
*/
|
||||
:host([slot="start"]:not(.legacy-checkbox)),
|
||||
:host([slot="end"]:not(.legacy-checkbox)) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
@ -75,8 +75,14 @@ input {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host(.in-item[slot="start"]:not(.legacy-radio)),
|
||||
:host(.in-item[slot="end"]:not(.legacy-radio)) {
|
||||
/**
|
||||
* Radio can be slotted
|
||||
* in components such as item and
|
||||
* toolbar which is why we do not
|
||||
* limit the below behavior to just ion-item.
|
||||
*/
|
||||
:host([slot="start"]:not(.legacy-radio)),
|
||||
:host([slot="end"]:not(.legacy-radio)) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
@ -168,8 +168,14 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:host(.in-item[slot="start"]),
|
||||
:host(.in-item[slot="end"]) {
|
||||
/**
|
||||
* Range can be slotted
|
||||
* in components such as item and
|
||||
* toolbar which is why we do not
|
||||
* limit the below behavior to just ion-item.
|
||||
*/
|
||||
:host([slot="start"]),
|
||||
:host([slot="end"]) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,14 @@
|
||||
}
|
||||
|
||||
// TODO FW-3194 - Remove :not(.legacy-select) piece
|
||||
:host(.in-item[slot="start"]:not(.legacy-select)),
|
||||
:host(.in-item[slot="end"]:not(.legacy-select)) {
|
||||
/**
|
||||
* Select can be slotted
|
||||
* in components such as item and
|
||||
* toolbar which is why we do not
|
||||
* limit the below behavior to just ion-item.
|
||||
*/
|
||||
:host([slot="start"]:not(.legacy-select)),
|
||||
:host([slot="end"]:not(.legacy-select)) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
@ -33,10 +33,6 @@
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
ion-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -42,8 +42,14 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:host(.in-item[slot="start"]:not(.legacy-toggle)),
|
||||
:host(.in-item[slot="end"]:not(.legacy-toggle)) {
|
||||
/**
|
||||
* Toggle can be slotted
|
||||
* in components such as item and
|
||||
* toolbar which is why we do not
|
||||
* limit the below behavior to just ion-item.
|
||||
*/
|
||||
:host([slot="start"]:not(.legacy-toggle)),
|
||||
:host([slot="end"]:not(.legacy-toggle)) {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user