woocommerce-paypal-payments/modules/ppcp-settings/resources/css/components/screens/settings/_tab-styling.scss
2025-02-14 17:01:18 +01:00

96 lines
2.2 KiB
SCSS

.ppcp-r-styling {
--block-item-gap: 0;
--block-separator-gap: 24px;
--block-header-gap: 18px;
--panel-width: 422px;
--sticky-offset-top: 132px; // 32px admin-bar + 100px TopNavigation height
--preview-height-reduction: 276px; // 32px admin-bar + 100px TopNavigation height + 48px TopNavigation margin + 48px TabList height + 48px TabList margin
display: flex;
border: 1px solid var(--color-separators);
border-radius: var(--container-border-radius);
.ppcp-r-settings-block {
&.header-section {
margin-bottom: 6px
}
&.location-selector {
position: sticky;
top: var(--sticky-offset-top);
background: var(--ppcp-color-app-bg);
z-index: 5;
padding: 16px 10px 8px;
margin: 0 -10px -8px;
.section-content {
display: flex;
& > .components-base-control:first-of-type {
width: 100%;
}
}
}
// Select-fields have a smaller gap between the header and input field.
&.ppcp--has-select {
--block-header-gap: 8px;
}
// Above the payment methods is a slightly larger gap.
&.payment-methods {
--block-separator-gap: 28px;
}
// It has no header; adjusts the gap to the control right above the tagline.
&.tagline {
--block-header-gap: 24px;
}
}
/* The settings-panel (left side) */
.settings-panel {
width: var(--panel-width);
padding: 48px;
.ppcp-r-styling__section {
padding-bottom: 24px;
margin-bottom: 28px;
border-bottom: 1px solid var(--color-separators);
&.ppcp--no-gap,
&:last-child {
padding-bottom: 0;
margin-bottom: 0;
border-bottom-style: none;
}
}
// Horizontal radio buttons have a width of 100px.
.components-radio-control__option {
min-width: 100px;
}
}
/* The preview area (right side) */
.preview-panel {
width: calc(100% - var(--panel-width));
background-color: var(--color-preview-background);
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);
// Disable interactions with the preview.
pointer-events: none;
user-select: none;
}
}
}