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

72 lines
1.4 KiB
SCSS
Raw Normal View History

// Hack to hide preview overflow.
.editor-block-preview__content {
overflow: hidden;
}
// Align the block icons in edit mode
.components-placeholder__label .gridicon,
.components-placeholder__label .material-icon {
margin-right: 1ch;
fill: currentColor;
}
Dynamic grid blocks: Try using ServerSideRender component for preview (https://github.com/woocommerce/woocommerce-blocks/pull/565) * Add grid block base class to handle rendering all grid blocks Using code from the shortcode handler to create the query, subclass into newest product to show use * Update preview content to match rendering from the new grid block handler * Fix the categories query builder * Update order of rating/price * Remove center alignment * Extract rating & button into separate functions * Wrap the content in a link * Add the current class names for better theme support * Fix some styling in editor preview & frontend * Add back the deprecated cols support for existing blocks * Add multiple-rows class, style tweaks * Switch Newest Products to dynamic rendering, deprecate existing shortcode method * Add “On Sale” flag * Switch “On Sale Products” to dynamic rendering * Fix reusable block preview * Add correct classes to On Sale Products * Remove dynamic blocks from CSS hidden content rules Content is not output to browser now, so we don’t need to hide it * Fix undefined parameters * Fix attributes for on sale * Add deprecation comment, use more descriptive function name * Addressing review feedback * Update test: classnames have changed, image now wrapped in div * Disable HTML editing for dynamic blocks * Moved rendering logic into block library * Try using ServerSideRender component for preview * Define the schema for contentVisibility This ensures the API correctly uses boolean instead of “true”/“false” strings * Move the star rating CSS to the general grid-blocks section * Remove the list styling, which is added back by core GB styles * Fix stylelint issues
2019-05-21 20:34:48 +00:00
// Remove the list styling, which is added back by core GB styles.
.editor-styles-wrapper {
.wc-block-grid {
.wc-block-grid__products {
list-style: none;
margin: 0 (-$gap*0.5) $gap;
padding: 0;
.wc-block-grid__product {
margin: 0 0 $gap-large 0;
}
}
&.components-placeholder {
padding: 2em 1em;
}
&.is-loading,
&.is-not-found {
display: block;
}
}
}
// Style inline notices in the inspector.
.components-base-control {
+ .wc-block-base-control-notice {
margin: -$gap 0 $gap;
}
& + .wc-block-base-control-notice:last-child {
margin: -$gap 0 $gap-small;
}
}
// Selectors with extra specificity to override some editor styles.
.woocommerce-search-list__list.woocommerce-search-list__list {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.woocommerce-search-list__selected.woocommerce-search-list__selected > ul {
list-style: none;
margin: 0;
padding: 0;
}
.theme-twentytwenty {
.wp-block {
.wc-block-grid__product-title,
.wc-block-active-filters__title,
.wc-block-attribute-filter__title,
.wc-block-price-filter__title,
.wc-block-stock-filter__title {
@include font-size(regular);
}
}
}