Add CORE/CODE configurable styles to BCB #3485
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds configurable border (color/style/width/radius) and color (text/background) to the core/code block via custom theme.json configuration.
The code block example for Blank Canvas doesn't seem to be behaving properly (I couldn't say why...) so the styles from the form configuration were used for this block's border configuration value.
Additionally the "padding" attributes applied in _alignment have been refactored slightly to be less specific. As it was a block was unable to define a padding variable without additional specificity hacking. This was discovered while attempting to add custom padding configuration to this core/code block per the linked Gutenberg PR. Additionally that code was (inappropriately) enforcing a top/bottom padding of 0 on all the blocks, even if that wasn't their natural state.
In the Gutenberg change that adds the ability to configure this block additionally the font-stylings were discussed as something to be added. However there wasn't a need to do that and bring the styles in alignment with Blank Canvas so that customization option has been deferred until it's needed (and hopefully that will be after something like this is complete).
Before:
After: