Skip to content

Commit f438d27

Browse files
committed
fix woo style
1 parent 84eaaba commit f438d27

15 files changed

Lines changed: 52 additions & 43 deletions

File tree

‎patterns/hidden-shop-product.php‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Title: Shop product
4+
* Slug: extendable/hidden-shop-product
5+
* Inserter: no
6+
*/
7+
?>
8+
<!-- wp:group {"metadata":{"name":"Card - Product","categories":["card"],"patternName":"core/block/2386"},"className":"is-style-ext-preset\u002d\u002dgroup\u002d\u002dnatural-1\u002d\u002ditem-card-1\u002d\u002dalign-start","style":{"spacing":{"blockGap":"0","padding":{"top":"0","bottom":"0","left":"0","right":"0"}},"dimensions":{"minHeight":"100%"}},"backgroundColor":"tertiary","layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch"}} -->
9+
<div class="wp-block-group is-style-ext-preset--group--natural-1--item-card-1--align-start has-tertiary-background-color has-background" style="min-height:100%;padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:woocommerce/product-image {"showSaleBadge":false,"imageSizing":"thumbnail","isDescendentOfQueryLoop":true} -->
10+
<!-- wp:woocommerce/product-sale-badge {"align":"right"} /-->
11+
<!-- /wp:woocommerce/product-image -->
12+
13+
<!-- wp:group {"metadata":{"name":"Content"},"className":"is-style-default","style":{"spacing":{"padding":{"right":"1.5rem","left":"1.5rem","top":"1.5rem","bottom":"1.5rem"},"blockGap":"var:preset|spacing|20","margin":{"top":"0"}},"layout":{"selfStretch":"fill","flexSize":null}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"stretch","verticalAlignment":"space-between"}} -->
14+
<div class="wp-block-group is-style-default" style="margin-top:0;padding-top:1.5rem;padding-right:1.5rem;padding-bottom:1.5rem;padding-left:1.5rem"><!-- wp:group {"style":{"spacing":{"padding":{"top":"0","bottom":"0","left":"0","right":"0"}}},"layout":{"type":"constrained"}} -->
15+
<div class="wp-block-group" style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0"><!-- wp:post-title {"textAlign":"left","level":3,"isLink":true,"className":"is-style-fill is-layout-flex wp-block-buttons-is-layout-flex","style":{"spacing":{"margin":{"top":"0","bottom":"0"}}},"fontSize":"small","__woocommerceNamespace":"woocommerce/product-collection/product-title"} /-->
16+
17+
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"left","className":"is-style-fill is-layout-flex wp-block-buttons-is-layout-flex","fontSize":"small","style":{"spacing":{"margin":{"top":"8px"}}}} /--></div>
18+
<!-- /wp:group -->
19+
20+
<!-- wp:woocommerce/product-button {"textAlign":"left","isDescendentOfQueryLoop":true,"className":"is-layout-flex wp-block-buttons-is-layout-flex is-style-ext-preset\u002d\u002dbutton\u002d\u002dnatural-1\u002d\u002dbutton-1","fontSize":"small","style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} /--></div>
21+
<!-- /wp:group --></div>
22+
<!-- /wp:group -->

‎patterns/hidden-woo-related-products.php‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,14 @@
88

99
<!-- wp:woocommerce/product-collection {"queryId":0,"query":{"perPage":5,"pages":1,"offset":0,"postType":"product","order":"asc","orderBy":"title","search":"","exclude":[],"inherit":false,"taxQuery":[],"isProductCollectionBlock":true,"featured":false,"woocommerceOnSale":false,"woocommerceStockStatus":["instock","onbackorder"],"woocommerceAttributes":[],"woocommerceHandPickedProducts":[],"filterable":false,"relatedBy":{"categories":true,"tags":true}},"tagName":"div","displayLayout":{"type":"flex","columns":5,"shrinkColumns":false},"dimensions":{"widthType":"fill"},"collection":"woocommerce/product-collection/related","hideControls":["inherit"],"queryContextIncludes":["collection"],"__privatePreviewState":{"isPreview":true,"previewMessage":"Actual products will vary depending on the product being viewed."},"align":"wide"} -->
1010
<div class="wp-block-woocommerce-product-collection alignwide">
11-
<!-- wp:heading {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}},"fontSize":"large"} -->
12-
<h2 class="wp-block-heading has-large-font-size" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)">
11+
<!-- wp:heading {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}},"fontSize":"medium"} -->
12+
<h2 class="wp-block-heading has-medium-font-size" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)">
1313
<?php echo esc_html_x( 'Related products ', 'Heading for a single product page related products section', 'extendable' ); ?>
1414
</h2>
1515
<!-- /wp:heading -->
1616

1717
<!-- wp:woocommerce/product-template -->
18-
<!-- wp:woocommerce/product-image {"showSaleBadge":false,"imageSizing":"thumbnail","isDescendentOfQueryLoop":true} -->
19-
<!-- wp:woocommerce/product-sale-badge {"isDescendentOfQueryLoop":true,"align":"right"} /-->
20-
<!-- /wp:woocommerce/product-image -->
21-
22-
<!-- wp:post-title {"level":3,"isLink":true,"style":{"spacing":{"margin":{"bottom":"0.5rem"}}},"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-collection/product-title"} /-->
23-
24-
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"fontSize":"small","style":{"spacing":{"margin":{"bottom":"1.5rem"}}}} /-->
25-
26-
<!-- wp:woocommerce/product-button {"textAlign":"center","isDescendentOfQueryLoop":true,"fontSize":"small"} /-->
18+
<!-- wp:pattern {"slug":"extendable/hidden-shop-product"} /-->
2719
<!-- /wp:woocommerce/product-template -->
2820
</div>
2921
<!-- /wp:woocommerce/product-collection -->

‎style.css‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ input, textarea {
352352
margin-top: 0;
353353
margin-bottom: 0;
354354
}
355+
.wc-block-product-template__responsive {
356+
grid-row-gap: 2rem;
357+
}
358+
.wc-block-components-product-button__button {
359+
z-index: 1;
360+
}
355361
/*
356362
* Adds offset for sticky header overlap
357363
*/

‎styles/block-presets/button/brutalism-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Brutalism 1 Button 1",
55
"slug": "ext-preset--button--brutalism-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "16px"

‎styles/block-presets/button/gradient-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Gradient 1 Button 1",
55
"slug": "ext-preset--button--gradient-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "8px"

‎styles/block-presets/button/matrix-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Matrix 1 Button 1",
55
"slug": "ext-preset--button--matrix-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "0"

‎styles/block-presets/button/natural-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Button 1",
55
"slug": "ext-preset--button--natural-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"typography": {
99
"fontSize": "inherit"

‎styles/block-presets/button/organic-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Organic 1 Button 1",
55
"slug": "ext-preset--button--organic-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "99999px"

‎styles/block-presets/button/prism-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Prism 1 Button 1",
55
"slug": "ext-preset--button--prism-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "0"

‎styles/block-presets/button/soft-1/button-1/preset.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": 3,
44
"title": "Soft 1 Button 1",
55
"slug": "ext-preset--button--soft-1--button-1",
6-
"blockTypes": ["core/button"],
6+
"blockTypes": ["core/button", "woocommerce/product-button"],
77
"styles": {
88
"border": {
99
"radius": "16px"

0 commit comments

Comments
 (0)