mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
💄 Improve UX and SCSS code
This commit is contained in:
parent
2112769de9
commit
f7f140875d
1 changed files with 25 additions and 8 deletions
|
@ -1,18 +1,30 @@
|
|||
$width-settings-panel: 422px;
|
||||
|
||||
.ppcp-r-styling {
|
||||
--block-item-gap: 0;
|
||||
--block-separator-gap: 24px;
|
||||
--block-header-gap: 18px;
|
||||
--panel-width: 422px;
|
||||
--sticky-offset-top: 92px; // 32px admin-bar + 60px TopNavigation height
|
||||
--preview-height-reduction: 236px; // 32px admin-bar + 60px TopNavigation height + 48px TopNavigation margin + 48px TabList height + 48px TabList margin
|
||||
|
||||
display: flex;
|
||||
border: 1px solid var(--color-separators);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
|
||||
.ppcp-r-settings-block {
|
||||
&.header-section {
|
||||
margin-bottom: 22px
|
||||
margin-bottom: 6px
|
||||
}
|
||||
|
||||
&.location-selector {
|
||||
position: sticky;
|
||||
top: var(--sticky-offset-top);
|
||||
background: var(--ppcp-color-app-bg);
|
||||
border-bottom: 1px solid var(--color-gray-200);
|
||||
box-shadow: 0 5px 10px 5px var(--ppcp-color-app-bg);
|
||||
z-index: 5;
|
||||
padding-top: 16px;
|
||||
padding-bottom: var(--block-separator-gap);
|
||||
margin-bottom: -29px;
|
||||
}
|
||||
|
||||
// Select-fields have a smaller gap between the header and input field.
|
||||
|
@ -28,7 +40,7 @@ $width-settings-panel: 422px;
|
|||
|
||||
/* The settings-panel (left side) */
|
||||
.settings-panel {
|
||||
width: $width-settings-panel;
|
||||
width: var(--panel-width);
|
||||
padding: 48px;
|
||||
|
||||
.ppcp-r-styling__section {
|
||||
|
@ -52,14 +64,19 @@ $width-settings-panel: 422px;
|
|||
|
||||
/* The preview area (right side) */
|
||||
.preview-panel {
|
||||
width: calc(100% - $width-settings-panel);
|
||||
width: calc(100% - var(--panel-width));
|
||||
background-color: var(--color-preview-background);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
z-index: 0;
|
||||
|
||||
.preview-panel-inner {
|
||||
position: sticky;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
height: calc(100vh - var(--preview-height-reduction));
|
||||
top: var(--sticky-offset-top);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue