Skip to content

Commit

Permalink
fix(addon-commerce): InputCardGroup fix for older Safari (#9134)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlufy authored Sep 24, 2024
1 parent d48bb48 commit 009f5f9
Showing 1 changed file with 37 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -41,16 +43,28 @@
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;
}
}

&_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 {
Expand All @@ -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;
}
}
}
}

Expand Down Expand Up @@ -106,7 +127,8 @@

.t-input {
.textfield-input();
.transition(background);
.transition(~'background, padding');

border: 0;
padding: 0 1rem;

Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}

0 comments on commit 009f5f9

Please sign in to comment.