From 4d24b328e2021f0d14b278df7535c9bdb9851952 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 24 Jan 2023 15:21:33 -0500 Subject: [PATCH] fix(select): modern component takes up full line (#26670) --- core/src/components/select/select.ios.scss | 2 ++ core/src/components/select/select.md.scss | 2 ++ core/src/components/select/select.scss | 13 ++++++++----- core/src/components/select/select.tsx | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/core/src/components/select/select.ios.scss b/core/src/components/select/select.ios.scss index fa54e598cc..9697b10bfb 100644 --- a/core/src/components/select/select.ios.scss +++ b/core/src/components/select/select.ios.scss @@ -4,6 +4,7 @@ // iOS Select // -------------------------------------------------- +// TODO FW-3194 - Remove this :host(.legacy-select) { --padding-top: #{$select-ios-padding-top}; --padding-end: #{$select-ios-padding-end}; @@ -11,6 +12,7 @@ --padding-start: #{$select-ios-padding-start}; } +// TODO FW-3194 - Move this to host :host(:not(.legacy-select)) { min-height: 44px; } diff --git a/core/src/components/select/select.md.scss b/core/src/components/select/select.md.scss index b7aba1588a..a6eae99887 100644 --- a/core/src/components/select/select.md.scss +++ b/core/src/components/select/select.md.scss @@ -11,6 +11,7 @@ --border-color: #{$item-md-border-color}; } +// TODO FW-3194 - Remove this :host(.legacy-select) { --padding-top: #{$select-md-padding-top}; --padding-end: #{$select-md-padding-end}; @@ -18,6 +19,7 @@ --padding-start: #{$select-md-padding-start}; } +// TODO FW-3194 - Move this to host :host(:not(.legacy-select)) { min-height: 56px; } diff --git a/core/src/components/select/select.scss b/core/src/components/select/select.scss index 4e5cd5ce51..6b52c14b39 100644 --- a/core/src/components/select/select.scss +++ b/core/src/components/select/select.scss @@ -55,10 +55,16 @@ z-index: $z-index-item-input; } +// TODO FW-3194 - Move this to host +:host(:not(.legacy-select)) { + width: 100%; +} + :host(.ion-color) { --highlight-color-focused: #{current-color(base)}; } +// TODO FW-3194 - Remove this :host(.legacy-select) { @include padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start)); @@ -71,17 +77,13 @@ // Select Used in ion-item // -------------------------------------------------- +// TODO FW-3194 - Remove this :host(.in-item.legacy-select) { position: static; max-width: 45%; } -:host(.in-item:not(.legacy-select)) { - width: 100%; - height: 100%; -} - :host(.select-disabled) { opacity: .4; pointer-events: none; @@ -97,6 +99,7 @@ opacity: var(--placeholder-opacity); } +// TODO FW-3194 - Remove this :host(.legacy-select) label { @include input-cover(); diff --git a/core/src/components/select/select.tsx b/core/src/components/select/select.tsx index c5045ccadc..101e7ea8e4 100644 --- a/core/src/components/select/select.tsx +++ b/core/src/components/select/select.tsx @@ -751,6 +751,7 @@ export class Select implements ComponentInterface { ); } + // TODO FW-3194 - Remove this private renderLegacySelect() { if (!this.hasLoggedDeprecationWarning) { printIonWarning(