Merge pull request #13898 from rellect/sass_woocommerce

Remove deep nesting where not necessary (woocommerce.scss)
This commit is contained in:
Mike Jolley 2017-04-27 12:07:29 +01:00 committed by GitHub
commit 8f5a8b0ede
1 changed files with 299 additions and 398 deletions

View File

@ -39,10 +39,8 @@ p.demo_store,
}
}
.admin-bar {
p.demo_store {
.admin-bar p.demo_store {
top: 32px;
}
}
/**
@ -103,12 +101,10 @@ p.demo_store,
}
}
.quantity {
.qty {
.quantity .qty {
width: 3.631em;
text-align: center;
}
}
/**
* Product Page
@ -435,11 +431,9 @@ p.demo_store,
}
}
.woocommerce-variation-description {
p {
.woocommerce-variation-description p {
margin-bottom: 1em;
}
}
.reset_variations {
visibility: hidden;
@ -518,8 +512,7 @@ p.demo_store,
}
}
ul.products {
li.product {
ul.products li.product {
.onsale {
top: 0;
right: 0;
@ -585,7 +578,6 @@ p.demo_store,
}
}
}
}
.woocommerce-result-count {
margin: 0 0 1em;
@ -689,14 +681,12 @@ p.demo_store,
}
}
&.added {
&::after {
&.added::after {
font-family: 'WooCommerce';
content: '\e017';
margin-left: 0.53em;
vertical-align: bottom;
}
}
&:hover {
background-color: $secondary - #111;
@ -915,22 +905,17 @@ p.demo_store,
}
}
.products {
.star-rating {
.products .star-rating {
display: block;
margin: 0 0 0.5em;
float: none;
}
}
.hreview-aggregate {
.star-rating {
.hreview-aggregate .star-rating {
margin: 10px 0 0;
}
}
#review_form {
#respond {
#review_form #respond {
@include clearfix();
position: static;
margin: 0;
@ -943,18 +928,15 @@ p.demo_store,
margin: 0 0 10px;
}
.form-submit {
input {
.form-submit input {
left: auto;
}
}
textarea {
box-sizing: border-box;
width: 100%;
}
}
}
p.stars {
a {
@ -978,20 +960,14 @@ p.demo_store,
text-indent: 0;
}
&:hover {
~ a::before {
&:hover ~ a::before {
content: '\e021';
}
}
}
&:hover {
a {
&::before {
&:hover a::before {
content: '\e020';
}
}
}
&.selected {
a.active {
@ -1004,13 +980,11 @@ p.demo_store,
}
}
a:not( .active ) {
&::before {
a:not( .active )::before {
content: '\e020';
}
}
}
}
/**
* Tables
@ -1074,14 +1048,12 @@ p.demo_store,
}
}
tbody:first-child {
tr:first-child {
tbody:first-child tr:first-child {
th,
td {
border-top: 0;
}
}
}
tfoot td,
tfoot th,
@ -1125,14 +1097,12 @@ p.demo_store,
&:last-child {
text-align: left;
}
.woocommerce-MyAccount-downloads-file {
&::before {
.woocommerce-MyAccount-downloads-file::before {
content: '\2193';
display: inline-block;
}
}
}
}
td.product-name {
dl.variation, .wc-item-meta {
@ -1165,7 +1135,6 @@ p.demo_store,
min-width: 80px;
}
/**
* Cart sidebar
*/
@ -1241,8 +1210,7 @@ p.demo_store,
}
}
.cart_list {
li {
.cart_list li {
padding-left: 2em;
position: relative;
padding-top: 0;
@ -1253,7 +1221,6 @@ p.demo_store,
left: 0;
}
}
}
.buttons {
@include clearfix();
@ -1267,8 +1234,7 @@ p.demo_store,
/**
* Forms
*/
form {
.form-row {
form .form-row {
padding: 3px;
margin: 0 0 6px;
@ -1363,7 +1329,6 @@ p.demo_store,
line-height: normal;
}
}
}
form.login,
form.checkout_coupon,
@ -1442,8 +1407,7 @@ p.demo_store,
/**
* Layered nav widget
*/
.widget_layered_nav {
ul {
.widget_layered_nav ul {
margin: 0;
padding: 0;
border: 0;
@ -1460,19 +1424,13 @@ p.demo_store,
}
}
li.chosen {
a {
&::before {
li.chosen a::before {
@include iconbefore( '\e013' );
color: $red;
}
}
}
}
}
.widget_layered_nav_filters {
ul {
.widget_layered_nav_filters ul {
margin: 0;
padding: 0;
border: 0;
@ -1495,7 +1453,6 @@ p.demo_store,
}
}
}
}
/**
* Price filter widget
@ -1512,9 +1469,6 @@ p.demo_store,
.button {
font-size: 1.15em;
}
.button {
float: left;
}
}
@ -1577,8 +1531,7 @@ p.demo_store,
/**
* Rating Filter Widget
*/
.widget_rating_filter {
ul {
.widget_rating_filter ul {
margin: 0;
padding: 0;
border: 0;
@ -1600,16 +1553,11 @@ p.demo_store,
}
}
li.chosen {
a {
&::before {
li.chosen a::before {
@include iconbefore( '\e013' );
color: $red;
}
}
}
}
}
}
/**
@ -1690,18 +1638,8 @@ button.pswp__button--zoom:hover {
/**
* Right to left styles
*/
.rtl {
&.woocommerce {
div.product {
div.images {
.flex-control-thumbs {
li {
.rtl.woocommerce div.product div.images .flex-control-thumbs li {
float: right;
}
}
}
}
}
}
.woocommerce-message {
@ -1738,8 +1676,7 @@ button.pswp__button--zoom:hover {
@include clearfix();
}
.addresses {
.title {
.addresses .title {
@include clearfix();
h3 {
@ -1750,23 +1687,17 @@ button.pswp__button--zoom:hover {
float: right;
}
}
}
ol.commentlist.notes {
li.note {
ol.commentlist.notes li.note {
p.meta {
font-weight: 700;
margin-bottom: 0;
}
.description {
p:last-child {
.description p:last-child {
margin-bottom: 0;
}
}
}
}
ul.digital-downloads {
margin-left: 0;
padding-left: 0;
@ -1808,9 +1739,7 @@ button.pswp__button--zoom:hover {
vertical-align: middle;
}
td.actions {
.coupon {
.input-text {
td.actions .coupon .input-text {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@ -1821,8 +1750,6 @@ button.pswp__button--zoom:hover {
outline: 0;
line-height: 1;
}
}
}
input {
margin: 0;
@ -1852,20 +1779,16 @@ button.pswp__button--zoom:hover {
display: block;
}
.shipping-calculator-button {
&::after {
.shipping-calculator-button::after {
@include iconafter( '\e019' );
}
}
}
.cart_totals {
p {
small {
p small {
color: $subtext;
font-size: 0.83em;
}
}
table {
border-collapse: separate;
@ -1910,14 +1833,10 @@ button.pswp__button--zoom:hover {
}
}
.cross-sells {
ul.products {
li.product {
.cross-sells ul.products li.product {
margin-top: 0;
}
}
}
}
.checkout {
.col-2 {
h3#ship-to-different-address {
@ -2168,20 +2087,15 @@ button.pswp__button--zoom:hover {
/**
* Twenty Eleven specific styles
*/
#content.twentyeleven {
.woocommerce-pagination {
a {
#content.twentyeleven .woocommerce-pagination a {
font-size: 1em;
line-height: 1;
}
}
}
/**
* Twenty Thirteen specific styles
*/
.single-product {
.twentythirteen {
.single-product .twentythirteen {
.entry-summary,
#reply-title,
#respond #commentform {
@ -2191,42 +2105,29 @@ button.pswp__button--zoom:hover {
p.stars {
clear: both;
}
}
}
.twentythirteen {
.woocommerce-breadcrumb {
.twentythirteen .woocommerce-breadcrumb {
padding-top: 40px;
}
}
/**
* Twenty Fourteen specific styles
*/
.twentyfourteen {
ul.products {
li.product {
.twentyfourteen ul.products li.product {
margin-top: 0 !important;
}
}
}
/**
* Twenty Sixteen specific styles
*/
body:not( .search-results ) {
.twentysixteen {
.entry-summary {
body:not( .search-results ) .twentysixteen .entry-summary {
color: inherit;
font-size: inherit;
line-height: inherit;
}
}
}
.twentysixteen {
.price ins {
.twentysixteen .price ins {
background: inherit;
color: inherit;
}
}