mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge pull request #3026 from woocommerce/PCP-4125-fix-layout-issues
Fix layout issues (4125)
This commit is contained in:
commit
9e1121a905
66 changed files with 1232 additions and 1102 deletions
|
@ -5,7 +5,6 @@
|
|||
@import './reusable-components/button';
|
||||
@import './reusable-components/elements';
|
||||
@import './reusable-components/fields';
|
||||
@import './reusable-components/hstack';
|
||||
@import './reusable-components/navigation';
|
||||
@import './reusable-components/onboarding-header';
|
||||
@import './reusable-components/payment-method-icons';
|
||||
|
@ -16,6 +15,7 @@
|
|||
@import './reusable-components/settings-toggle-block';
|
||||
@import './reusable-components/settings-wrapper';
|
||||
@import './reusable-components/spinner-overlay';
|
||||
@import './reusable-components/stack';
|
||||
@import './reusable-components/tab-navigation';
|
||||
@import './reusable-components/title-badge';
|
||||
@import './reusable-components/welcome-docs';
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
&--has-image-badge .ppcp-r-title-badge--info {
|
||||
display: block;
|
||||
margin: 6px 0px 0px 0px;
|
||||
margin: 6px 0 0 0;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,9 @@
|
|||
flex-direction: column;
|
||||
|
||||
.ppcp-r-badge-box__title-text:not(:empty) + .ppcp-r-badge-box__title-image-badge {
|
||||
margin: 0px;
|
||||
margin: 0;
|
||||
img:first-of-type {
|
||||
margin: 0px;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ button.components-button, a.components-button {
|
|||
|
||||
/* style the button template */
|
||||
|
||||
text-align: center;
|
||||
|
||||
&:not(:disabled) {
|
||||
@extend %button-style-default;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
.ppcp-r-title-badge {
|
||||
text-transform: none;
|
||||
margin-left: 6px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
.ppcp-r-app {
|
||||
.components-flex {
|
||||
display: flex;
|
||||
-webkit-box-align: stretch;
|
||||
align-items: stretch;
|
||||
-webkit-box-pack: center;
|
||||
|
||||
.components-h-stack {
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
.components-v-stack {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
// Fix layout for checkboxes inside a flex-stack.
|
||||
.components-checkbox-control > .components-base-control__field > .components-flex {
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.ppcp--horizontal {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
gap: 8px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
> img{
|
||||
width: 38px;
|
||||
height: 24px;
|
||||
|
|
|
@ -1,74 +1,80 @@
|
|||
.ppcp-r-settings-block__payment-methods {
|
||||
&.ppcp-r-settings-block {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: row;
|
||||
gap: 16px;
|
||||
// Grid layout.
|
||||
.ppcp-r-settings-block.ppcp--grid > .ppcp--content {
|
||||
--block-separator-gap: 0;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 16px;
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
&__item {
|
||||
@media screen and (max-width: 480px) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
// Theming & visual styles.
|
||||
.ppcp-r-settings-block__payment-methods {
|
||||
.ppcp-r-settings-block {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
width: calc(100% / 3 - 32px / 3);
|
||||
border: 1px solid $color-gray-300;
|
||||
border-radius: var(--container-border-radius);
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
min-height: 200px;
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
width: calc(50% - 8px);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__inner {
|
||||
.ppcp--method-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&__title-wrapper {
|
||||
.ppcp--method-title-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0 8px 0;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
&__description {
|
||||
.ppcp--method-description {
|
||||
p {
|
||||
@include font(13, 20, 400);
|
||||
margin: 0;
|
||||
color: $color-text-tertiary;
|
||||
@include font(13, 20, 400);
|
||||
}
|
||||
|
||||
margin: 0 0 12px 0;
|
||||
}
|
||||
|
||||
&__title {
|
||||
.ppcp--method-title {
|
||||
@include font(13, 20, 500);
|
||||
color: $color-black;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&__settings {
|
||||
line-height: 0;
|
||||
.ppcp--method-settings {
|
||||
padding: 0;
|
||||
transition: 0.2s ease-out transform;
|
||||
transform: rotate(0deg);
|
||||
zoom: 1.005;
|
||||
|
||||
&:hover {
|
||||
transform: rotate(45deg);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.ppcp--method-icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
button.is-secondary {
|
||||
@include small-button;
|
||||
}
|
||||
|
||||
&__footer {
|
||||
.ppcp--method-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
.ppcp-r-select-box-wrapper {
|
||||
--box-border-color: var(--color-gray-200);
|
||||
--box-outline-color: transparent;
|
||||
--box-shadow: 0;
|
||||
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
|
@ -6,92 +10,62 @@
|
|||
}
|
||||
|
||||
.ppcp-r-select-box {
|
||||
border: 1px solid var(--box-border-color);
|
||||
outline: 1px solid var(--box-outline-color);
|
||||
box-shadow: var(--box-shadow);
|
||||
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border: 1px solid $color-gray-200;
|
||||
outline: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
padding: 24px 16px 24px 16px;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
--box-border-color: var(--color-gray-500);
|
||||
--box-shadow: var(--box-shadow-active-item);
|
||||
}
|
||||
|
||||
&.ppcp--selected {
|
||||
border-color: $color-blueberry;
|
||||
outline-color: $color-blueberry;
|
||||
box-shadow: $shadow-selection-box;
|
||||
--box-border-color: var(--color-blueberry);
|
||||
--box-outline-color: var(--color-blueberry);
|
||||
--box-shadow: var(--box-shadow-active-item);
|
||||
}
|
||||
|
||||
&__radio-value {
|
||||
@include hide-input-field;
|
||||
|
||||
&:checked {
|
||||
+ .ppcp-r-select-box__radio-presentation {
|
||||
background: $color-white;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 6px solid $color-blueberry;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__checkbox-value {
|
||||
@include hide-input-field;
|
||||
|
||||
&:not(:checked) + .ppcp-r-select-box__checkbox-presentation img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:checked {
|
||||
+ .ppcp-r-select-box__checkbox-presentation {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: none;
|
||||
|
||||
img {
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__content {
|
||||
.ppcp--box-content {
|
||||
display: flex;
|
||||
position: relative;
|
||||
pointer-events: none;
|
||||
*:not(a){
|
||||
|
||||
*:not(a) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
a {
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
.ppcp--box-title {
|
||||
@include font(14, 20, 700);
|
||||
color: $color-black;
|
||||
margin: 0 0 4px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&__description {
|
||||
.ppcp--box-description {
|
||||
@include font(13, 20, 400);
|
||||
color: $color-gray-700;
|
||||
margin:0;
|
||||
margin: 0;
|
||||
|
||||
&:not(:last-child){
|
||||
margin-block-end:18px;
|
||||
&:not(:last-child) {
|
||||
margin-block-end: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
&__radio-presentation {
|
||||
@include fake-input-field(20px);
|
||||
}
|
||||
|
||||
&__checkbox-presentation {
|
||||
@include fake-input-field(2px);
|
||||
}
|
||||
&__additional-content{
|
||||
.ppcp--box-details {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
@ -99,15 +73,18 @@
|
|||
@media screen and (max-width: 480px) {
|
||||
gap: 16px;
|
||||
padding: 18px 16px;
|
||||
&__description {
|
||||
|
||||
.ppcp--box-description {
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
&__content {
|
||||
|
||||
.ppcp--box-content {
|
||||
gap: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 380px) {
|
||||
&__content > img {
|
||||
.ppcp--box-content > img {
|
||||
max-width: 32px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
// Configuration for this module.
|
||||
$width_container: 938px;
|
||||
$width_header: 280px;
|
||||
$width_gap: 24px;
|
||||
|
||||
/*
|
||||
Styles the `SettingsCard` layout component.
|
||||
|
||||
|
@ -14,9 +19,9 @@
|
|||
--card-layout: block;
|
||||
|
||||
@media screen and (min-width: 960px) {
|
||||
--card-width-header: 280px;
|
||||
--card-width-content: 610px;
|
||||
--card-gap: 48px;
|
||||
--card-width-header: #{$width_header};
|
||||
--card-width-content: #{$width_container - $width_header - $width_gap};
|
||||
--card-gap: #{$width_gap};
|
||||
--card-layout: flex;
|
||||
}
|
||||
|
||||
|
@ -46,6 +51,7 @@
|
|||
&.ppcp--is-card {
|
||||
max-width: var(--card-width-content);
|
||||
border: 1px solid var(--color-gray-200);
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
padding: 24px;
|
||||
}
|
||||
|
|
|
@ -1,28 +1,26 @@
|
|||
.ppcp-r {
|
||||
&-container {
|
||||
max-width: var(--max-container-width, none);
|
||||
margin-right: auto;
|
||||
}
|
||||
.ppcp-r-container {
|
||||
max-width: var(--max-container-width, none);
|
||||
margin: 0 auto 0 35px;
|
||||
}
|
||||
|
||||
&-inner-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 0 16px 48px;
|
||||
box-sizing: content-box;
|
||||
.ppcp-r-inner-container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 0 16px 48px;
|
||||
box-sizing: content-box;
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
padding-bottom: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
&-settings {
|
||||
> * {
|
||||
margin-bottom: $card-vertical-gap;
|
||||
}
|
||||
|
||||
> *:not(:last-child) {
|
||||
padding-bottom: $card-vertical-gap;
|
||||
border-bottom: 1px solid $color-gray-200;
|
||||
}
|
||||
@media screen and (max-width: 480px) {
|
||||
padding-bottom: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.ppcp-r-settings {
|
||||
> * {
|
||||
margin-bottom: $card-vertical-gap;
|
||||
}
|
||||
|
||||
> *:not(:last-child) {
|
||||
padding-bottom: $card-vertical-gap;
|
||||
border-bottom: 1px solid $color-gray-200;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
.ppcp-r-spinner-overlay {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
width: var(--spinner-overlay-width);
|
||||
height: var(--spinner-overlay-height);
|
||||
box-shadow: var(--spinner-overlay-box-shadow);
|
||||
background: var(--spinner-overlay-color);
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 10;
|
||||
|
||||
.components-spinner {
|
||||
position: absolute;
|
||||
|
@ -13,5 +15,15 @@
|
|||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: 0;
|
||||
width: var(--spinner-size);
|
||||
height: var(--spinner-size);
|
||||
}
|
||||
|
||||
.ppcp--spinner-message {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
top: calc(50% + 20px + var(--spinner-size));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
.ppcp-r-app {
|
||||
.components-flex {
|
||||
display: flex;
|
||||
-webkit-box-align: stretch;
|
||||
align-items: stretch;
|
||||
-webkit-box-pack: center;
|
||||
}
|
||||
|
||||
.components-flex.components-h-stack,
|
||||
.ppcp--horizontal {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ppcp--horizontal {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.components-flex.components-v-stack {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
max-width: var(--max-container-width);
|
||||
transition: max-width 0.2s;
|
||||
padding:0 35px;
|
||||
|
||||
.components-tab-panel__tabs {
|
||||
box-shadow: 0 -1px 0 0 $color-gray-400 inset;
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
.ppcp-r-title-badge{
|
||||
.ppcp-r-title-badge {
|
||||
--badge-bg-color: #F5F5F5;
|
||||
--badge-text-color: #2F2F2F;
|
||||
|
||||
color: var(--badge-text-color);
|
||||
background-color: var(--badge-bg-color);
|
||||
|
||||
@include font(12, 16, 400);
|
||||
padding: 4px 8px;
|
||||
border-radius: 2px;
|
||||
white-space: nowrap;
|
||||
&--positive{
|
||||
color: #144722;
|
||||
background-color: #DAFFE0;
|
||||
|
||||
&.ppcp-r-title-badge--positive {
|
||||
--badge-bg-color: #DAFFE0;
|
||||
--badge-text-color: #144722;
|
||||
}
|
||||
&--negative{
|
||||
color:#5c0000;
|
||||
background-color: #faeded;
|
||||
}
|
||||
&--info{
|
||||
color: #2F2F2F;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
&.ppcp-r-title-badge--negative {
|
||||
--badge-bg-color: #faeded;
|
||||
--badge-text-color: #5c0000;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
.ppcp-r-container--onboarding {
|
||||
--max-container-width: var(--max-width-onboarding);
|
||||
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
.ppcp-r-inner-container {
|
||||
max-width: var(--max-width-onboarding-content);
|
||||
}
|
||||
|
|
|
@ -86,33 +86,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
.ppcp-r-feature-item {
|
||||
padding-top: 32px;
|
||||
border-top: 1px solid $color-gray-400;
|
||||
.ppcp-r-tab-overview-features {
|
||||
--block-header-gap: 12px;
|
||||
}
|
||||
|
||||
&__title {
|
||||
@include font(16, 20, 600);
|
||||
color: $color-black;
|
||||
display: block;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
.ppcp-r-tab-overview-help {
|
||||
--block-header-gap: 8px;
|
||||
}
|
||||
|
||||
&__description {
|
||||
@include font(14, 20, 400);
|
||||
color: $color-gray-800;
|
||||
margin: 0 0 18px 0;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
&__buttons {
|
||||
.ppcp-r-settings-block__feature {
|
||||
.ppcp--action-buttons {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
|
||||
.components-button.is-tertiary {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__notes {
|
||||
.ppcp--item-notes {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
|
|
@ -5,3 +5,20 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
// Fix the checkbox layout (add gap between checkbox and label).
|
||||
.components-checkbox-control > .components-base-control__field > .components-flex {
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
// Fix layout for radio groups inside a horizontal flex-stack.
|
||||
.components-flex.components-h-stack > .components-radio-control {
|
||||
width: 100%;
|
||||
|
||||
.components-radio-control__group-wrapper {
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.ppcp-r-paylater-configurator {
|
||||
display: flex;
|
||||
border: 1px solid var(--color-separators);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--container-border-radius);
|
||||
overflow: hidden;
|
||||
font-family: "PayPalPro", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
|
|
@ -7,3 +7,25 @@
|
|||
--block-header-gap: 0;
|
||||
--block-separator-size: 0;
|
||||
}
|
||||
|
||||
.ppcp--webhooks {
|
||||
.ppcp--webhook-list li {
|
||||
list-style: none;
|
||||
|
||||
&::before {
|
||||
content: '✔︎';
|
||||
opacity: 0.35;
|
||||
font-size: 0.75em;
|
||||
line-height: 1.35;
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ppcp--webhook-resubscribe,
|
||||
.ppcp--webhook-simulation {
|
||||
.ppcp--action .components-button {
|
||||
min-width: 160px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
display: flex;
|
||||
border: 1px solid var(--color-separators);
|
||||
border-radius: 8px;
|
||||
border-radius: var(--container-border-radius);
|
||||
|
||||
.ppcp-r-settings-block {
|
||||
&.header-section {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue