diff --git a/core/src/components/input/input.md.outline.scss b/core/src/components/input/input.md.outline.scss index d9e3ee34d35..1345fb3ca39 100644 --- a/core/src/components/input/input.md.outline.scss +++ b/core/src/components/input/input.md.outline.scss @@ -60,8 +60,8 @@ border-bottom: none; } -:host(.input-fill-outline.input-label-placement-stacked) label, -:host(.input-fill-outline.input-label-placement-floating) label { +:host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper, +:host(.input-fill-outline.input-label-placement-floating) .label-text-wrapper { @include transform-origin(center, top); } @@ -69,8 +69,8 @@ * The label should appear on top of an outline * container that overlaps it so it is always clickable. */ -:host(.input-fill-outline) label, -:host(.input-fill-outline) label { +:host(.input-fill-outline) .label-text-wrapper, +:host(.input-fill-outline) .label-text-wrapper { position: relative; z-index: 1; @@ -79,10 +79,10 @@ /** * This makes the label sit above the input. */ -:host(.has-focus.input-fill-outline.input-label-placement-floating) label, -:host(.has-value.input-fill-outline.input-label-placement-floating) label, -:host(.input-fill-outline.input-label-placement-stacked) label, -:host(.input-fill-outline.input-label-placement-stacked) label { +:host(.has-focus.input-fill-outline.input-label-placement-floating) .label-text-wrapper, +:host(.has-value.input-fill-outline.input-label-placement-floating) .label-text-wrapper, +:host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper, +:host(.input-fill-outline.input-label-placement-stacked) .label-text-wrapper { @include transform(translateY(-32%), scale(.75)); @include margin(0); } diff --git a/core/src/components/input/input.md.scss b/core/src/components/input/input.md.scss index 3df60a4a1bc..b604cbfa202 100644 --- a/core/src/components/input/input.md.scss +++ b/core/src/components/input/input.md.scss @@ -77,12 +77,12 @@ * When the input is focused the label should * take on the highlight color. */ -:host(.has-focus) label { +:host(.has-focus) .label-text-wrapper { color: var(--highlight-color); } -:host(.ion-touched.ion-valid) label, -:host(.ion-touched.ion-invalid) label { +:host(.ion-touched.ion-valid) .label-text-wrapper, +:host(.ion-touched.ion-invalid) .label-text-wrapper { color: var(--highlight-color); } diff --git a/core/src/components/input/input.scss b/core/src/components/input/input.scss index 689dae558c9..81cd317dda8 100644 --- a/core/src/components/input/input.scss +++ b/core/src/components/input/input.scss @@ -392,7 +392,7 @@ // Input Label // ---------------------------------------------------------------- -.input-wrapper label { +.label-text-wrapper { /** * The margin between the label and * the input should be on the end @@ -410,6 +410,34 @@ align-items: center; transition: color 150ms cubic-bezier(.4, 0, .2, 1), transform 150ms cubic-bezier(.4, 0, .2, 1); + + /** + * This ensures that double tapping this text + * clicks the