We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow registering new block variations and style them without leaving the editor.
A theme can register new buttons variations such as pill, rounded, circular and style them to be used in the editor.
pill
rounded
circular
Currently it is not possible to create such variations from the editor. A block variations can be registered with javascript
const { registerBlockStyle } = wp.blocks; registerBlockStyle('core/button', { name: 'pill', label: _x('Pill', 'block style', 'theme-name'), });
this creates a new button variations and adds a css class wp-block-button is-style-pill which can be styled from the editor global styles.
wp-block-button is-style-pill
Create block theme can have a UI to create a new block variation, (which adds the required javascript code and enqueues is safely).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Allow registering new block variations and style them without leaving the editor.
Idea:
A theme can register new buttons variations such as
pill
,rounded
,circular
and style them to be used in the editor.Currently it is not possible to create such variations from the editor.
A block variations can be registered with javascript
this creates a new button variations and adds a css class
wp-block-button is-style-pill
which can be styled from the editor global styles.Proposal:
Create block theme can have a UI to create a new block variation, (which adds the required javascript code and enqueues is safely).
The text was updated successfully, but these errors were encountered: