woocommerce/plugins/woocommerce-blocks/assets/css/style.scss

339 lines
7.6 KiB
SCSS
Raw Normal View History

Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
// These styles are for the server side rendered product grid blocks.
.wc-block-grid__products .wc-block-grid__product-image {
text-decoration: none;
display: block;
position: relative;
a {
text-decoration: none;
border: 0;
outline: 0;
box-shadow: none;
}
img {
height: auto;
width: auto;
max-width: 100%;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
&[hidden] {
display: none;
}
&[alt=""] {
border: 1px solid $image-placeholder-border-color;
}
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
}
}
.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,
.editor-styles-wrapper .wc-block-grid__product-title,
.wc-block-grid__product-title {
font-family: inherit;
line-height: 1.2;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
font-weight: 700;
padding: 0;
color: inherit;
font-size: inherit;
display: block;
}
.wc-block-grid__product-price {
display: block;
.wc-block-grid__product-price__regular {
margin-right: 0.5em;
}
}
.wc-block-grid__product-add-to-cart.wp-block-button {
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
word-break: break-word;
white-space: normal;
.wp-block-button__link {
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
word-break: break-word;
white-space: normal;
Release: 9.1.1 (https://github.com/woocommerce/woocommerce-blocks/pull/7948) * Empty commit for release pull request * Update the readme file with 9.1.1 release changes * Product Query: Add `Sorted by title` preset. (https://github.com/woocommerce/woocommerce-blocks/pull/7949) * Add `Sort by title` preset. * sorted, thanks @nerrad * Update the readme file with woocommerce/woocommerce-blocks#7949 changes * 9.1.1 Release: Add testing docs * Atomic Block: fix ancestor definition (https://github.com/woocommerce/woocommerce-blocks/pull/7947) * Fix the incorrect layout of Rating and Price in Classic Template and Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7932) * Fix the incorrect layout of Rating and Price in Classic Template There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block * Add dropdown version of Filter by Stock Status (https://github.com/woocommerce/woocommerce-blocks/pull/7831) * Extend Filter by Stock Editor options with dropdown and single/multiple choice * Add dropdown implementation for Filter by Stock Status * Adjust font-sizes to the rest of the filters * Add tests to Filter by Stock: dropdown and list variants * Change test file extension from .js to .tsx, so it handles types as well * Add E2E test to Filter by Stock checking if display style can be toggled * When typing in Filter by Stock dropdown, handle the space so it highlights the suggestions * Change the name of the filter blocks in the test files * Remove unnecessary waiting step in E2E test for Filter by Stock toMatchElement waits for an element for 30s by itself, hence waitForSelector usage was removed * Improve the STOCK_STATUS_OPTIONS type handling * Extract onDropdownChange function instead of inline arrow function * Fix overlaping dropdown content with the wrapper when Filter by Stock was set to single * Product Query: Add patterns (https://github.com/woocommerce/woocommerce-blocks/pull/7857) * Product Query: First attempt at adding patterns * Product Query: Update patterns and the default block template * Product Query: And new and update existing patterns * Product Query: Adjust layout of the Minimal Product Row pattern * Product Query: Update pattern names * Product Query: Polish spaces between blocks inside the patterns * Product Query patterns: Link product titles and improve spacing between product elements * Product Query patterns: Button font-size update * Product Query patterns: Center the pagination * Product Query patterns: Center the pagination for the default pattern * Product Query patterns: Remove an empty column * Product Query patterns: Remove an empty column from the product list with 1:1 images pattern * Add dropdown version of Filter by Rating (https://github.com/woocommerce/woocommerce-blocks/pull/7771) * Rename the setting section to match Filter by Attribute * Add Display Style toggle to the block settings * Set list as a default value of displayStyle for Filter by Rating * Add dropdown variant of Filter by Rating * Extend the Editor settings with selectType: single or multiple * Adjust the styles of a FormTokenField to other dropdown * Align Editor settings order and wording between Filter by Attribute and Rating * Fix the issue with cut off corners of dropdown borders * Provide translated screen reader messages and placeholder * Revert the label property, which is necessary to display checkbox list * Make classname for Rating component optional and remove styling in Filter by Rating * Cover the case when filter with zero products needs string methods for comparison * Handle Typescript errors and add ts-ignore annotations when necessary * Remove explicit key prop assignment in Rating component * Remove leftover property in type definition * Refactor JSX element extension with custom properties to more robust way with object copy * Filter by rating tests (https://github.com/woocommerce/woocommerce-blocks/pull/7845) * Filter by Rating tests: - List single - List multiple - Dropdown single - Dropdown multiple * Adjust the font-size of Filter by Rating dropdown to the rest of the filters * Fix E2E tests after the Editor settings label has been changed * Improve sorting in Filter by Rating dropdown With this change the order of options is always descending: in the chips, suggestions, active filters and URL * Change the name of the filter blocks in the test files * Prevent single dropdown input to overflow the wrapper The issue is fixed in three filters, hence a new shared styles file is created at the path assets/js/blocks/shared/styles/style.css * Remove the unused styles of active options in Filter by Rating Chosen options in Filter by Rating list have been bolded. That was the only filter that was doing it. Class was removed, but not the styles themselves which became obsolete. Removing the leftover styles then * Change the approach of shared styles to fix the dropdown issue in filters Instead of using direct classes, rewrite it to mixin and include in the filters * Fix the Filter by Rating with Products block The problem was with the Products block, that there was incorrect initial value of product ratings query * Align the logic of getting the filters from URL for Filter by Rating with Filter by Stock Co-authored-by: Luigi Teschio <gigitux@gmail.com> * Product Query - Enable "Inherit Query from template" option (https://github.com/woocommerce/woocommerce-blocks/pull/7641) * Add Inherit Query from template option * Update label * Product Elements: Fix block settings (https://github.com/woocommerce/woocommerce-blocks/pull/7914) * Product Elements: Fix block settings * Rating: Fix inactive star color * Product Rating: Fix color inheritance * StyleAttributesUtils: Fix PHP notices and invalid CSS output (https://github.com/woocommerce/woocommerce-blocks/pull/7909) * StyleAttributesUtils: Fix PHP notices and invalid CSS output. Closes woocommerce/woocommerce-blocks#7899. * StyleAttributesUtils: Fix border radius and width support * StyleAttributesUtils: Fix border radius and border color support * StyleAttributesUtils: Include additional checks to deal with PHP warnings * StyleAttributesUtils: Improve the custom border array check * Update MiniCart.php to fix price total amount on page load prices are including tax (https://github.com/woocommerce/woocommerce-blocks/pull/7832) * Update MiniCart.php Added an update to the '$cart_contents_total' variable on the 'get_cart_price_markup' function if $cart->display_prices_including_tax is active. Currently displaying wrong amount total on page load if items are already in the basket. * Update MiniCart.php Removed white spaces? * Update MiniCart.php Fixed IF statement * Remove whitespace at end of line Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Product Query: implement compatibility with Filter by Rating block (https://github.com/woocommerce/woocommerce-blocks/pull/7792) * Product Query: implement compatibility with Filter by Rating block woocommerce/woocommerce-blocks#7631 Product Query: implement compatibility with Filter by Rating block * address feedback * address feedback * add comment * add new zip file link * add missing class * add testing instructions about woocommerce/woocommerce-blocks#7947 * add new zip file link * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update docs/internal-developers/testing/releases/911.md Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Bumping version strings to new version. Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Daniel Dudzic <daniel.dudzic@automattic.com> Co-authored-by: Tung Du <dinhtungdu@gmail.com> Co-authored-by: Luigi Teschio <gigitux@gmail.com> Co-authored-by: kmanijak <karol.manijak@automattic.com> Co-authored-by: Luke O'Regan <oregan.luke@gmail.com> Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2022-12-15 09:02:35 +00:00
margin-right: auto !important;
margin-left: auto !important;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
display: inline-flex;
justify-content: center;
text-align: center;
// Set button font size and padding so it inherits from parent.
padding: 0.5em 1em;
font-size: 1em;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
&.loading {
opacity: 0.25;
}
&.added::after {
font-family: WooCommerce; /* stylelint-disable-line */
content: "\e017";
margin-left: 0.5em;
display: inline-block;
width: auto;
height: auto;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
}
&.loading::after {
font-family: WooCommerce; /* stylelint-disable-line */
content: "\e031";
animation: spin 2s linear infinite;
margin-left: 0.5em;
display: inline-block;
width: auto;
height: auto;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
}
}
}
// Remove button sugar if unlikely to fit.
.has-5-columns:not(.alignfull),
.has-6-columns,
.has-7-columns,
.has-8-columns,
.has-9-columns {
.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link::after {
content: "";
margin: 0;
}
}
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
.wc-block-grid__product-rating {
display: block;
.wc-block-grid__product-rating__stars,
.star-rating {
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;
margin: 0 auto;
text-align: left;
&::before {
content: "\53\53\53\53\53";
top: 0;
left: 0;
right: 0;
position: absolute;
opacity: 0.5;
white-space: nowrap;
}
span {
overflow: hidden;
top: 0;
left: 0;
right: 0;
position: absolute;
padding-top: 1.5em;
}
span::before {
content: "\53\53\53\53\53";
color: inherit;
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
top: 0;
left: 0;
right: 0;
position: absolute;
white-space: nowrap;
}
}
}
.wc-block-grid__product-onsale {
@include font-size(small);
padding: em($gap-smallest) em($gap-small);
display: inline-block;
width: auto;
border: 1px solid #43454b;
border-radius: 3px;
color: #43454b;
background: #fff;
text-align: center;
text-transform: uppercase;
font-weight: 600;
z-index: 9;
position: relative;
}
// Element spacing.
.wc-block-grid__product {
// Not operator necessary for avoid this problem: https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/5925/files#r814043454
.wc-block-grid__product-image:not(.wc-block-components-product-image),
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
.wc-block-grid__product-title {
margin: 0 0 $gap-small;
}
// If centered when toggling alignment on, use auto margins to prevent flexbox stretching it.
.wc-block-grid__product-price,
.wc-block-grid__product-rating,
.wc-block-grid__product-add-to-cart,
.wc-block-grid__product-onsale {
margin: 0 auto $gap-small;
}
}
.theme-twentysixteen {
.wc-block-grid {
// Prevent white theme styles.
.price ins {
color: #77a464;
}
}
}
.theme-twentynineteen {
.wc-block-grid__product {
font-size: 0.88889em;
}
// Change the title font to match headings.
.wc-block-grid__product-title,
.wc-block-grid__product-onsale,
.wc-block-components-product-title,
.wc-block-components-product-sale-badge {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}
.wc-block-grid__product-title::before {
display: none;
}
.wc-block-grid__product-onsale,
.wc-block-components-product-sale-badge {
line-height: 1;
}
.editor-styles-wrapper .wp-block-button .wp-block-button__link:not(.has-text-color) {
color: #fff;
}
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
}
.theme-twentytwenty {
$twentytwenty-headings: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, sans-serif;
$twentytwenty-highlights-color: #cd2653;
.wc-block-grid__product-link {
color: #000;
}
.wc-block-grid__product-title,
.wc-block-components-product-title {
font-family: $twentytwenty-headings;
color: $twentytwenty-highlights-color;
@include font-size(regular);
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
}
.wp-block-columns .wc-block-components-product-title {
margin-top: 0;
}
.wc-block-grid__product-price,
.wc-block-components-product-price {
&__value,
.woocommerce-Price-amount {
font-family: $twentytwenty-headings;
font-size: 0.9em;
}
del {
opacity: 0.5;
}
ins {
text-decoration: none;
}
}
.wc-block-grid__product-rating,
.star-rating {
font-size: 0.7em;
.wc-block-grid__product-rating__stars,
.wc-block-components-product-rating__stars {
line-height: 1;
}
}
.wc-block-grid__product-add-to-cart > .wp-block-button__link,
.wc-block-components-product-button > .wp-block-button__link {
font-family: $twentytwenty-headings;
}
.wc-block-grid__products .wc-block-grid__product-onsale,
.wc-block-components-product-sale-badge {
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
background: $twentytwenty-highlights-color;
color: #fff;
font-family: $twentytwenty-headings;
font-weight: 700;
letter-spacing: -0.02em;
line-height: 1.2;
text-transform: uppercase;
}
// Override style from WC Core that set its position to absolute.
// These rulesets can be removed once https://github.com/woocommerce/woocommerce/pull/26516 is released.
.wc-block-grid__products .wc-block-components-product-sale-badge {
position: static;
}
.wc-block-grid__products .wc-block-grid__product-image .wc-block-components-product-sale-badge {
position: absolute;
}
// These styles are not applied to the All Products atomic block, so it can be positioned normally.
.wc-block-grid__products .wc-block-grid__product-onsale:not(.wc-block-components-product-sale-badge) {
position: absolute;
right: 4px;
top: 4px;
z-index: 1;
}
.wc-block-active-filters__title,
.wc-block-attribute-filter__title,
.wc-block-price-filter__title,
.wc-block-stock-filter__title {
@include font-size(regular);
}
.wc-block-active-filters .wc-block-active-filters__clear-all {
@include font-size(smaller);
}
.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link {
@include font-size(smaller);
padding: em($gap-smaller);
}
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
@media only screen and (min-width: 768px) {
.wc-block-grid__products .wc-block-grid__product-onsale {
@include font-size(small);
padding: em($gap-smaller);
}
}
@media only screen and (min-width: 1168px) {
.wc-block-grid__products .wc-block-grid__product-onsale {
@include font-size(small);
padding: em($gap-smaller);
}
}
}
.theme-twentytwentytwo {
.wc-block-grid__product-add-to-cart {
.added_to_cart {
margin-top: $gap-small;
display: block;
}
}
.wc-block-components-product-price,
.wc-block-grid__product-price {
ins {
text-decoration: none;
}
}
}
// Default screen-reader styles. Included as a fallback for themes that don't have support.
.screen-reader-text {
@include visually-hidden();
}
.screen-reader-text:focus {
@include visually-hidden-focus-reveal();
}