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

Commit

Permalink
Remove inline style defaults for color options.
Browse files Browse the repository at this point in the history
This replaces the inline style with an added editor-specific styling
with slightly more specificity - but not too much to where it overrides
the Site Editor.
  • Loading branch information
danielwrobert committed Sep 2, 2022
1 parent fef3c6c commit 1ff3c6b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
8 changes: 0 additions & 8 deletions assets/js/blocks/featured-items/featured-category/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@
"showDesc": {
"type": "boolean",
"default": true
},
"style": {
"type": "object",
"default": {
"color": {
"text": "#ffffff"
}
}
}
},
"textdomain": "woo-gutenberg-products-block",
Expand Down
4 changes: 4 additions & 0 deletions assets/js/blocks/featured-items/featured-category/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
@extend %with-media-controls;
@extend %with-resizable-box;
}

.editor-styles-wrapper .wp-block-woocommerce-featured-category {
@extend %wp-block-featured-item;
}
8 changes: 0 additions & 8 deletions assets/js/blocks/featured-items/featured-product/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@
"showPrice": {
"type": "boolean",
"default": true
},
"style": {
"type": "object",
"default": {
"color": {
"text": "#ffffff"
}
}
}
},
"textdomain": "woo-gutenberg-products-block",
Expand Down
4 changes: 4 additions & 0 deletions assets/js/blocks/featured-items/featured-product/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
margin-bottom: 16px;
}
}

.editor-styles-wrapper .wp-block-woocommerce-featured-product {
@extend %wp-block-featured-item;
}

0 comments on commit 1ff3c6b

Please sign in to comment.