This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 220
Fix product grid blocks markup & design inconsistencies #2428
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
db751c5
Fix Sale badge markup discrepancy. Fixes #2107
Aljullu 7d21e1c
Fix product link markup discrepancy
Aljullu f0ee93a
Use same class name for ratings markup in product grid blocks
Aljullu ca16c80
Remove editor specific class name for product title
Aljullu 414ec99
Unify price layout between product grid blocks and All Products block
Aljullu a3be410
Change specificity raising classes to avoid editor class names
Aljullu 91e47e4
Make small images fill the available width in product grid blocks
Aljullu ba70cb6
Avoid increasing selector specificity in the frontend
Aljullu ce60ab7
Undo AbstractProductGrid.php template changes
Aljullu d24df30
Do not remove .wc-block-grid__product-rating__stars from CSS
Aljullu 297fe0c
Add theming docs
Aljullu 8b63602
Merge branch 'master' into fix/2414-product-grid-inconsistencies
Aljullu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Theming WooCommerce Blocks | ||
|
||
This page includes all documentation regarding WooCommerce Blocks and themes. | ||
|
||
- [Product grid blocks style update in 2.7.0](./product-grid-270.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Product grid blocks style update in 2.7.0 | ||
|
||
In WC Blocks 2.7.0, some of the styles of the product grid blocks were updated to make the experience more consistent. Below, there are CSS code snippets that can undo those changes. | ||
|
||
## Product images | ||
|
||
Images in product grid blocks changed so they expand to occupy all the available horizontal space if they are small. This can be undone with this CSS snippet: | ||
|
||
```CSS | ||
.wc-block-grid__products .wc-block-grid__product-image img { | ||
width: auto; | ||
} | ||
``` | ||
|
||
## All Products prices | ||
|
||
_All Products_ block was updated so prices follow the same layout as the other product grid blocks (one line instead of two lines). It's possible to recover the old style with: | ||
|
||
```CSS | ||
.wc-block-grid__product-price .wc-block-grid__product-price__regular { | ||
font-size: 0.8em; | ||
line-height: 1; | ||
color: #555; | ||
margin-top: -0.25em; | ||
display: block; | ||
} | ||
.wc-block-grid__product-price .wc-block-grid__product-price__value { | ||
letter-spacing: -1px; | ||
font-weight: 600; | ||
display: block; | ||
font-size: 1.25em; | ||
line-height: 1.25; | ||
color: #000; | ||
margin-left: 0; | ||
} | ||
.wc-block-grid__product-price .wc-block-grid__product-price__value span { | ||
white-space: nowrap; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why price isn't it's own separate entry in classnames.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know! 😄 Should be fixed in the merge commit.