diff --git a/core/src/components/checkbox/checkbox.scss b/core/src/components/checkbox/checkbox.scss index 7a74dddd5b..0209901bbd 100644 --- a/core/src/components/checkbox/checkbox.scss +++ b/core/src/components/checkbox/checkbox.scss @@ -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; } diff --git a/core/src/components/radio/radio.scss b/core/src/components/radio/radio.scss index e583304780..1dc4fe5019 100644 --- a/core/src/components/radio/radio.scss +++ b/core/src/components/radio/radio.scss @@ -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; } diff --git a/core/src/components/range/range.scss b/core/src/components/range/range.scss index fcac4ed634..37cc34802c 100644 --- a/core/src/components/range/range.scss +++ b/core/src/components/range/range.scss @@ -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; } diff --git a/core/src/components/select/select.scss b/core/src/components/select/select.scss index 9d6cf54a83..ef32a43195 100644 --- a/core/src/components/select/select.scss +++ b/core/src/components/select/select.scss @@ -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; } diff --git a/core/src/components/select/test/label/index.html b/core/src/components/select/test/label/index.html index 67e8b428c5..a489e5c5f4 100644 --- a/core/src/components/select/test/label/index.html +++ b/core/src/components/select/test/label/index.html @@ -33,10 +33,6 @@ padding: 0; } } - - ion-select { - width: 100%; - } diff --git a/core/src/components/toggle/toggle.scss b/core/src/components/toggle/toggle.scss index 5ef045f749..bc000d844e 100644 --- a/core/src/components/toggle/toggle.scss +++ b/core/src/components/toggle/toggle.scss @@ -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; }