woocommerce/plugins/woocommerce-admin/client/header/activity-panel/style.scss

296 lines
5.2 KiB
SCSS

/** @format */
.woocommerce-layout__activity-panel {
display: flex;
flex-direction: row;
align-items: center;
position: fixed;
right: 0;
height: 80px;
@include breakpoint( '<782px' ) {
position: relative;
background: $white;
margin: 0;
padding: 0;
top: -3px;
width: 100vw;
display: none;
height: 60px;
flex: 1 100%;
}
@include breakpoint( '782px-960px' ) {
max-width: 280px;
height: 60px;
}
@include breakpoint( '>960px' ) {
max-width: 400px;
}
&.is-mobile-open {
display: flex;
}
}
.woocommerce-layout__activity-panel-tabs {
width: 100%;
display: flex;
height: 60px;
justify-content: flex-end;
@include breakpoint( '>960px' ) {
height: 80px;
}
.dashicon,
.gridicon {
width: 100%;
}
svg {
width: 18px;
height: 18px;
@include breakpoint( '>960px' ) {
width: 24px;
height: 24px;
}
}
.components-icon-button {
display: initial;
text-indent: 0;
border-radius: 0;
}
.woocommerce-layout__activity-panel-tab {
display: flex;
flex-direction: column;
justify-content: center;
border: none;
outline: none;
cursor: pointer;
background-color: $white;
color: $core-grey-dark-500;
max-width: min-content;
min-width: 80px;
width: 100%;
font-size: 11px;
height: 60px;
@include breakpoint( '>960px' ) {
font-size: 13px;
height: 80px;
}
&.is-active {
color: $core-grey-dark-700;
box-shadow: none;
&::before {
background-color: $woocommerce;
bottom: 0;
content: '';
height: 3px;
left: 0;
position: absolute;
right: 0;
}
}
&.has-unread::after,
&.woocommerce-layout__activity-panel-tab-wordpress-notices::after {
content: ' ';
position: absolute;
padding: 1px;
background: $core-orange;
border: 2px solid $white;
width: 4px;
height: 4px;
display: inline-block;
border-radius: 50%;
top: 10px;
left: 50%;
@include breakpoint( '782px-960px' ) {
top: 8px;
right: 18px;
left: initial;
margin-left: 0;
}
@include breakpoint( '>960px' ) {
top: 16px;
right: 28px;
left: initial;
margin-left: 0;
}
}
&:hover,
&.components-button:not(:disabled):not([aria-disabled='true']):hover {
background-color: $core-grey-light-200;
box-shadow: none;
&.has-unread::after,
&.woocommerce-layout__activity-panel-tab-wordpress-notices::after {
border-color: $core-grey-light-200;
}
}
&:focus,
&.components-button:not(:disabled):not([aria-disabled='true']):focus {
box-shadow: inset -1px -1px 0 $core-grey-dark-300, inset 1px 1px 0 $core-grey-dark-300;
}
}
}
.woocommerce-layout__activity-panel-mobile-toggle {
margin-right: 10px;
max-width: 48px;
height: 46px;
position: fixed;
top: 46px;
right: 0;
@include breakpoint( '>782px' ) {
display: none;
}
}
.wp-responsive-open .woocommerce-layout__activity-panel-mobile-toggle {
display: none;
}
.woocommerce-layout__activity-panel-toggle-bubble.has-unread::after {
content: ' ';
position: absolute;
padding: 1px;
background: $core-orange;
border: 2px solid $white;
width: 4px;
height: 4px;
display: inline-block;
border-radius: 50%;
top: 6px;
right: 4px;
}
@keyframes tabSwitch {
0%,
100% {
transform: translateX(0);
}
50% {
transform: translateX(100px);
}
}
@mixin activity-panel-slide {
transition: width 300ms cubic-bezier(0.42, 0, 0.58, 1);
@media screen and (prefers-reduced-motion: reduce) {
transition: none;
}
}
.woocommerce-layout__activity-panel-wrapper {
height: calc(100vh - 80px);
min-height: calc(100vh - 80px);
background: $core-grey-light-200;
box-shadow: 0 12px 12px 0 rgba(85, 93, 102, 0.3);
width: 0;
@include activity-panel-slide();
position: fixed;
right: 0;
top: 92px;
z-index: 1000;
overflow-x: hidden;
overflow-y: auto;
// Extra padding is needed at the bottom of the wrapper because of our positioning, height, and overflow rules. Otherwise, some content can get cut off.
padding-bottom: $gap-small * 6;
@include breakpoint( '782px-960px' ) {
padding-bottom: $gap-small;
}
@include breakpoint( '>960px' ) {
top: 112px;
padding-bottom: $gap * 2;
}
@include breakpoint( '<782px' ) {
top: 153px;
}
&.is-open {
@include activity-panel-slide();
width: 510px;
@include breakpoint( '<782px' ) {
width: 100%;
}
}
.woocommerce-layout__activity-panel-content {
animation: tabSwitch;
animation-duration: 300ms;
@media screen and (prefers-reduced-motion: reduce) {
animation: none;
}
}
}
.woocommerce-layout__activity-panel-avatar-flag-overlay {
position: relative;
top: -$gap-small;
.woocommerce-flag {
position: relative;
top: 16px;
border: 2px solid $white;
}
}
.woocommerce-layout__notice-list-hide {
display: none;
}
@keyframes slideDown {
0% {
transform: translateY(-100%);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.woocommerce-layout__notice-list-show {
margin-top: 100px;
animation: slideDown;
animation-duration: 1s;
&.has-screen-meta-links {
display: inline-block;
width: 100%;
}
@include breakpoint( '<782px' ) {
margin-top: 115px;
}
}
#wp__notice-list-uncollapsed {
visibility: hidden;
margin: -2px 0 0;
}
#wp__notice-list {
padding-right: 20px;
}
.woocommerce-layout__notice-list .jitm-card {
margin: 5px 15px 2px;
padding: 1px 12px;
}