Browse Source

Merge pull request #206 from Automattic/libre-2-jetpack-infinite-scroll-wc-fix

Libre 2: Fixes Jetpack Infinite Scroll on WooCommerce pages
Daniel Dudzic 7 years ago
parent
commit
a1ab60f45d
6 changed files with 710 additions and 77 deletions
  1. 5 4
      libre-2/inc/jetpack.php
  2. 33 39
      libre-2/inc/woocommerce.php
  3. 21 15
      libre-2/rtl.css
  4. 1 1
      libre-2/style.css
  5. 614 0
      libre-2/woocommerce-rtl.css
  6. 36 18
      libre-2/woocommerce.css

+ 5 - 4
libre-2/inc/jetpack.php

@@ -49,22 +49,23 @@ add_action( 'after_setup_theme', 'libre_2_jetpack_setup' );
  */
 function libre_2_infinite_scroll_render() {
 
-	if ( class_exists( 'WooCommerce' ) && ( is_shop() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) {
+	if ( class_exists( 'WooCommerce' ) && ( libre_2_woocommerce_is_shop_page() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) {
 		libre_2_woocommerce_product_columns_wrapper();
 		woocommerce_product_loop_start();
 	}
 
 	while ( have_posts() ) {
 		the_post();
-
-		if ( class_exists( 'WooCommerce' ) && ( is_shop() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) :
+		if ( is_search() ) :
+			get_template_part( 'template-parts/content', 'search' );
+		elseif ( class_exists( 'WooCommerce' ) && ( libre_2_woocommerce_is_shop_page() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) :
 			wc_get_template_part( 'content', 'product' );
 		else :
 			get_template_part( 'template-parts/content', get_post_format() );
 		endif;
 	}
 
-	if ( class_exists( 'WooCommerce' ) && ( is_shop() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) {
+	if ( class_exists( 'WooCommerce' ) && ( libre_2_woocommerce_is_shop_page() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) {
 		woocommerce_product_loop_end();
 		libre_2_woocommerce_product_columns_wrapper_close();
 	}

+ 33 - 39
libre-2/inc/woocommerce.php

@@ -27,6 +27,7 @@ function libre_2_woocommerce_setup() {
 			'min_rows'        => 1
 		)
 	) ) );
+
 	add_theme_support( 'wc-product-gallery-zoom' );
 	add_theme_support( 'wc-product-gallery-lightbox' );
 	add_theme_support( 'wc-product-gallery-slider' );
@@ -43,6 +44,7 @@ function libre_2_woocommerce_scripts() {
 	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons/genericons.css', array(), '3.4.1' );
 
 	wp_enqueue_style( 'libre-2-woocommerce-style', get_template_directory_uri() . '/woocommerce.css' );
+	wp_style_add_data( 'libre-2-woocommerce-style', 'rtl', get_stylesheet_directory_uri() . '/woocommerce-rtl.css' );
 
 	$font_path   = WC()->plugin_url() . '/assets/fonts/';
 	$inline_font = '@font-face {
@@ -89,10 +91,9 @@ add_filter( 'body_class', 'libre_2_woocommerce_active_body_class' );
  * @return integer number of products.
  */
 function libre_2_woocommerce_products_per_page() {
-	return 12;
+	return absint( apply_filters( 'libre_2_woocommerce_products_per_page', 12 ) );
 }
 
-// Legacy WooCommerce products per page filter.
 if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '<' ) ) {
 	add_filter( 'loop_shop_per_page', 'libre_2_woocommerce_products_per_page' );
 }
@@ -103,7 +104,7 @@ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '<' ) ) {
  * @return integer number of columns.
  */
 function libre_2_woocommerce_thumbnail_columns() {
-	return 4;
+	return absint( apply_filters( 'libre_2_woocommerce_product_thumbnail_columns', 4 ) );
 }
 add_filter( 'woocommerce_product_thumbnails_columns', 'libre_2_woocommerce_thumbnail_columns' );
 
@@ -113,10 +114,9 @@ add_filter( 'woocommerce_product_thumbnails_columns', 'libre_2_woocommerce_thumb
  * @return integer products per row.
  */
 function libre_2_woocommerce_loop_columns() {
-	return 3;
+	return absint( apply_filters( 'libre_2_woocommerce_loop_columns', 3 ) );
 }
 
-// Legacy WooCommerce columns filter.
 if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '<' ) ) {
 	add_filter( 'loop_shop_columns', 'libre_2_woocommerce_loop_columns' );
 }
@@ -128,12 +128,10 @@ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '3.3', '<' ) ) {
  * @return array $args related products args.
  */
 function libre_2_woocommerce_related_products_args( $args ) {
-	$defaults = array(
+	$args = apply_filters( 'libre_2_woocommerce_related_products_args', array(
 		'posts_per_page' => 3,
 		'columns'        => 3,
-	);
-
-	$args = wp_parse_args( $defaults, $args );
+	) );
 
 	return $args;
 }
@@ -179,6 +177,32 @@ if ( ! function_exists( 'libre_2_woocommerce_product_columns_wrapper_close' ) )
 }
 add_action( 'woocommerce_after_shop_loop', 'libre_2_woocommerce_product_columns_wrapper_close', 40 );
 
+add_action( 'woocommerce_before_shop_loop', 'libre_2_woocommerce_sorting_wrap', 3 );
+
+if ( ! function_exists( 'libre_2_woocommerce_sorting_wrap' ) ) {
+	/**
+	 * Sorting wrapper
+	 *
+	 * @return  void
+	 */
+	function libre_2_woocommerce_sorting_wrap() {
+		echo '<div class="woocommerce-sorting-wrap">';
+	}
+}
+
+add_action( 'woocommerce_before_shop_loop', 'libre_2_woocommerce_sorting_wrap_close', 30 );
+
+if ( ! function_exists( 'libre_2_woocommerce_sorting_wrap_close' ) ) {
+	/**
+	 * Sorting wrapper close
+	 *
+	 * @return  void
+	 */
+	function libre_2_woocommerce_sorting_wrap_close() {
+		echo '</div><!-- END .sorting-wrap -->';
+	}
+}
+
 /**
  * Remove default WooCommerce wrapper.
  */
@@ -306,33 +330,3 @@ function libre_2_woocommerce_is_shop_page() {
 	}
 	return $is_shop_page;
 }
-
-/**
- * Jetpack infinite scroll duplicates posts where orderby is anything other than modified or date
- * This filter offsets the products returned by however many are displayed per page
- *
- * @link https://github.com/Automattic/jetpack/issues/1135
- * @param  array $args infinite scroll args.
- * @return array       infinite scroll args.
- */
-function libre_2_woocommerce_jetpack_duplicate_products( $args ) {
-	if ( ( isset( $args['post_type'] ) && 'product' === $args['post_type'] ) || ( isset( $args['taxonomy'] ) && 'product_cat' === $args['taxonomy'] ) ) {
-		$args['offset'] = $args['posts_per_page'] * $args['paged'];
-	}
- 	return $args;
-}
-add_filter( 'infinite_scroll_query_args', 'libre_2_woocommerce_jetpack_duplicate_products', 100 );
-
-/**
- * Override number of products per page in Jetpack infinite scroll.
- *
- * @param  array $args infinite scroll args.
- * @return array       infinite scroll args.
- */
-function libre_2_woocommerce_jetpack_products_per_page( $args ) {
-	if ( is_array( $args ) && ( libre_2_woocommerce_is_shop_page() || is_product_taxonomy() || is_product_category() || is_product_tag() ) ) {
-		 $args['posts_per_page'] = libre_2_woocommerce_products_per_page();
-	}
-	return $args;
-}
-add_filter( 'infinite_scroll_settings', 'libre_2_woocommerce_jetpack_products_per_page' );

+ 21 - 15
libre-2/rtl.css

@@ -38,7 +38,7 @@ blockquote:before {
 
 blockquote blockquote {
 	margin-left: 0;
-	margin-right: auto;
+	margin-right: 0;
 }
 
 blockquote.alignright,
@@ -61,7 +61,7 @@ ol {
 li > ul,
 li > ol {
 	margin-right: .4375em;
-	margin-left: auto;
+	margin-left: 0;
 }
 
 /*--------------------------------------------------------------
@@ -74,7 +74,7 @@ input[type="url"],
 input[type="password"],
 input[type="search"] {
 	margin-left: -5px;
-	margin-right: auto;
+	margin-right: 0;
 }
 
 textarea {
@@ -200,7 +200,7 @@ td#next {
 .comment .avatar {
 	float: right;
 	margin-left: .875em;
-	margin-right: auto;
+	margin-right: 0;
 }
 
 #cancel-comment-reply-link {
@@ -209,7 +209,13 @@ td#next {
 
 .comment-form label {
 	margin-left: .875em;
-	margin-right: auto;
+	margin-right: 0;
+}
+
+.author-avatar {
+    float: left;
+    margin-right: 1.75em;
+    margin-left: 0;
 }
 
 @media screen and ( min-width: 45em ) {
@@ -233,7 +239,7 @@ td#next {
 	.main-navigation ul > li.menu-item-has-children,
 	.main-navigation ul > li.page_item_has_children {
 		margin-left: 2.625em;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.main-navigation ul > li.menu-item-has-children > a:after,
@@ -268,45 +274,45 @@ td#next {
 	.error404 .widget-areas .widget-area {
 		float: right;
 		margin-left: 5%;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.error404 .widget-areas .widget-area:last-of-type {
 		margin-left: 0;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.footer-widgets > div:nth-child(1):nth-last-child(3) {
 		float: right;
 		margin-left: 5%;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.footer-widgets > div:nth-child(2):nth-last-child(2),
 	.footer-widgets > div:nth-child(3):nth-last-child(1) {
 		float: right;
 		margin-left: 5%;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.footer-widgets > div:nth-child(1):nth-last-child(3):last-of-type,
 	.footer-widgets > div:nth-child(2):nth-last-child(2):last-of-type,
 	.footer-widgets > div:nth-child(3):nth-last-child(1):last-of-type {
 		margin-left: 0;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.footer-widgets > div:nth-child(1):nth-last-child(2),
 	.footer-widgets > div:nth-child(2):nth-last-child(1) {
 		float: right;
 		margin-left: 6%;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.footer-widgets > div:nth-child(1):nth-last-child(2):last-of-type,
 	.footer-widgets > div:nth-child(2):nth-last-child(1):last-of-type {
 		margin-left: 0;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.entry-footer span {
@@ -349,7 +355,7 @@ td#next {
 @media screen and ( min-width: 55em ) {
 	.sticking .site-logo {
 		margin-left: 0.4375em;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.singular .content-area {
@@ -404,7 +410,7 @@ td#next {
 
 	.sticking .site-title {
 		margin-left: 0;
-		margin-right: auto;
+		margin-right: 0;
 	}
 
 	.main-navigation {

+ 1 - 1
libre-2/style.css

@@ -4,7 +4,7 @@ Theme URI: http://wordpress.com/themes/libre-2/
 Author: Automattic
 Author URI: http://wordpress.com/themes/
 Description: A stylish, classic look for your personal blog or long-form writing site. The main navigation bar stays fixed to the top while your visitors read, keeping your most important content at hand, while three footer widget areas give your secondary content a comfortable home.
-Version: 2.2.2-wpcom
+Version: 2.2.3-wpcom
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: libre

+ 614 - 0
libre-2/woocommerce-rtl.css

@@ -0,0 +1,614 @@
+/*
+ * Theme Name: Libre 2
+ *
+ * RTL additions
+ *
+ */
+
+table.shop_table_responsive tr td
+{
+	text-align: left;
+}
+
+table.shop_table_responsive tr td:before
+{
+	float: right;
+}
+
+/**
+ * Shop table
+ */
+table.shop_table
+{
+	text-align: right;
+}
+
+.woocommerce .shop_table tbody .wc-item-meta {
+	padding-right: 0;
+}
+
+/**
+ * Cart table
+ */
+table.cart .actions
+{
+	text-align: right;
+}
+
+.checkout_coupon .button,
+.coupon .button {
+	margin-right: .8em;
+	margin-left: 0;
+}
+
+.cart-collaterals .wc-proceed-to-checkout
+{
+	text-align: left;
+}
+
+@media screen and (min-width: 896px)
+{
+	table.shop_table_responsive tr th,
+	table.shop_table_responsive tr td
+	{
+		text-align: right;
+	}
+	table.cart .actions
+	{
+		text-align: left;
+	}
+	table.cart .coupon
+	{
+		float: right;
+	}
+}
+
+/**
+ * Products
+ */
+@media screen and (min-width: 896px)
+{
+	ul.products li.product
+	{
+		float: right;
+		margin-left: 4%;
+		margin-right: 0;
+	}
+	ul.products li.product.last
+	{
+		margin-left: 0;
+	}
+	.columns-2 ul.products li.product
+	{
+		margin-left: 4%;
+		margin-right: 0;
+	}
+	.columns-2 ul.products li.product:nth-of-type(2n) {
+		margin-left: 0;
+	}
+	.columns-3 ul.products li.product
+	{
+		margin-left: 5%;
+		margin-right: 0;
+	}
+	.columns-3 ul.products li.product:nth-of-type(3n) {
+		margin-left: 0;
+	}
+	.columns-4 ul.products li.product
+	{
+		margin-left: 4%;
+		margin-right: 0;
+	}
+	.columns-4 ul.products li.product:nth-of-type(4n) {
+		margin-left: 0;
+	}
+	.columns-5 ul.products li.product
+	{
+		margin-left: 5%;
+		margin-right: 0;
+	}
+	.columns-5 ul.products li.product:nth-of-type(5n) {
+		margin-left: 0;
+	}
+	.columns-6 ul.products li.product
+	{
+		margin-left: 2%;
+		margin-right: 0;
+	}
+	.columns-6 ul.products li.product:nth-of-type(6n) {
+		margin-left: 0;
+	}
+}
+
+/**
+ * Loop products
+ */
+ul.products li.product .button.loading:after,
+ul.products li.product .button.added:after
+{
+	margin-right: .53em;
+	margin-left: 0;
+}
+
+/**
+ * Single Product
+ */
+.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger
+{
+	left: 0;
+	right: auto;
+}
+.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li
+{
+	float: right;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li
+{
+	margin-left: 4%;
+	margin-right: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-2 .flex-control-thumbs li:nth-child(2n)
+{
+	margin-left: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li
+{
+	margin-left: 5%;
+	margin-right: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-3 .flex-control-thumbs li:nth-child(3n)
+{
+	margin-left: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li
+{
+	margin-left: 3.8%;
+	margin-right: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-4 .flex-control-thumbs li:nth-child(4n)
+{
+	margin-left: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li
+{
+	margin-left: 3.8%;
+	margin-right: 0;
+}
+.single-product div.product .woocommerce-product-gallery.woocommerce-product-gallery--columns-5 .flex-control-thumbs li:nth-child(5n)
+{
+	margin-left: 0;
+}
+.single-product div.product .woocommerce-product-rating .star-rating
+{
+	margin-left: .35em;
+	margin-right: 0;
+}
+.single-product div.product form.cart div.quantity
+{
+	float: right;
+	margin-left: .5em;
+	margin-right: 0;
+}
+.single-product div.product form.cart .variations .reset_variations
+{
+	margin-right: .875em;
+	margin-left: 0;
+}
+.single-product div.product form.cart table.group_table div.quantity
+{
+	margin-left: 0;
+}
+.single-product div.product .product_meta span
+{
+	margin-left: .875em;
+	margin-right: 0;
+}
+.single-product div.product .woocommerce-tabs ul.tabs
+{
+	padding-right: 1.75em;
+	padding-right: calc(1.75em - 5px);
+	padding-left: 0;
+}
+
+/**
+ * Reviews
+ */
+#reviews #comments ol.commentlist
+{
+	margin-right: 0;
+}
+#reviews #comments ol.commentlist li img.avatar
+{
+	float: right;
+	left: auto;
+	right: 0;
+}
+#reviews #comments ol.commentlist li .comment-text
+{
+	margin: 0 70px 0 0;
+}
+#reviews #comments ol.commentlist li .star-rating
+{
+	float: left;
+}
+
+/**
+ * My account
+ */
+.woocommerce-account .woocommerce-MyAccount-navigation ul li
+{
+	margin: 0 0 0 1.75em;
+}
+.woocommerce-account .addresses .woocommerce-Address-title h3
+{
+	float: right;
+}
+.woocommerce-account .addresses .woocommerce-Address-title .edit
+{
+	float: left;
+}
+.woocommerce-account .woocommerce-order-details .order-again .button:after
+{
+	margin-left: 0;
+	margin-right: .5rem;
+}
+
+/**
+ * Checkout
+ */
+.woocommerce-form__label-for-checkbox .woocommerce-form__input-checkbox
+{
+	margin-left: .25em;
+	margin-right: 0;
+}
+.woocommerce #payment ul.payment_methods
+{
+	border-width: 1px 1px 0 1px;
+}
+.woocommerce #payment ul.payment_methods li input
+{
+	margin: 0 0 0 1em;
+}
+.woocommerce #payment ul.payment_methods li label img
+{
+	float: left;
+}
+.woocommerce #payment ul.payment_methods li.payment_method_paypal .about_paypal
+{
+	margin-right: .8em;
+	margin-left: 0;
+}
+.woocommerce #payment .form-row #place_order
+{
+	float: left;
+}
+ul#shipping_method
+{
+	margin-right: 0;
+	padding-right: 0;
+}
+
+@media screen and (min-width: 600px)
+{
+	.col2-set .form-row-first
+	{
+		float: right;
+		margin-left: 4%;
+		margin-right: 0;
+	}
+	.col2-set .form-row-last
+	{
+		float: left;
+		margin-left: 0;
+	}
+}
+
+/**
+ * WooCommerce widgets
+ */
+.widget.woocommerce ul
+{
+	margin-right: 0;
+}
+.widget.woocommerce ul.product_list_widget li img
+{
+	float: left;
+}
+.widget.woocommerce ul.product_list_widget li .remove
+{
+	float: right;
+}
+
+/**
+ * WooCommerce Cart
+ */
+.widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout
+{
+	margin-right: .55rem;
+	margin-left: 0;
+}
+
+/**
+ * WooCommerce Product Categories
+ */
+.widget_product_categories .children
+{
+	padding-right: 1.75em;
+	padding-left: 0;
+}
+
+/**
+ * WooCommerce Average Rating
+ */
+.widget_rating_filter ul li .star-rating
+{
+	float: right;
+	margin-left: .5em;
+	margin-right: 0;
+}
+
+/**
+ * WooCommerce Price Filter
+ */
+.widget_price_filter {
+	left: auto;
+	right: -1em;
+}
+.widget_price_filter .price_slider_amount
+{
+	text-align: left;
+}
+.widget_price_filter .price_slider_amount .button
+{
+	float: right;
+}
+.widget_price_filter .ui-slider
+{
+	text-align: right;
+}
+.widget_price_filter .ui-slider .ui-slider-handle
+{
+	margin-right: -1px;
+	margin-left: 0;
+}
+
+/**
+ * Header cart
+ */
+.site-header-cart
+{
+	text-align: left;
+}
+.site-header-cart .cart-contents .count
+{
+	margin-right: .25rem;
+	margin-left: 0;
+}
+.site-header-cart .cart-contents:before
+{
+	margin-left: .5rem;
+	margin-right: 0;
+}
+
+/**
+ * Pagination
+ */
+.woocommerce-pagination ul.page-numbers li
+{
+	float: right;
+	margin: 0 0 .25rem .25rem;
+}
+
+/**
+ * Sorting
+ */
+.woocommerce-result-count
+{
+	float: right;
+}
+
+.woocommerce-ordering
+{
+	float: left;
+}
+
+/**
+ * Infinite Scroll
+ */
+@media screen and (min-width: 55em) {
+	.woocommerce-page.infinite-scroll #infinite-handle span,
+	.woocommerce-page.infinite-scroll .infinite-loader {
+		margin-right: 50%;
+		margin-left: 0;
+	}
+}
+
+/**
+ * Onsale badge
+ */
+.onsale
+{
+	left: auto;
+	right: 0;
+}
+
+/**
+ * Star rating
+ */
+.star-rating:before
+{
+	right: 0;
+	float: right;
+	left: auto;
+}
+.star-rating span
+{
+	right: 0;
+	left: auto;
+	float: right;
+}
+.star-rating span:before
+{
+	right: 0;
+	left: auto;
+}
+p.stars a
+{
+	margin-left: 1px;
+	margin-right: 0;
+}
+p.stars a:before
+{
+	right: 0;
+	left: auto;
+}
+
+/**
+ * Tabs
+ */
+.woocommerce-tabs ul.tabs
+{
+	text-align: right;
+}
+
+/**
+ * Password strength meter
+ */
+.woocommerce-password-strength
+{
+	text-align: left;
+}
+
+/**
+ * Forms
+ */
+
+.checkout_coupon p {
+	float: right;
+}
+
+/**
+ * Notices
+ */
+.woocommerce-message,
+.woocommerce-info,
+.woocommerce-error,
+.woocommerce-noreviews,
+p.no-comments
+{
+	margin-right: 0;
+	padding: 1.75em 4em 1.75em 2em;
+}
+.woocommerce-message .button,
+.woocommerce-info .button,
+.woocommerce-error .button,
+.woocommerce-noreviews .button,
+p.no-comments .button
+{
+	float: left;
+	margin-right: 1em;
+	margin-left: 0;
+}
+.woocommerce-message:before,
+.woocommerce-info:before,
+.woocommerce-error:before,
+.woocommerce-noreviews:before,
+p.no-comments:before
+{
+	right: 1.8em;
+	left: auto;
+}
+.demo_store .woocommerce-store-notice__dismiss-link
+{
+	float: left;
+}
+
+/**
+ * Login form
+ */
+.woocommerce-form-login input[name='rememberme']
+{
+	margin-left: .25em;
+	margin-right: .65em;
+}
+
+@media screen and (min-width: 896px) {
+
+	/**
+	 * Header cart
+	 */
+	.site-header-cart
+	{
+		text-align: left;
+	}
+	.site-header-cart > li:first-child
+	{
+		margin: 0 1.75em 0 0;
+	}
+	.site-header-cart .cart-contents .count
+	{
+		margin-right: .25rem;
+		margin-left: 0;
+	}
+	.site-header-cart .widget_shopping_cart
+	{
+		left: 999em;
+		right: auto;
+		text-align: right;
+	}
+	.site-header-cart .widget_shopping_cart ul.product_list_widget li img
+	{
+		float: right;
+		margin: .35rem 0 0 1rem;
+	}
+	.site-header-cart .widget_shopping_cart ul.product_list_widget li .remove
+	{
+		float: left;
+		margin: .5rem .35rem 0 0;
+	}
+	.site-header-cart .widget_shopping_cart .woocommerce-mini-cart__buttons .button.checkout
+	{
+		margin-right: 0;
+	}
+	.site-header-cart:hover .widget_shopping_cart,
+	.site-header-cart.focus .widget_shopping_cart
+	{
+		left: 0;
+		right: auto;
+	}
+
+	/**
+	 * Pagination
+	 */
+	.woocommerce-pagination ul.page-numbers li
+	{
+		margin-left: .3125em;
+		margin-right: 0;
+	}
+	/**
+	 * Related products
+	 */
+	.related ul.products li.product,
+	.upsells ul.products li.product
+	{
+		margin-left: 5%;
+		margin-right: 0;
+	}
+	.related ul.products li.product:nth-of-type(3n),
+	.upsells ul.products li.product:nth-of-type(3n) {
+		margin-left: 0;
+	}
+}
+
+@media screen and ( min-width: 55em ) {
+	.woocommerce-page .content-area {
+		float: right;
+		margin: 0 0 0 -25%;
+	}
+	.woocommerce-page .site-main {
+		margin: 0 0 0 32%;
+	}
+	.woocommerce-page .site-content .widget-area {
+		float: left;
+	}
+}

+ 36 - 18
libre-2/woocommerce.css

@@ -1,14 +1,10 @@
 /*
-Theme Name: Libre 2
-
-WooCommerce styles override
-*/
-/**
- * WooCommerce color variables
- */
-/**
- * Imports
+ * Theme Name: Libre 2
+ *
+ * WooCommerce styles override
+ *
  */
+
 /**
  * Fonts
  */
@@ -119,6 +115,17 @@ table.shop_table .discount th {
 	vertical-align: top;
 }
 
+.woocommerce .shop_table tbody .wc-item-meta {
+	font-size: .875em;
+	list-style: none;
+	margin: .875em 0 0 0;
+	padding-left: 0;
+}
+
+.woocommerce .shop_table tbody .wc-item-meta p {
+	margin: 0;
+}
+
 /**
  * Cart table
  */
@@ -209,6 +216,21 @@ table.cart .coupon input[type="text"],
 	font-size: 1rem;
 }
 
+dl.variation {
+	font-size: .875em;
+	margin: .875em 0 0 0;
+}
+
+dl.variation dd,
+dl.variation p {
+	margin: 0;
+}
+
+dl.variation dt,
+dl.variation dd {
+	display: inline-block;
+}
+
 /**
  * Attributes table
  */
@@ -321,7 +343,7 @@ div[class^='columns-']
 	{
 		float: left;
 
-		width: 48%;
+		width: 40%;
 		margin-right: 4%;
 	}
 	ul.products li.product.first
@@ -482,9 +504,6 @@ ul.products li.product .added_to_cart
 /**
  * Single product
  */
-/**
- * Single Product
- */
 .single-product div.product
 {
 	position: relative;
@@ -1010,11 +1029,10 @@ ul.products li.product .added_to_cart
 }
 .woocommerce #payment ul.payment_methods li label img
 {
-	margin-left: .8em;
-	max-width: 200px;
-	height: auto;
-	position: relative;
-	top: 19px;
+	float: right;
+	border: 0;
+	padding: 0;
+	max-height: 1.618em;
 }
 .woocommerce #payment ul.payment_methods li.payment_method_paypal .about_paypal
 {