Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'trunk' into release/10.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
opr authored Jul 6, 2023
2 parents 4bcaaa1 + 7fe5f06 commit 058ae2e
Show file tree
Hide file tree
Showing 88 changed files with 590 additions and 249 deletions.
1 change: 0 additions & 1 deletion assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@
@include visually-hidden-focus-reveal();
}


.wp-block-group.woocommerce.product .up-sells.upsells.products {
max-width: var(--wp--style--global--wide-size);
}
1 change: 0 additions & 1 deletion assets/js/atomic/blocks/product-elements/image/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.wc-block-components-product-image {
text-decoration: none;
display: block;
position: relative;

a {
border-radius: inherit;
Expand Down
1 change: 0 additions & 1 deletion assets/js/atomic/blocks/product-elements/price/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import type { HTMLAttributes } from 'react';
* Internal dependencies
*/
import type { BlockAttributes } from './types';
import './style.scss';

type Props = BlockAttributes & HTMLAttributes< HTMLDivElement >;

Expand Down
11 changes: 0 additions & 11 deletions assets/js/atomic/blocks/product-elements/price/style.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import classnames from 'classnames';
import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';

/**
* Internal dependencies
*/

interface SingleProductTab {
id: string;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { productDetails } from '@woocommerce/icons';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

registerBlockSingleProductTemplate( {
blockName: metadata.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';
import { Notice } from '@wordpress/components';

/**
* Internal dependencies
*/

export const ProductReviews = () => {
const blockProps = useBlockProps();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockSingleProductTemplate } from '@woocommerce/atomic-utils';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

registerBlockSingleProductTemplate( {
blockName: metadata.name,
Expand Down
108 changes: 5 additions & 103 deletions assets/js/atomic/blocks/product-elements/rating/style.scss
Original file line number Diff line number Diff line change
@@ -1,110 +1,12 @@
.wc-block-components-product-rating {
display: block;
line-height: 1;

&__stars {
display: inline-block;
overflow: hidden;
position: relative;
width: 5.3em;
height: 1.618em;
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-weight: 400;

&.wc-block-grid__product-rating__stars {
margin: 0;
}

&::before {
content: "\53\53\53\53\53";
top: 0;
left: 0;
right: 0;
position: absolute;
opacity: 0.5;
color: inherit;
white-space: nowrap;
}
span {
overflow: hidden;
top: 0;
left: 0;
right: 0;
position: absolute;
color: inherit;
padding-top: 1.5em;
}
span::before {
content: "\53\53\53\53\53";
top: 0;
left: 0;
right: 0;
position: absolute;
color: inherit;
white-space: nowrap;
.wc-block-components-product-rating__container {
> * {
vertical-align: middle;
}
}

.wc-block-all-products & {
margin-top: 0;
margin-bottom: $gap-small;
}

&__container {
display: flex;
align-items: center;
column-gap: $gap-smaller;
}

&__norating-container {
display: inline-flex;
flex-direction: row;
align-items: center;
gap: $gap-smaller;
}

&__norating {
.wc-block-components-product-rating__stars {
display: inline-block;
overflow: hidden;
position: relative;
width: 1.5em;
height: 1.618em;
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-weight: 400;
-webkit-text-stroke: 2px var(--wp--preset--color--black, #000);
&::before {
content: "\53";
top: 0;
left: 0;
right: 0;
position: absolute;
color: transparent;
white-space: nowrap;
text-align: center;
}
}
}

.wc-block-all-products,
.wp-block-query {
.is-loading {
.wc-block-components-product-rating {
@include placeholder();
width: 7em;
}
}

.wc-block-components-product-rating__container {
display: block;
}

.wc-block-components-product-rating__stars.wc-block-grid__product-rating__stars {
margin: inherit;
margin: 0;
}
}
4 changes: 4 additions & 0 deletions assets/js/base/components/country-input/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import "node_modules/@wordpress/base-styles/breakpoints";
@import "node_modules/@wordpress/base-styles/mixins";
@import "node_modules/wordpress-components/src/combobox-control/style";

.wc-block-components-country-input {
margin-top: em($gap-large);
}
1 change: 1 addition & 0 deletions assets/js/base/components/form-token-field/vendor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
@import "node_modules/@wordpress/base-styles/mixins";
@import "node_modules/wordpress-components/src/popover/style";
@import "node_modules/wordpress-components/src/tooltip/style";
@import "node_modules/wordpress-components/src/form-token-field/style";
/* stylelint-enable no-invalid-position-at-import-rule */
}
4 changes: 3 additions & 1 deletion assets/js/base/components/notice-banner/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}

// Legacy notice compatibility.
.wc-forward.wp-element-button {
.wc-forward {
float: right;
color: $gray-800 !important;
background: transparent;
Expand All @@ -52,6 +52,8 @@
border: 0;
appearance: none;
opacity: 0.6;
text-decoration-line: underline;
text-underline-position: under;

&:hover,
&:focus,
Expand Down
12 changes: 12 additions & 0 deletions assets/js/base/components/product-price/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
}
/*rtl:end:ignore*/

.wc-block-components-product-price {
display: block;

.wc-block-all-products .wc-block-components-product-price {
margin-bottom: $gap-small;
}

ins {
text-decoration: none;
}
}

.wc-block-components-product-price__value {
&.is-discounted {
margin-left: 0.5em;
Expand Down
1 change: 1 addition & 0 deletions assets/js/base/components/product-rating/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { __, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
*/
import './style.scss';

const Rating = ( {
className,
Expand Down
114 changes: 114 additions & 0 deletions assets/js/base/components/product-rating/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.wc-block-components-product-rating {
display: block;
line-height: 1;

&__stars {
display: inline-block;
overflow: hidden;
position: relative;
width: 5.3em;
height: 1.618em;
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-weight: 400;

&.wc-block-grid__product-rating__stars {
margin: 0;
}

&::before {
content: "\53\53\53\53\53";
top: 0;
left: 0;
right: 0;
position: absolute;
opacity: 0.5;
color: inherit;
white-space: nowrap;
}
span {
overflow: hidden;
top: 0;
left: 0;
right: 0;
position: absolute;
color: inherit;
padding-top: 1.5em;
}
span::before {
content: "\53\53\53\53\53";
top: 0;
left: 0;
right: 0;
position: absolute;
color: inherit;
white-space: nowrap;
}
}

.wc-block-all-products & {
margin-top: 0;
margin-bottom: $gap-small;
}

&__container {
> * {
vertical-align: middle;
}
}

&__reviews_count {
margin-left: $gap-smaller;
}

&__norating-container {
display: inline-flex;
flex-direction: row;
align-items: center;
gap: $gap-smaller;
}

&__norating {
display: inline-block;
overflow: hidden;
position: relative;
width: 1.5em;
height: 1.618em;
line-height: 1.618;
font-size: 1em;
/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
font-family: star;
font-weight: 400;
-webkit-text-stroke: 2px var(--wp--preset--color--black, #000);
&::before {
content: "\53";
top: 0;
left: 0;
right: 0;
position: absolute;
color: transparent;
white-space: nowrap;
text-align: center;
}
}
}

.wc-block-all-products,
.wp-block-query {
.is-loading {
.wc-block-components-product-rating {
@include placeholder();
width: 7em;
}
}

.wc-block-components-product-rating__container {
display: block;
}

.wc-block-components-product-rating__stars.wc-block-grid__product-rating__stars {
margin: inherit;
}
}
1 change: 1 addition & 0 deletions assets/js/blocks/breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Icon, queryPagination } from '@wordpress/icons';
*/
import metadata from './block.json';
import edit from './edit';
import './style.scss';

const featurePluginSupport = {
...metadata.supports,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { PAYMENT_STORE_KEY } from '@woocommerce/block-data';
import NoPaymentMethods from './no-payment-methods';
import PaymentMethodOptions from './payment-method-options';
import SavedPaymentMethodOptions from './saved-payment-method-options';
import './style.scss';

/**
* PaymentMethods component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { registerBlockType } from '@wordpress/blocks';
* Internal dependencies
*/
import { Edit, Save } from './edit';
import './style.scss';

registerBlockType( 'woocommerce/cart-cross-sells-products-block', {
icon: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type { TemplateArray } from '@wordpress/blocks';
/**
* Internal dependencies
*/
import './style.scss';
import {
useForcedLayout,
getAllowedBlocks,
Expand Down
Loading

0 comments on commit 058ae2e

Please sign in to comment.