Browse Source

Merge pull request #180 from Automattic/radcliffe-2-additional-wc-fixes

Radcliffe 2: Adds additional WooCommerce fixes
Daniel Dudzic 7 years ago
parent
commit
cd9e2b5714
4 changed files with 368 additions and 353 deletions
  1. 1 0
      radcliffe-2/inc/woocommerce.php
  2. 0 336
      radcliffe-2/rtl.css
  3. 338 0
      radcliffe-2/woocommerce-rtl.css
  4. 29 17
      radcliffe-2/woocommerce.css

+ 1 - 0
radcliffe-2/inc/woocommerce.php

@@ -41,6 +41,7 @@ add_action( 'after_setup_theme', 'radcliffe_2_woocommerce_setup' );
  */
 function radcliffe_2_woocommerce_scripts() {
 	wp_enqueue_style( 'radcliffe-2-woocommerce-style', get_template_directory_uri() . '/woocommerce.css' );
+	wp_style_add_data( 'radcliffe-2-woocommerce-style', 'rtl', get_stylesheet_directory_uri() . '/woocommerce-rtl.css' );
 }
 
 add_action( 'wp_enqueue_scripts', 'radcliffe_2_woocommerce_scripts' );

+ 0 - 336
radcliffe-2/rtl.css

@@ -220,342 +220,6 @@ ol.children ol.children {
 	float: right;
 }
 
-/*--------------------------------------------------------------
-# WooCommerce
---------------------------------------------------------------*/
-
-.woocommerce .site-main > .woocommerce-message {
-	text-align: right;
-}
-
-.woocommerce .site-main > .woocommerce-message .button {
-	float: left;
-}
-
-.woocommerce-sorting-wrap {
-	text-align: right;
-}
-
-table.shop_table_responsive tr td {
-	text-align: right;
-}
-
-table.shop_table_responsive tr td::before{
-	float: right;
-}
-
-table.shop_table_responsive tr td.product-remove a {
-	text-align: right;
-}
-
-table.shop_table_responsive.my_account_orders .order-actions{
-	text-align: left;
-}
-
-@media screen and (min-width: 768px) {
-
-	table.shop_table_responsive tr td {
-		text-align: left;
-	}
-
-	table.shop_table_responsive tr th,
-	table.shop_table_responsive tr td {
-		text-align: right;
-	}
-
-	table.shop_table_responsive tbody .coupon {
-		float: right;
-	}
-
-	table.shop_table_responsive tbody input[name="update_cart"] {
-		float: left;
-	}
-}
-
-ul.products li.product a.added_to_cart {
-	margin-left: 0px;
-	margin-right: 6px;
-}
-
-@media screen and (min-width: 768px) {
-
-	ul.products li.product {
-		float: right;
-		margin-left: 3.8%;
-		margin-right: 0;
-	}
-
-	ul.products li.product.last {
-		margin-left: 0;
-	}
-}
-
-.single-product div.product .onsale {
-	left: auto;
-	right: 4%;
-}
-
-.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
-	left: 0;
-	right: auto;
-}
-
-.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:nth-child(3n) {
-	margin-left: 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:nth-child(5n) {
-	margin-left: 0;
-}
-
-.single-product div.product .cart {
-	float: right;
-	margin: 0 0 3em 40px;
-}
-
-.single-product div.product .product_meta {
-	float: left;
-}
-
-@media screen and (min-width: 768px) {
-
-	.single-product div.product .onsale {
-		left: auto;
-		right: 25%;
-	}
-}
-
-.single-product div.product .commentlist .comment-text .meta {
-	margin-right: 5px;
-	margin-left: 0;
-}
-
-.single-product div.product .comment .avatar {
-	left: auto;
-	right: inherit;
-}
-
-.woocommerce-cart td.actions {
-	text-align: left;
-}
-
-.woocommerce-cart .cart_totals h2 {
-	text-align: right;
-}
-
-.woocommerce-cart .cart_totals .shop_table {
-	text-align: right;
-}
-
-.woocommerce-cart .wc-proceed-to-checkout {
-	text-align: right;
-}
-
-.woocommerce-checkout .shop_table {
-	text-align: right;
-}
-
-.woocommerce #payment [for="payment_method_paypal"]>img {
-	margin-right: 40px;
-	margin-left: 0;
-	float: left;
-}
-
-@media screen and (min-width: 768px) {
-
-	.woocommerce-address-fields__field-wrapper .form-row-first,
-	.col2-set .form-row-first {
-		float: right;
-		margin-left: 40px;
-		margin-right: 0;
-	}
-
-	.woocommerce-address-fields__field-wrapper .form-row-last,
-	.col2-set .form-row-last {
-		float: left;
-		margin-left: 0;
-	}
-}
-
-@media screen and (min-width: 48em) {
-
-	.woocommerce-account .woocommerce .col-1 {
-		float: right;
-	}
-
-	.woocommerce-account .woocommerce .col-2 {
-		float: left;
-	}
-}
-
-.woocommerce-MyAccount-navigation ul {
-	padding-right: 0;
-}
-
-.woocommerce-MyAccount-navigation a .icon {
-	margin-left: 0;
-	margin-right: 6px;
-}
-
-.woocommerce-MyAccount-navigation ul ul ul {
-	left: auto;
-	right: -999em;
-}
-
-.woocommerce-MyAccount-navigation ul li:hover>ul,
-.woocommerce-MyAccount-navigation ul li.focus>ul {
-	right: auto;
-}
-
-.woocommerce-MyAccount-navigation ul ul li:hover>ul,
-.woocommerce-MyAccount-navigation ul ul li.focus>ul {
-	left: auto;
-	right: 100%;
-}
-
-.woocommerce-MyAccount-content {
-	text-align: right;
-}
-
-.site-header-cart ul {
-	padding-right: 0;
-}
-
-.site-header-cart .cart-contents .icon {
-	margin-left: 6px;
-	margin-right: 0;
-}
-
-.site-header-cart ul ul ul {
-	left: auto;
-	right: -999em;
-}
-
-.site-header-cart ul li:hover>ul,
-.site-header-cart ul li.focus>ul {
-	right: auto;
-}
-
-.site-header-cart ul ul li:hover>ul,
-.site-header-cart ul ul li.focus>ul {
-	left: auto;
-	right: 100%;
-}
-
-@media screen and (min-width: 768px) {
-
-	.site-header-cart {
-		text-align: left;
-	}
-
-	.site-header-cart>li:last-of-type {}
-	.site-header-cart .widget_shopping_cart {
-		left: auto;
-		right: -999em;
-	}
-
-	.site-header-cart:hover .widget_shopping_cart,
-	.site-header-cart.focus .widget_shopping_cart {
-		left: 0;
-		right: auto;
-	}
-
-	.site-header-cart .widget_shopping_cart_content {
-		float: left;
-	}
-
-	.menu-1-empty .site-header-cart .widget_shopping_cart_content {
-		float: right;
-	}
-
-	.site-header-cart .widget_shopping_cart_content:after {
-		left: 60px;
-		right: auto;
-		margin-right: -10px;
-		margin-left: 0;
-	}
-
-
-	#site-header-cart .widget_shopping_cart_content .mini_cart_item {
-		margin-left: 6.5%;
-		margin-right: 0;
-	}
-
-	#site-header-cart .widget_shopping_cart_content .mini_cart_item:nth-child(4n),
-	#site-header-cart .widget_shopping_cart_content .mini_cart_item:last-child {
-		margin-left: 0;
-	}
-}
-
-.star-rating:before {
-	float: right;
-	left: auto;
-	right: 0;
-}
-
-.star-rating span {
-	float: right;
-	left: auto;
-	right: 0;
-}
-
-.star-rating span:before {
-	left: auto;
-	right: 0;
-}
-
-p.stars a {
-	margin-left: 1px;
-	margin-right: 0;
-}
-
-p.stars a:before {
-	left: auto;
-	right: 0;
-}
-
-.woocommerce-password-strength {
-	text-align: left;
-}
-
-.woocommerce-info .woocommerce-Button {
-	float: left;
-}
-
-.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a {
-	margin-left: 1em;
-	margin-right: 0;
-}
-
-.woocommerce.widget_rating_filter .star-rating {
-	float: right;
-}
-
-.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:last-child {
-	margin-left: 0;
-	margin-right: -1em;
-}
-
 /*--------------------------------------------------------------
 # Media Queries
 --------------------------------------------------------------*/

+ 338 - 0
radcliffe-2/woocommerce-rtl.css

@@ -0,0 +1,338 @@
+/*
+ * Theme Name: Radcliffe 2
+ *
+ * RTL additions
+ *
+ */
+
+.woocommerce .site-main > .woocommerce-message {
+	text-align: right;
+}
+
+.woocommerce .site-main > .woocommerce-message .button {
+	float: left;
+}
+
+.woocommerce-sorting-wrap {
+	text-align: right;
+}
+
+table.shop_table_responsive tr td {
+	text-align: left;
+}
+
+table.shop_table_responsive tr td::before{
+	float: right;
+}
+
+table.shop_table_responsive tr td.product-remove a {
+	text-align: right;
+}
+
+table.shop_table_responsive.my_account_orders .order-actions{
+	text-align: left;
+}
+
+@media screen and (min-width: 768px) {
+
+	table.shop_table_responsive tr td {
+		text-align: left;
+	}
+
+	table.shop_table_responsive tr th,
+	table.shop_table_responsive tr td {
+		text-align: right;
+	}
+
+	table.shop_table_responsive tbody .coupon {
+		float: right;
+	}
+
+	table.shop_table_responsive tbody input[name="update_cart"] {
+		float: left;
+	}
+}
+
+ul.products li.product a.added_to_cart {
+	margin-left: 0px;
+	margin-right: 6px;
+}
+
+@media screen and (min-width: 768px) {
+
+	ul.products li.product {
+		float: right;
+		margin-left: 3.8%;
+		margin-right: 0;
+	}
+
+	ul.products li.product.last {
+		margin-left: 0;
+	}
+}
+
+.single-product div.product .onsale {
+	left: auto;
+	right: 4%;
+}
+
+.single-product div.product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
+	left: 0;
+	right: auto;
+}
+
+.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:nth-child(3n) {
+	margin-left: 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:nth-child(5n) {
+	margin-left: 0;
+}
+
+.single-product div.product .cart {
+	float: right;
+	margin: 0 0 3em 40px;
+}
+
+.single-product div.product .product_meta {
+	float: left;
+}
+
+@media screen and (min-width: 768px) {
+
+	.single-product div.product .onsale {
+		left: auto;
+		right: 25%;
+	}
+}
+
+.single-product div.product .commentlist .comment-text .meta {
+	margin-right: 5px;
+	margin-left: 0;
+}
+
+.single-product div.product .comment .avatar {
+	left: auto;
+	right: inherit;
+}
+
+.woocommerce-cart td.actions {
+	text-align: left;
+}
+
+.woocommerce-cart .cart_totals h2 {
+	text-align: right;
+}
+
+.woocommerce-cart .cart_totals .shop_table {
+	text-align: right;
+}
+
+.woocommerce-cart .wc-proceed-to-checkout {
+	text-align: right;
+}
+
+.woocommerce-checkout .shop_table {
+	text-align: right;
+}
+
+.woocommerce #payment [for="payment_method_paypal"]>img {
+	margin-right: 40px;
+	margin-left: 0;
+	float: left;
+}
+
+@media screen and (min-width: 768px) {
+
+	.woocommerce-address-fields__field-wrapper .form-row-first,
+	.col2-set .form-row-first {
+		float: right;
+		margin-left: 40px;
+		margin-right: 0;
+	}
+
+	.woocommerce-address-fields__field-wrapper .form-row-last,
+	.col2-set .form-row-last {
+		float: left;
+		margin-left: 0;
+	}
+}
+
+@media screen and (min-width: 48em) {
+
+	.woocommerce-account .woocommerce .col-1 {
+		float: right;
+	}
+
+	.woocommerce-account .woocommerce .col-2 {
+		float: left;
+	}
+}
+
+.woocommerce-MyAccount-navigation ul {
+	padding-right: 0;
+}
+
+.woocommerce-MyAccount-navigation a .icon {
+	margin-left: 0;
+	margin-right: 6px;
+}
+
+.woocommerce-MyAccount-navigation ul ul ul {
+	left: auto;
+	right: -999em;
+}
+
+.woocommerce-MyAccount-navigation ul li:hover>ul,
+.woocommerce-MyAccount-navigation ul li.focus>ul {
+	right: auto;
+}
+
+.woocommerce-MyAccount-navigation ul ul li:hover>ul,
+.woocommerce-MyAccount-navigation ul ul li.focus>ul {
+	left: auto;
+	right: 100%;
+}
+
+.woocommerce-MyAccount-content {
+	text-align: right;
+}
+
+.site-header-cart ul {
+	padding-right: 0;
+}
+
+.site-header-cart .cart-contents .icon {
+	margin-left: 6px;
+	margin-right: 0;
+}
+
+.site-header-cart ul ul ul {
+	left: auto;
+	right: -999em;
+}
+
+.site-header-cart ul li:hover>ul,
+.site-header-cart ul li.focus>ul {
+	right: auto;
+}
+
+.site-header-cart ul ul li:hover>ul,
+.site-header-cart ul ul li.focus>ul {
+	left: auto;
+	right: 100%;
+}
+
+@media screen and (min-width: 768px) {
+
+	.site-header-cart {
+		text-align: left;
+	}
+
+	.site-header-cart>li:last-of-type {}
+	.site-header-cart .widget_shopping_cart {
+		left: auto;
+		right: -999em;
+	}
+
+	.site-header-cart:hover .widget_shopping_cart,
+	.site-header-cart.focus .widget_shopping_cart {
+		left: 0;
+		right: auto;
+	}
+
+	.site-header-cart .widget_shopping_cart_content {
+		float: left;
+	}
+
+	.menu-1-empty .site-header-cart .widget_shopping_cart_content {
+		float: right;
+	}
+
+	.site-header-cart .widget_shopping_cart_content:after {
+		left: 60px;
+		right: auto;
+		margin-right: -10px;
+		margin-left: 0;
+	}
+
+
+	#site-header-cart .widget_shopping_cart_content .mini_cart_item {
+		margin-left: 6.5%;
+		margin-right: 0;
+	}
+
+	#site-header-cart .widget_shopping_cart_content .mini_cart_item:nth-child(4n),
+	#site-header-cart .widget_shopping_cart_content .mini_cart_item:last-child {
+		margin-left: 0;
+	}
+}
+
+.star-rating:before {
+	float: right;
+	left: auto;
+	right: 0;
+}
+
+.star-rating span {
+	float: right;
+	left: auto;
+	right: 0;
+}
+
+.star-rating span:before {
+	left: auto;
+	right: 0;
+}
+
+p.stars a {
+	margin-left: 1px;
+	margin-right: 0;
+}
+
+p.stars a:before {
+	left: auto;
+	right: 0;
+}
+
+.woocommerce-password-strength {
+	text-align: left;
+}
+
+.woocommerce-info .woocommerce-Button {
+	float: left;
+}
+
+.woocommerce.widget_shopping_cart .woocommerce-mini-cart__buttons a {
+	margin-left: 1em;
+	margin-right: 0;
+}
+
+.woocommerce.widget_rating_filter .star-rating {
+	float: right;
+}
+
+.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:last-child {
+	margin-left: 0;
+	margin-right: -1em;
+}

+ 29 - 17
radcliffe-2/woocommerce.css

@@ -153,8 +153,8 @@ table.shop_table_responsive tr td.product-remove a {
 }
 
 table.shop_table_responsive tr td.product-remove {
-	background: #fff;
-	border-top: 1.618em solid #fff;
+	background: transparent;
+	border-top: 1.618em solid transparent;
 	padding: 0;
 	position: relative;
 }
@@ -217,8 +217,8 @@ table.shop_table_responsive tbody .coupon .button {
 	}
 
 	table.shop_table_responsive tr td.product-remove {
-		background: transparent;
-		border: 0;
+		border-top: 0;
+		border-bottom: 1px solid #eee;
 		display: table-cell;
 		text-align: center;
 	}
@@ -805,6 +805,16 @@ ul.products li.product .button {
 	font-weight: 400;
 }
 
+dl.variation {
+	font-size: .875em;
+	margin: .875em 0 0 0;
+}
+
+dl.variation dd,
+dl.variation p {
+	margin: 0;
+}
+
 @media screen and (min-width: 768px) {
 
 	.woocommerce-cart td.actions {
@@ -921,6 +931,21 @@ ul.products li.product .button {
 	margin-bottom: 0;
 }
 
+.woocommerce .shop_table tbody ul {
+	list-style: none;
+	margin: 0;
+	padding: 0;
+}
+
+.woocommerce .shop_table tbody .wc-item-meta {
+	font-size: .875em;
+	margin: .875em 0 0 0;
+}
+
+.woocommerce .shop_table tbody .wc-item-meta p {
+	margin: 0;
+}
+
 @media screen and (min-width: 768px) {
 
 	.woocommerce-address-fields__field-wrapper .form-row-first,
@@ -1066,14 +1091,6 @@ ul.products li.product .button {
 	width: 200px;
 }
 
-.woocommerce-MyAccount-navigation ul ul li {}
-
-.woocommerce-MyAccount-navigation ul ul:hover>a,
-.woocommerce-MyAccount-navigation ul ul .focus>a {}
-
-.woocommerce-MyAccount-navigation ul ul a:hover,
-.woocommerce-MyAccount-navigation ul ul a.focus {}
-
 .woocommerce-MyAccount-navigation ul li:hover>ul,
 .woocommerce-MyAccount-navigation ul li.focus>ul {
 	left: auto;
@@ -1084,11 +1101,6 @@ ul.products li.product .button {
 	left: 100%;
 }
 
-.woocommerce-MyAccount-navigation .current_page_item>a,
-.woocommerce-MyAccount-navigation .current-menu-item>a,
-.woocommerce-MyAccount-navigation .current_page_ancestor>a,
-.woocommerce-MyAccount-navigation .current-menu-ancestor>a {}
-
 /* !My Account Content */
 
 .woocommerce-MyAccount-content {