This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
Add global styles to Product Title block #4919
Labels
block-type: product elements
Issues related to Product Element blocks.
focus: global styles
Issues that involve styles/css/layout structure.
type: enhancement
The issue is a request for an enhancement.
Currently, the Product Title block allows to change the font size, and color:
However, this is done using a custom implementation and restricted to the feature plugin:
https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/e23b51119dfa5c11e67ab0b3cbd89d49189a8569/assets/js/atomic/blocks/product-elements/title/edit.js#L77-L107
This issue is about removing this implementation and instead replace it with global styles, that's it: using the
supports
parameter when registering the block. An example of blocks using global styles, are the reviews blocks:https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/eebc7a627baf73591114365a0a61fb82e7485767/assets/js/blocks/reviews/all-reviews/index.js#L34-L42
That was implemented in this PR, which can be used as a reference: #4323.
One challenge of this issue is that we might need to update the block to use
apiVersion: 2
.The text was updated successfully, but these errors were encountered: