2020-06-15 11:39:46 +00:00
|
|
|
$border-width: 1px;
|
2020-06-23 10:13:53 +00:00
|
|
|
$border-radius: 5px;
|
2020-06-15 11:39:46 +00:00
|
|
|
|
2020-06-05 12:18:16 +00:00
|
|
|
.wc-block-components-express-checkout {
|
2020-01-06 22:28:09 +00:00
|
|
|
margin: auto;
|
2020-06-05 10:00:19 +00:00
|
|
|
position: relative;
|
2020-01-06 22:28:09 +00:00
|
|
|
|
2020-06-15 11:39:46 +00:00
|
|
|
.wc-block-components-express-checkout__title-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
left: 0;
|
2020-06-05 10:00:19 +00:00
|
|
|
position: absolute;
|
2020-06-15 11:39:46 +00:00
|
|
|
right: 0;
|
2020-06-23 10:13:53 +00:00
|
|
|
top: -$border-radius;
|
2020-06-15 11:39:46 +00:00
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
// Pseudo-elements used to show the border before and after the title.
|
|
|
|
&::before {
|
2020-06-23 10:13:53 +00:00
|
|
|
border-left: $border-width solid currentColor;
|
|
|
|
border-top: $border-width solid currentColor;
|
|
|
|
border-radius: $border-radius 0 0 0;
|
2020-06-15 11:39:46 +00:00
|
|
|
content: "";
|
|
|
|
display: block;
|
2020-06-23 10:13:53 +00:00
|
|
|
height: $border-radius - $border-width;
|
2020-06-15 11:39:46 +00:00
|
|
|
margin-right: $gap-small;
|
2020-06-23 10:13:53 +00:00
|
|
|
opacity: 0.3;
|
2020-06-15 11:39:46 +00:00
|
|
|
pointer-events: none;
|
|
|
|
width: #{$gap-larger - $gap-small - $border-width * 2};
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
2020-06-23 10:13:53 +00:00
|
|
|
border-right: $border-width solid currentColor;
|
|
|
|
border-top: $border-width solid currentColor;
|
|
|
|
border-radius: 0 $border-radius 0 0;
|
2020-06-15 11:39:46 +00:00
|
|
|
content: "";
|
|
|
|
display: block;
|
2020-06-23 10:13:53 +00:00
|
|
|
height: $border-radius - $border-width;
|
2020-06-15 11:39:46 +00:00
|
|
|
margin-left: $gap-small;
|
2020-06-23 10:13:53 +00:00
|
|
|
opacity: 0.3;
|
2020-06-15 11:39:46 +00:00
|
|
|
pointer-events: none;
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-components-express-checkout__title {
|
|
|
|
flex-grow: 0;
|
|
|
|
transform: translateY(-50%);
|
2020-01-06 22:28:09 +00:00
|
|
|
}
|
|
|
|
|
2020-06-05 12:18:16 +00:00
|
|
|
.wc-block-components-express-checkout__content {
|
2020-06-23 10:13:53 +00:00
|
|
|
@include with-translucent-border(0 $border-width $border-width);
|
|
|
|
margin-top: calc(0.75em + #{$border-radius});
|
2020-06-15 11:39:46 +00:00
|
|
|
padding: em($gap-large) #{$gap-larger - $border-width} em($gap) #{$gap-larger - $border-width};
|
|
|
|
|
2020-06-23 10:13:53 +00:00
|
|
|
&::after {
|
|
|
|
border-radius: 0 0 $border-radius $border-radius;
|
|
|
|
}
|
|
|
|
|
2020-06-15 11:39:46 +00:00
|
|
|
> p {
|
|
|
|
margin-bottom: em($gap);
|
|
|
|
}
|
2020-01-06 22:28:09 +00:00
|
|
|
}
|
|
|
|
|
2020-06-05 12:18:16 +00:00
|
|
|
.wc-block-components-express-checkout-payment-event-buttons {
|
2020-01-06 22:28:09 +00:00
|
|
|
list-style: none;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
width: 100%;
|
|
|
|
padding: 0;
|
2020-06-15 11:39:46 +00:00
|
|
|
margin: 0;
|
2020-03-09 15:49:01 +00:00
|
|
|
overflow: hidden;
|
2020-01-06 22:28:09 +00:00
|
|
|
> li {
|
|
|
|
display: inline-block;
|
2020-06-15 11:39:46 +00:00
|
|
|
margin: 0;
|
2020-01-06 22:28:09 +00:00
|
|
|
width: 50%;
|
2020-03-09 15:49:01 +00:00
|
|
|
> img {
|
|
|
|
width: 100%;
|
2020-03-30 12:07:49 +00:00
|
|
|
height: 48px;
|
2020-03-09 15:49:01 +00:00
|
|
|
}
|
2020-01-06 22:28:09 +00:00
|
|
|
}
|
2020-03-09 15:49:01 +00:00
|
|
|
> li:nth-child(even) {
|
|
|
|
padding-left: $gap-smaller;
|
|
|
|
}
|
|
|
|
> li:nth-child(odd) {
|
|
|
|
padding-right: $gap-smaller;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-30 12:07:49 +00:00
|
|
|
|
|
|
|
.wc-block-card-elements {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-container {
|
|
|
|
position: relative;
|
2020-06-08 10:55:10 +00:00
|
|
|
margin-bottom: em($gap-large);
|
2020-03-30 12:07:49 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
&.wc-card-number-element {
|
|
|
|
flex: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.wc-card-expiry-element,
|
|
|
|
&.wc-card-cvc-element {
|
|
|
|
width: $card-element-width;
|
|
|
|
margin-left: $gap-small;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-input {
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(regular);
|
|
|
|
line-height: 1.375; // =22px when font-size is 16px.
|
2020-03-30 12:07:49 +00:00
|
|
|
background-color: #fff;
|
2020-05-29 10:16:33 +00:00
|
|
|
padding: em($gap-small) $gap;
|
2020-03-30 12:07:49 +00:00
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid $input-border-gray;
|
|
|
|
width: 100%;
|
|
|
|
font-family: inherit;
|
|
|
|
margin: 0;
|
|
|
|
box-sizing: border-box;
|
2020-04-30 10:18:12 +00:00
|
|
|
height: 3em;
|
2020-03-30 12:07:49 +00:00
|
|
|
color: $input-text-active;
|
2020-06-08 10:55:10 +00:00
|
|
|
cursor: text;
|
2020-03-30 12:07:49 +00:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #fff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: #fff;
|
|
|
|
}
|
|
|
|
|
|
|
|
label {
|
2020-05-14 09:07:21 +00:00
|
|
|
@include reset-typography();
|
2020-05-29 10:16:33 +00:00
|
|
|
@include font-size(regular);
|
|
|
|
line-height: 1.375; // =22px when font-size is 16px.
|
2020-03-30 12:07:49 +00:00
|
|
|
position: absolute;
|
2020-04-30 10:18:12 +00:00
|
|
|
transform: translateY(0.75em);
|
2020-03-30 12:07:49 +00:00
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
transform-origin: top left;
|
|
|
|
color: $gray-50;
|
|
|
|
transition: transform 200ms ease;
|
2020-05-20 13:54:37 +00:00
|
|
|
margin: 0 0 0 #{$gap + 1px};
|
2020-03-30 12:07:49 +00:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
max-width: calc(100% - #{2 * $gap});
|
2020-06-08 10:55:10 +00:00
|
|
|
cursor: text;
|
2020-03-30 12:07:49 +00:00
|
|
|
|
|
|
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
|
|
transition: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.wc-inline-card-element {
|
|
|
|
label {
|
|
|
|
margin-left: $gap-largest;
|
|
|
|
}
|
|
|
|
.wc-block-gateway-input.focused.empty,
|
|
|
|
.wc-block-gateway-input:not(.empty) {
|
|
|
|
& + label {
|
|
|
|
margin-left: $gap;
|
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
|
|
|
}
|
|
|
|
}
|
2020-06-17 09:53:42 +00:00
|
|
|
& + .wc-block-components-validation-error {
|
2020-03-30 12:07:49 +00:00
|
|
|
position: static;
|
|
|
|
margin-top: -$gap-large;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-input.focused.empty,
|
|
|
|
.wc-block-gateway-input:not(.empty) {
|
2020-05-29 10:16:33 +00:00
|
|
|
padding: em($gap-large) $gap em($gap-smallest);
|
2020-03-30 12:07:49 +00:00
|
|
|
& + label {
|
|
|
|
transform: translateY(#{$gap-smallest}) scale(0.75);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-input.has-error {
|
|
|
|
border-color: $error-red;
|
|
|
|
&:focus {
|
|
|
|
outline-color: $error-red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-input.has-error + label {
|
|
|
|
color: $error-red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-08 10:55:10 +00:00
|
|
|
// These elements have available space below, so we can display errors with a
|
|
|
|
// larger line height.
|
|
|
|
.is-medium,
|
|
|
|
.is-large {
|
|
|
|
.wc-card-expiry-element,
|
|
|
|
.wc-card-cvc-element {
|
2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-validation-error > p {
|
2020-06-08 10:55:10 +00:00
|
|
|
line-height: 16px;
|
|
|
|
padding-top: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.is-mobile,
|
|
|
|
.is-small {
|
|
|
|
.wc-card-expiry-element,
|
|
|
|
.wc-card-cvc-element {
|
2020-06-17 09:53:42 +00:00
|
|
|
.wc-block-components-validation-error > p {
|
2020-06-08 10:55:10 +00:00
|
|
|
min-height: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-30 12:07:49 +00:00
|
|
|
.wc-blocks-credit-card-images {
|
|
|
|
padding-top: $gap-small;
|
2020-04-09 19:31:03 +00:00
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.wc-blocks-credit-cart-icon {
|
|
|
|
height: 18px;
|
|
|
|
width: auto;
|
|
|
|
margin-right: $gap-small;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
2020-03-30 12:07:49 +00:00
|
|
|
}
|
2020-04-06 15:35:09 +00:00
|
|
|
|
|
|
|
.wc-block-components-checkout-payment-methods * {
|
|
|
|
pointer-events: all; // Overrides parent disabled component in editor context
|
|
|
|
}
|
2020-04-24 12:23:25 +00:00
|
|
|
|
|
|
|
@include breakpoint( "<782px" ) {
|
|
|
|
.wc-block-card-elements {
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-container.wc-card-number-element {
|
|
|
|
flex-basis: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-container.wc-card-expiry-element {
|
|
|
|
flex-basis: calc(50% - #{$gap-smaller});
|
|
|
|
margin-left: 0;
|
|
|
|
margin-right: $gap-smaller;
|
|
|
|
}
|
|
|
|
|
|
|
|
.wc-block-gateway-container.wc-card-cvc-element {
|
|
|
|
flex-basis: calc(50% - #{$gap-smaller});
|
|
|
|
margin-left: $gap-smaller;
|
|
|
|
}
|
|
|
|
}
|
2020-06-05 10:00:19 +00:00
|
|
|
|
2020-06-15 11:39:46 +00:00
|
|
|
.theme-twentynineteen {
|
|
|
|
.wc-block-components-express-checkout__title::before {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-05 10:00:19 +00:00
|
|
|
// For Twenty Twenty we need to increase specificity of the title.
|
|
|
|
.theme-twentytwenty {
|
2020-06-05 12:18:16 +00:00
|
|
|
.wc-block-components-express-checkout .wc-block-components-express-checkout__title {
|
2020-06-05 10:00:19 +00:00
|
|
|
padding-left: $gap-small;
|
|
|
|
padding-right: $gap-small;
|
|
|
|
}
|
|
|
|
}
|