From 009f5f9c0d4f35335e368b1256e3588757ecc63c Mon Sep 17 00:00:00 2001 From: German Panov Date: Tue, 24 Sep 2024 10:12:36 +0300 Subject: [PATCH] fix(addon-commerce): `InputCardGroup` fix for older Safari (#9134) --- .../input-card-grouped.style.less | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/projects/addon-commerce/components/input-card-grouped/input-card-grouped.style.less b/projects/addon-commerce/components/input-card-grouped/input-card-grouped.style.less index 792a995d16a0..74ae97d24514 100644 --- a/projects/addon-commerce/components/input-card-grouped/input-card-grouped.style.less +++ b/projects/addon-commerce/components/input-card-grouped/input-card-grouped.style.less @@ -12,6 +12,8 @@ height: var(--tui-height-l); width: @width-full; border-radius: var(--tui-radius-m); + overflow: hidden; + isolation: isolate; &[data-mode='onDark'] { --tui-autofill: var(--tui-autofill-night); @@ -41,8 +43,9 @@ height: 100%; &_cvc { + inline-size: 50%; margin-left: @offset-full; - transform: translate3d(100%, 0, 0); + transform: translate3d(200%, 0, 0); :host-context(tui-root._mobile) & { margin-left: @offset-small; @@ -50,7 +53,18 @@ } &_expire { - transform: translate3d(100%, 0, 0); + inline-size: 50%; + transform: translate3d(@wrapper-offset-full, 0, 0); + + :host-context(tui-root._mobile) & { + transform: translate3d(@wrapper-offset-small, 0, 0); + } + + .t-placeholder, + .t-input { + margin-inline-start: 0; + padding-inline-start: 100% !important; + } } &_active { @@ -59,6 +73,13 @@ :host-context(tui-root._mobile) & { transform: translate3d(@wrapper-offset-small, 0, 0); } + + &.t-wrapper_expire { + .t-placeholder, + .t-input { + padding-inline-start: var(--tui-padding-l) !important; + } + } } } @@ -106,7 +127,8 @@ .t-input { .textfield-input(); - .transition(background); + .transition(~'background, padding'); + border: 0; padding: 0 1rem; @@ -128,12 +150,19 @@ caret-color: var(--tui-base-09); color: transparent !important; -webkit-text-fill-color: transparent !important; + transition: + background-color 600000s 0s, + padding var(--tui-duration) ease-in-out; } //noinspection CssInvalidPseudoSelector &::-webkit-credit-card-auto-fill-button { .webkit-auto-fill-button-hidden(); } + + &:focus { + z-index: 1; + } } &_inert { @@ -170,8 +199,13 @@ .textfield-placeholder(); margin: 1.125rem 1rem; line-height: 1.25rem; + width: auto; } .t-ghost { visibility: hidden; } + +tui-svg { + z-index: 1; +}