Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Avoid increasing selector specificity in the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed May 19, 2020
1 parent 91e47e4 commit cad1668
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions assets/js/base/components/product-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
}
}

// Extra classes for specificity. Otherwise some themes (ie TwentyTwenty),
// were never using these styles.
.wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title {
.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,
.editor-styles-wrapper .wc-block-grid__product-title,
.wc-block-grid__product-title {
font-family: inherit;
line-height: 1.2em;
font-weight: 700;
Expand Down Expand Up @@ -199,8 +199,8 @@
}
}

// Extra classes for specificity.
.wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale {
.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale,
.wc-block-grid__product-onsale {
border: 1px solid #43454b;
color: #43454b;
background: #fff;
Expand All @@ -217,8 +217,8 @@
margin: $gap-smaller auto;
}

// Extra classes for specificity.
.wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-image {
.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-image,
.wc-block-grid__product-image {
.wc-block-grid__product-onsale {
&.wc-block-grid__product-onsale--alignleft {
position: absolute;
Expand Down

0 comments on commit cad1668

Please sign in to comment.