Skip to content

Commit

Permalink
Merge pull request #4191 from Codeinwp/fix/woo_notices_wc8.5
Browse files Browse the repository at this point in the history
fix: woocommerce notices for wc8.5 #4189
  • Loading branch information
preda-bogdan authored Jan 26, 2024
2 parents 78e581f + 92a9e0a commit 5736080
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions assets/scss/components/compat/woocommerce/_notices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,77 @@ $notices: (
}
}

$blockNotices: (
"success": $success,
"error": $error,
"info": var(--nv-primary-accent),
);

.neve-main .wc-block-components-notice-banner {
--btnfs: $text-sm;
--primarybtnpadding: 10px 15px;
--primarybtnborderwidth: 3px;
--primarybtncolor: #fff;
--primarybtnhovercolor: #fff;
--primarybtnhoverbg: transparent;
--primarybtnbg: transparent;

.wc-block-components-notice-banner__content {

&:has(.wc-forward, .showcoupon) {
display: inline-flex;
flex-basis: 100%;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
}

&:has(.wc-forward) {
flex-direction: row-reverse;
}

&:has(.showcoupon) {
flex-direction: row;
}
}
}

@each $noticeName, $color in $blockNotices {
.neve-main .wc-block-components-notice-banner.is-#{$noticeName} {
border-radius: 3px;
background-color: $color;
border: 0;
color: #fff;
font-size: inherit;
line-height: inherit;
align-items: center;

svg {
background-color: #fff;
fill: $color;
}

a:is(.wc-forward, .showcoupon) {
background: var(--primarybtnbg) !important;
border: var(--primarybtnborderwidth, 0) solid currentColor !important;
border-radius: var(--primarybtnborderradius, 3px);
color: var(--primarybtncolor) !important;
padding: var(--primarybtnpadding, 13px 15px) !important;
text-decoration: none !important;
opacity: 1;
float: none;

&:hover {
background: var(--primarybtnhoverbg) !important;
color: var(--primarybtnhovercolor) !important;
border-color: var(--primarybtnhovercolor) !important;
opacity: 0.9;
}
}

}
}

.woocommerce .woocommerce-error {
padding-left: 3.5em;

Expand Down

0 comments on commit 5736080

Please sign in to comment.