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 CORE/CODE configurable styles to BCB #3485

Closed
wants to merge 3 commits into from

Conversation

pbking
Copy link
Contributor

@pbking pbking commented Mar 17, 2021

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:
image

After:
image

@pbking
Copy link
Contributor Author

pbking commented Mar 18, 2021

This is no longer needed since it can be done via styles in this branch instead.

@pbking pbking closed this Mar 18, 2021
@pbking pbking deleted the add/bcb-code-block-styles branch March 18, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant