Fix: Twenty Twenty-Two integration (#32840)

* fix: Twenty Twenty-Two integration

* fix the width for checkout page. remove unnecessary account page width style

* add changelog entry
This commit is contained in:
Tung Du 2022-06-02 17:04:27 +07:00 committed by GitHub
parent 5d076cc7d4
commit 7de6d18b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 33 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix: Content width issue and Classic Template blocks alignment issue for Twenty Twenty-Two.

View File

@ -20,10 +20,6 @@ class WC_Twenty_Twenty_Two {
*/
public static function init() {
// Change WooCommerce wrappers.
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
// This theme doesn't have a traditional sidebar.
remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
@ -38,7 +34,8 @@ class WC_Twenty_Twenty_Two {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_theme_support( 'woocommerce',
add_theme_support(
'woocommerce',
array(
'thumbnail_image_width' => 450,
'single_image_width' => 600,

View File

@ -43,12 +43,8 @@ $tt2-gray: #f7f7f7;
h2 {
font-size: var(--wp--preset--font-size--large);
}
}
.woocommerce-page {
main {
.woocommerce {
@include clearfix();
max-width: 1000px;
@ -58,21 +54,6 @@ $tt2-gray: #f7f7f7;
.woocommerce {
.woocommerce-products-header,
.woocommerce-notices-wrapper,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-breadcrumb,
.products {
max-width: 1000px;
}
.wp-site-blocks > .wp-block-group {
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
// Common
.woocommerce-products-header {
h1.page-title {
@ -272,7 +253,6 @@ $tt2-gray: #f7f7f7;
div.product {
position: relative;
max-width: 1000px;
> span.onsale {
position: absolute;
@ -1153,14 +1133,6 @@ $tt2-gray: #f7f7f7;
*/
.woocommerce-account {
main {
.woocommerce {
@include clearfix();
max-width: 1000px;
}
}
.woocommerce-MyAccount-navigation {
ul {