Skip to content
New issue

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

Add has_block_style function #52701

Open
strarsis opened this issue Jul 17, 2023 · 0 comments
Open

Add has_block_style function #52701

strarsis opened this issue Jul 17, 2023 · 0 comments
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.

Comments

@strarsis
Copy link
Contributor

What problem does this address?

The has_block core function is very useful for e.g. conditionally enqueuing block-specific assets.
However, in many cases core block styles are used, which can also require larger assets for styling and scripting.
The has_block function can only be used to check for the existence of specific blocks, not block styles for a specific block.

What is your proposed solution?

Add a has_block_style function that checks for the existence of a given block style for a given block.

@foosantos foosantos added the [Type] Enhancement A suggestion for improvement. label Jul 17, 2023
@jordesign jordesign added the [Package] Style Engine /packages/style-engine label Jul 18, 2023
@bph bph added the [Feature] Extensibility The ability to extend blocks or the editing experience label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Package] Style Engine /packages/style-engine [Type] Enhancement A suggestion for improvement.
4 participants