woocommerce-paypal-payments/modules/ppcp-settings/resources/css/components/reusable-components/_navigation.scss
2025-02-07 16:50:46 +01:00

164 lines
3.1 KiB
SCSS

$margin_bottom: 48px;
.ppcp-r-navigation-container {
// Theming.
--wp-components-color-accent: #{$color-blueberry};
--color-text: #{$color-gray-900};
--color-disabled: #CCC;
--navbar-height: 40px;
--navbar-vertical-padding: 10px;
--subnavigation-height: 40px;
// Styling.
position: sticky;
top: var(--wp-admin--admin-bar--height);
z-index: 10;
padding: 0 48px;
margin: 0 -20px #{$margin_bottom} -20px;
box-shadow: 0 -1px 0 0 $color-gray-300 inset;
background: var(--ppcp-color-app-bg);
transition: box-shadow 0.3s;
.ppcp-r-navigation {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
height: calc(var(--navbar-height) + (2 * var(--navbar-vertical-padding)));
padding: var(--navbar-vertical-padding) 0;
.components-button {
@include font(13, 20, 400);
&.is-primary {
background-color: var(--wp-components-color-accent);
padding: 10px 16px;
justify-content: center;
margin: 0 0 0 12px;
border-radius: 2px;
&:disabled {
background-color: var(--color-disabled);
}
}
&.is-link {
color: var(--wp-components-color-accent);
text-decoration: none;
&:disabled {
color: var(--color-disabled);
}
}
&.is-title {
@include font(16, 24, 600);
color: var(--color-text);
.ppcp--nav-title {
margin-left: 18px;
}
.ppcp--big {
@include font(20, 28, 400);
}
}
}
}
.ppcp-r-navigation--left {
align-items: center;
display: inline-flex;
}
.ppcp-r-navigation--right {
.is-link {
padding: 10px 16px;
}
}
.ppcp-r-navigation--progress-bar {
position: absolute;
bottom: 0;
left: 0;
background-color: var(--wp-components-color-accent);
height: 4px;
transition: width 0.3s;
}
&.ppcp--is-scrolled {
box-shadow: 0 -1px 0 0 $color-gray-300 inset, 0 8px 8px 0 rgba(85, 93, 102, .3);
}
.ppcp--top-sub-navigation {
height: var(--subnavigation-height);
margin: 0;
padding: 0;
.ppcp-r-tabs {
margin: 0;
}
.components-tab-panel__tabs-item {
height: var(--subnavigation-height);
}
}
@media screen and (max-width: 782px) {
padding: 10px 12px;
.ppcp-r-navigation {
row-gap: 8px;
white-space: nowrap;
.ppcp-r-navigation--right {
position: absolute;
right: 10px;
z-index: 10;
background: var(--ppcp-color-app-bg);
box-shadow: -5px 0 8px var(--ppcp-color-app-bg);
}
.ppcp-r-navigation--progress-bar {
height: 2px;
}
.components-button.is-title {
.ppcp--title {
margin-left: 4px;
}
}
}
}
.ppcp-r-navbar-notice {
// Theming.
background: var(--navbar-notice-background);
color: var(--navbar-notice-color);
// Animation.
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
opacity: 0;
transform: translateY(-10px);
&.ppcp--animating {
opacity: 1;
transform: translateY(0);
}
// Styling.
position: absolute;
top: 48px;
right: 0;
white-space: nowrap;
padding: 6px 12px;
border-radius: 3px;
&.ppcp--success {
--navbar-notice-background: var(--color-success-background);
--navbar-notice-color: var(--color-success-text);
}
}
}