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

TT1 blocks: use container blocks with padding controls instead of spacers #223

Open
vindl opened this issue Feb 23, 2021 · 4 comments
Open

Comments

@vindl
Copy link
Member

vindl commented Feb 23, 2021

Currently we are using Spacer blocks to simulate padding within Header and Footer areas in this theme.

Screenshot 2021-02-23 at 14 46 26

Would it make sense to replace these with Group block (or similar) that would allow us to control the padding via its block settings:

Screenshot 2021-02-23 at 14 47 48

cc @kjellr

@carolinan
Copy link
Collaborator

I think the question is, is there any open issue about or progress on adding the padding to the template parts?

Like you said the group block is the closest block with padding that we could use, and that means adding two unnecessary wrappers inside the template part . -I much prefer the template parts because they reduce the div soup 🥣

@vindl
Copy link
Member Author

vindl commented Feb 23, 2021

I think the question is, is there any open issue about or progress on adding the padding to the template parts?

Good point, now that you mention it I think there was an issue for that, but I'm having trouble finding it now.

@pagelab
Copy link

pagelab commented Feb 24, 2021

Good point, now that you mention it I think there was an issue for that, but I'm having trouble finding it now.

@vindl Is this one: WordPress/gutenberg#28845

@kjellr
Copy link
Collaborator

kjellr commented Aug 19, 2021

I took another look at this today, but I'm not totally sure about adding this to the template part. If we do that, we would have to add the spacing individually in each template that uses this template part. If a user were to edit the spacing in one of those templates, their change won't sync across to every other template.

With the current spacers approach, we're setting the spacing within the template part itself, which means it's defined in one place instead of many. If a user changes it, the spacing will update on all instances of that template part.

We could of course add another wrapping element in the header/footer, and add padding to that. But that results in additional nested items, and I'm not sure that's preferable.

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

No branches or pull requests

4 participants