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

365 lines
6.7 KiB
SCSS
Raw Normal View History

/** @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: #fff;
margin: 0;
padding: 0;
top: -3px;
width: 100vw;
display: none;
height: 60px;
flex: 1 100%;
}
@include breakpoint( '782px-1100px' ) {
max-width: 280px;
height: 60px;
}
@include breakpoint( '>1100px' ) {
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( '>1100px' ) {
height: 80px;
}
.dashicon,
.gridicon {
width: 100%;
}
svg {
width: 18px;
height: 18px;
@include breakpoint( '>1100px' ) {
width: 24px;
height: 24px;
}
}
.components-icon-button {
display: initial;
text-indent: 0px;
}
.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%;
height: 60px;
border-bottom: 3px solid $white;
@include breakpoint( '>1100px' ) {
height: 80px;
}
&.is-active {
color: $core-grey-dark-700;
border-bottom: 3px solid $woocommerce;
box-shadow: none;
}
font-size: 11px;
@include breakpoint( '>1100px' ) {
font-size: 13px;
}
&.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-1100px' ) {
top: 8px;
right: 18px;
left: initial;
margin-left: 0;
}
@include breakpoint( '>1100px' ) {
top: 16px;
right: 28px;
left: initial;
margin-left: 0;
}
}
&:hover,
&.components-button:not(:disabled):not([aria-disabled='true']):hover,
&:focus,
&.components-button:not(:disabled):not([aria-disabled='true']):focus {
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:not(.is-active),
&.components-button:not(.is-active):not(:disabled):not([aria-disabled='true']):focus,
&:hover:not(.is-active),
&.components-button:not(.is-active):not(:disabled):not([aria-disabled='true']):hover {
border-bottom: 3px solid $core-grey-light-200;
&.has-unread:after,
&.woocommerce-layout__activity-panel-tab-wordpress-notices:after {
border-color: $core-grey-light-200;
}
}
}
}
.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;
}
}
.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: 0px;
@include activity-panel-slide();
position: fixed;
right: 0px;
top: 92px;
z-index: 1000;
overflow-x: hidden;
overflow-y: scroll;
// 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-1100px' ) {
padding-bottom: $gap-small;
}
@include breakpoint( '>1100px' ) {
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-order-activity-card {
.woocommerce-activity-card__title {
font-weight: normal;
}
.woocommerce-activity-card__subtitle {
span + span:before {
content: ' \2022 ';
}
}
}
.woocommerce-layout__activity-panel-avatar-flag-overlay {
position: relative;
top: -$gap-small;
.woocommerce-flag {
position: relative;
top: 16px;
border: 2px solid $white;
}
}
// Needs the double-class for specificity
.woocommerce-activity-card.woocommerce-inbox-activity-card {
grid-template-columns: 72px 1fr;
@include breakpoint( '<782px' ) {
grid-template-columns: 64px 1fr;
}
.woocommerce-activity-card__header {
margin-bottom: $gap-small;
}
}
.woocommerce-review-activity-card {
.woocommerce-review-activity-card__verified {
margin-left: $gap-small;
display: inline-flex;
position: relative;
top: $gap-smallest;
color: $valid-green;
@include font-size( 12 );
.gridicon {
margin-right: $gap-smallest;
fill: $valid-green;
}
}
.woocommerce-review-activity-card__image-overlay {
margin-left: -$gap-large;
img.woocommerce-gravatar {
left: $gap-large;
position: relative;
top: -42px;
border: 2px solid $white;
}
}
@include breakpoint( '<782px' ) {
.woocommerce-review-activity-card__image-overlay {
margin-top: $gap-smallest;
}
.woocommerce-activity-card__icon img.woocommerce-gravatar {
margin-left: 0;
width: 18px;
height: 18px;
left: 32px;
top: -28px;
}
.woocommerce-activity-card__icon img.woocommerce-product-image {
width: 38px;
height: 38px;
}
}
}
.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;
}