You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
Cover Block: Opt in to the experimental Custom Spacing control. #2277
Varia Most of the themes don't seem to have opted in the spacing option for the Cover block. It seems easy to implement, and the customer would be able to use it as soon as we add the support to the themes.
Edit: This will require theme.json support, see below. (@kwight)
This feature is opt-in via add_theme_support. In order to show the padding controls, the following needs to be added to a theme's function.php add_theme_support( 'experimental-custom-spacing' );
changed the title [-]Varia themes: Opt in Custom Spacing Control for Cover Block[/-][+]Opt in Custom Spacing Control for Cover Block[/+]on Sep 18, 2020
I'll confess I haven't been able to get this working.
add_theme_support( 'experimental-custom-spacing' ); seems to have no effect - and add_theme_support( 'custom-spacing' ); still uses the original style.
@iamtakashi does this padding option/property seem like something that is still possible?
@jordesign Hm, this may have been removed since it was merged; for example, gutenberg_extend_settings_custom_spacing is a function introduced in WordPress/gutenberg#21492, which is no longer present in the client-assets.phpfile. (I also confirmed it's not in the plugin version we have running on dotcom). If you like, you can try tracing back from the current version of the file to see when it was removed.
Alrighty - @MaggieCabrera was super helpful with some advice here:
I think last time we tried to do this we found that we had to add a theme.json file to enable it. By doing that we are opting in to the new layout controls and that requires a whole other degree of refactoring as to not break the alignments of the theme. I’m not sure what we gain from adding the controls right now is worth the amount of work from refactoring the alignments we would have to do.
I'd tend to agree with that - but happy for @ianstewart and @kwight to weigh in?
I'd tend to agree with that - but happy for @ianstewart and @kwight to weigh in?
Sure, it sounds like the Theme Team has been down this road before, and our pod is in no better position to start tackling broad theme.json support at this point (now that I think about it, this sounds vaguely familiar, Ben may have described that to me somewhere). We'll leave this open as it's still valid, but let's move on to other things @jordesign – thanks for digging in!
changed the title [-]Opt in Custom Spacing Control for Cover Block[/-][+]Cover Block: Opt in to the experimental Custom Spacing control.[/+]on Jul 15, 2021
Activity
iamtakashi commentedon Sep 18, 2020
Same as #2449, I'll change this to all themes (that specified in #2449) issue. cc @jeffikus
[-]Varia themes: Opt in Custom Spacing Control for Cover Block[/-][+]Opt in Custom Spacing Control for Cover Block[/+]jordesign commentedon Jun 28, 2021
Happy to handle this - starting with Varia and Seedlet?
jordesign commentedon Jul 5, 2021
I've issued a PR - which seems to add the control for Varia. Wanted to get it checked before I move on to Seedlet.
#4160
jordesign commentedon Jul 12, 2021
I'll confess I haven't been able to get this working.
add_theme_support( 'experimental-custom-spacing' );seems to have no effect - andadd_theme_support( 'custom-spacing' );still uses the original style.@iamtakashi does this padding option/property seem like something that is still possible?
kwight commentedon Jul 12, 2021
@jordesign It looks like it should be
add_theme_support('custom-spacing'): WordPress/gutenberg#27045What do you mean by "still uses the original style"?
jordesign commentedon Jul 13, 2021
add_theme_support('custom-spacing')is already in place in Varia at the moment - and the result is this padding control:But I haven't been able to enable the controls shown in WordPress/gutenberg#21492
kwight commentedon Jul 14, 2021
@jordesign Hm, this may have been removed since it was merged; for example,
gutenberg_extend_settings_custom_spacingis a function introduced in WordPress/gutenberg#21492, which is no longer present in theclient-assets.phpfile. (I also confirmed it's not in the plugin version we have running on dotcom). If you like, you can try tracing back from the current version of the file to see when it was removed.Maybe @jeffikus or @scruffian have more insight?
jordesign commentedon Jul 15, 2021
It looks like it may have been removed in WordPress/gutenberg#25141 in order to have support added as part of theme.json.
jordesign commentedon Jul 15, 2021
Alrighty - @MaggieCabrera was super helpful with some advice here:
I'd tend to agree with that - but happy for @ianstewart and @kwight to weigh in?
kwight commentedon Jul 15, 2021
Sure, it sounds like the Theme Team has been down this road before, and our pod is in no better position to start tackling broad
theme.jsonsupport at this point (now that I think about it, this sounds vaguely familiar, Ben may have described that to me somewhere). We'll leave this open as it's still valid, but let's move on to other things @jordesign – thanks for digging in![-]Opt in Custom Spacing Control for Cover Block[/-][+]Cover Block: Opt in to the experimental Custom Spacing control.[/+]jeffikus commentedon Jan 28, 2022
@jordesign is this still an issue? If not let's close this out.
jordesign commentedon Jan 31, 2022
Thanks for checking @jeffikus - confirming this is no longer an issue - I'll close it out.