Move CSS about notice outside of .woocommerce class scope (#35912)

This commit is contained in:
Luigi Teschio 2022-12-13 01:17:35 +01:00 committed by GitHub
parent 97784693ab
commit 6fe4afad14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 381 additions and 357 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Move CSS about notice outside of .woocommerce class scope

View File

@ -130,73 +130,6 @@ a.button {
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 1.5rem;
padding: 1rem;
background: #eee;
font-size: 0.88889em;
font-family: $headings;
list-style: none;
overflow: hidden;
}
.woocommerce-message {
background: #eee;
color: $body-color;
}
.woocommerce-error,
.woocommerce-info {
color: #fff;
a {
color: #fff;
&:hover {
color: #fff;
}
&.button {
background: #111;
}
}
}
.woocommerce-error {
background: firebrick;
}
.woocommerce-info {
background: $highlights-color;
}
.woocommerce-store-notice {
background: $highlights-color;
color: #fff;
padding: 1rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #fff;
&:hover {
text-decoration: underline;
color: #fff;
}
}
/**
* Tables
*/
@ -1373,3 +1306,70 @@ table.variations {
}
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 1.5rem;
padding: 1rem;
background: #eee;
font-size: 0.88889em;
font-family: $headings;
list-style: none;
overflow: hidden;
}
.woocommerce-message {
background: #eee;
color: $body-color;
}
.woocommerce-error,
.woocommerce-info {
color: #fff;
a {
color: #fff;
&:hover {
color: #fff;
}
&.button {
background: #111;
}
}
}
.woocommerce-error {
background: firebrick;
}
.woocommerce-info {
background: $highlights-color;
}
.woocommerce-store-notice {
background: $highlights-color;
color: #fff;
padding: 1rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #fff;
&:hover {
text-decoration: underline;
color: #fff;
}
}

View File

@ -176,64 +176,6 @@
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 1.5em;
padding: 2em;
background: #eee;
}
.woocommerce-message {
background: teal;
color: #fff;
}
.woocommerce-error {
background: firebrick;
color: #fff;
}
.woocommerce-info {
background: royalblue;
color: #fff;
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
a {
@include link_white();
}
}
.woocommerce-store-notice {
background: royalblue;
color: #fff;
padding: 1em;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #fff;
&:hover {
text-decoration: underline;
color: #fff;
}
}
/**
* Shop page
*/
@ -1279,3 +1221,61 @@ table.variations {
width: 78%;
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 1.5em;
padding: 2em;
background: #eee;
}
.woocommerce-message {
background: teal;
color: #fff;
}
.woocommerce-error {
background: firebrick;
color: #fff;
}
.woocommerce-info {
background: royalblue;
color: #fff;
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
a {
@include link_white();
}
}
.woocommerce-store-notice {
background: royalblue;
color: #fff;
padding: 1em;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #fff;
&:hover {
text-decoration: underline;
color: #fff;
}
}

View File

@ -239,47 +239,6 @@ a.button {
}
.woocommerce-message,
.woocommerce-error li,
.woocommerce-info {
padding: 1.5rem 3rem;
display: flex;
justify-content: space-between;
align-items: center;
.button {
order: 2;
}
}
.woocommerce-info {
border-top-color: var( --wc-blue );
}
.woocommerce-error {
border-top-color: #b22222;
> li {
margin: 0;
}
}
.woocommerce-store-notice {
background: #eee;
color: #000;
border-top: 2px solid $highlights-color;
padding: 2rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #000;
@ -3067,3 +3026,54 @@ a.reset_variations {
}
}
}
.woocommerce-message,
.woocommerce-error li,
.woocommerce-info {
padding: 1.5rem 3rem;
display: flex;
justify-content: space-between;
align-items: center;
.button {
order: 2;
}
}
.woocommerce-info {
border-top-color: var( --wc-blue );
}
.woocommerce-error {
border-top-color: #b22222;
> li {
margin: 0;
}
}
.woocommerce-store-notice {
background: #eee;
color: #000;
border-top: 2px solid $highlights-color;
padding: 2rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #000;
&:hover {
text-decoration: none;
color: #000;
}
}

View File

@ -110,65 +110,6 @@
.woocommerce-breadcrumb {
margin-bottom: 1rem;
}
/*
Notice messages (like 'Added to cart', 'Billing address needs to be filled in', etc.
*/
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
background-color: rgba(176, 176, 176, 0.6);
color: #222;
border-top-color: var(--wp--preset--color--primary);
border-top-style: solid;
border-top-width: 2px;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
list-style: none;
font-size: var(--wp--preset--font-size--small);
display: flow-root;
&[role="alert"]::before {
background: #d5d5d5;
color: black;
border-radius: 5rem;
font-size: 1rem;
padding-left: 3px;
padding-right: 3px;
margin-right: 1rem;
}
a {
color: var(--wp--preset--color--contrast);
.button {
margin-top: -0.5rem;
border: none;
padding: 0.5rem 1rem;
}
}
}
.woocommerce-error[role="alert"] {
margin: 0;
&::before {
content: "X";
padding-right: 4px;
padding-left: 4px;
}
li {
display: inline-block;
}
}
.woocommerce-message {
&[role="alert"]::before {
content: "\2713";
}
}
// Checkout notice group styling.
.woocommerce-NoticeGroup-checkout {
ul.woocommerce-error[role="alert"] {
@ -1172,3 +1113,62 @@
color: inherit;
}
}
/*
Notice messages (like 'Added to cart', 'Billing address needs to be filled in', etc.
*/
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
background-color: rgba( 176, 176, 176, 0.6 );
color: #222;
border-top-color: var( --wp--preset--color--primary );
border-top-style: solid;
border-top-width: 2px;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
list-style: none;
font-size: var( --wp--preset--font-size--small );
display: flow-root;
&[role='alert']::before {
background: #d5d5d5;
color: black;
border-radius: 5rem;
font-size: 1rem;
padding-left: 3px;
padding-right: 3px;
margin-right: 1rem;
}
a {
color: var( --wp--preset--color--contrast );
.button {
margin-top: -0.5rem;
border: none;
padding: 0.5rem 1rem;
}
}
}
.woocommerce-error[role='alert'] {
margin: 0;
&::before {
content: 'X';
padding-right: 4px;
padding-left: 4px;
}
li {
display: inline-block;
}
}
.woocommerce-message {
&[role='alert']::before {
content: '\2713';
}
}

View File

@ -97,61 +97,6 @@ $tt2-gray: #f7f7f7;
margin-bottom: 1rem;
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
background: $tt2-gray;
border-top-color: var(--wp--preset--color--primary);
border-top-style: solid;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
list-style: none;
font-size: var(--wp--preset--font-size--small);
&[role="alert"]::before {
color: var(--wp--preset--color--background);
background: var(--wp--preset--color--primary);
border-radius: 5rem;
font-size: 1rem;
padding-left: 3px;
padding-right: 3px;
margin-right: 1rem;
}
a.button {
margin-top: -0.5rem;
border: none;
background: #ebe9eb;
color: var(--wp--preset--color--black);
padding: 0.5rem 1rem;
&:hover,
&:visited {
color: var(--wp--preset--color--black);
}
}
}
.woocommerce-error[role="alert"] {
margin: 0;
&::before {
content: "X";
padding-right: 4px;
padding-left: 4px;
}
li {
display: inline-block;
}
}
.woocommerce-message {
&[role="alert"]::before {
content: "\2713";
}
}
.woocommerce-NoticeGroup-checkout {
ul.woocommerce-error[role="alert"] {
&::before {
@ -1213,3 +1158,58 @@ $tt2-gray: #f7f7f7;
color: inherit;
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
background: $tt2-gray;
border-top-color: var(--wp--preset--color--primary);
border-top-style: solid;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
list-style: none;
font-size: var(--wp--preset--font-size--small);
&[role="alert"]::before {
color: var(--wp--preset--color--background);
background: var(--wp--preset--color--primary);
border-radius: 5rem;
font-size: 1rem;
padding-left: 3px;
padding-right: 3px;
margin-right: 1rem;
}
a.button {
margin-top: -0.5rem;
border: none;
background: #ebe9eb;
color: var(--wp--preset--color--black);
padding: 0.5rem 1rem;
&:hover,
&:visited {
color: var(--wp--preset--color--black);
}
}
}
.woocommerce-error[role="alert"] {
margin: 0;
&::before {
content: "X";
padding-right: 4px;
padding-left: 4px;
}
li {
display: inline-block;
}
}
.woocommerce-message {
&[role="alert"]::before {
content: "\2713";
}
}

View File

@ -183,83 +183,6 @@ a.button {
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 5rem;
margin-left: 0;
background: #eee;
color: $body-color;
border-top: 3px solid var( --wc-green );
font-size: 0.88889em;
font-family: $headings;
list-style: none;
overflow: hidden;
width: 100%;
a {
color: #fff;
&:hover {
color: #fff;
}
&.button {
background: #000000;
}
}
}
.woocommerce-message,
.woocommerce-error li,
.woocommerce-info {
padding: 1.5rem 3rem;
display: flex;
justify-content: space-between;
align-items: center;
.button {
order: 2;
}
}
.woocommerce-info {
border-color: var( --wc-blue );
}
.woocommerce-error {
border-color: $highlights-color;
> li {
margin: 0;
}
}
#site-content {
.woocommerce-error,
.woocommerce-info {
font-family: $headings;
}
}
.woocommerce-store-notice {
background: #eee;
color: #000;
border-top: 2px solid $highlights-color;
padding: 2rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #000;
@ -2558,3 +2481,90 @@ a.reset_variations {
}
}
}
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
margin-bottom: 5rem;
margin-left: 0;
background: #eee;
color: $body-color;
border-top: 3px solid var( --wc-green );
font-size: 0.88889em;
font-family: $headings;
list-style: none;
overflow: hidden;
width: 100%;
a {
color: #fff;
&:hover {
color: #fff;
}
&.button {
background: #000000;
}
}
}
.woocommerce-message,
.woocommerce-error li,
.woocommerce-info {
padding: 1.5rem 3rem;
display: flex;
justify-content: space-between;
align-items: center;
.button {
order: 2;
}
}
.woocommerce-info {
border-color: var( --wc-blue );
}
.woocommerce-error {
border-color: $highlights-color;
> li {
margin: 0;
}
}
#site-content {
.woocommerce-error,
.woocommerce-info {
font-family: $headings;
}
}
.woocommerce-store-notice {
background: #eee;
color: #000;
border-top: 2px solid $highlights-color;
padding: 2rem;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 999;
}
.admin-bar .woocommerce-store-notice {
top: 32px;
}
.woocommerce-store-notice__dismiss-link {
float: right;
color: #000;
&:hover {
text-decoration: none;
color: #000;
}
}