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

wide and full alignment for paragraph block may be needed again. #31429

Open
nickfmc opened this issue May 3, 2021 · 12 comments
Open

wide and full alignment for paragraph block may be needed again. #31429

nickfmc opened this issue May 3, 2021 · 12 comments
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Enhancement A suggestion for improvement.

Comments

@nickfmc
Copy link

nickfmc commented May 3, 2021

With @aristath work on this ticket #25160 I think we need to consider theme developers that use this type of CSS for block alignment. A big issue we have now is nesting paragraphs/headings. You may have a situation where you have a block that is full width and has a bg color on it and inside that you might want to put a paragraph that is aligned wide. Well with this setup your paragraph will go to the smallest declared wrapper size, I'm constantly adding align-wide and align-full classes to my paragraph blocks manually right now to get past this. It doesn't need to be on by default, just a way to declare that you want wide and full alignment available on all blocks.

GB is assuming that all theme developers are using the same CSS for block alignment but do not give a default standard that everyone should be using.

@annezazu annezazu added [Block] Paragraph Affects the Paragraph Block [Type] Enhancement A suggestion for improvement. labels May 6, 2021
@richtabor
Copy link
Member

I agree. I think it's odd how a user may add a wide/fullwidth alignment to the Heading block, but not the Paragraph block. While the new Inherit default layout setting does make every block within the parent block inherit its layout width, if you set a custom value for content/wide — then again its off.

Screenshots

Everything is fullwidth if "Inherit default layout" is enabled (within a Group block).
Screen Shot 2021-07-06 at 10 34 14 AM

What you end up with, if the new "Inherit default layout" setting is false.
Screen Shot 2021-07-06 at 10 33 37 AM

Expected

I'd expect to be able to position P and H blocks similarly. I can't think of a reason why they'd be treated differently.

@richtabor
Copy link
Member

I'm curious what the confusion with having P blocks with wide/full alignment (as referenced here: #9597 ). And what's the justification for having Heading and Paragraph blocks treated differently?

@nickfmc
Copy link
Author

nickfmc commented Aug 11, 2021

can we just expand this to add or have the option to add the wide/full alignments on all blocks? by choosing to only have this on some blocks, WP is basically deciding how you should setup your themes front end block layouts, only without providing any suggestions. if you were to add an align-wide block group and inside it you had a blockquote, it is forced to your narrow wrapper, with no way to make it wide, without just simply adding the alignwide class to it! my block layout works perfect except for this super frustrating fact I have to manually add classes. I used the register block styles to add the align wide class to my blocks that are missing it. then I have to add the .is-style-alignwide class to my styles also, but at least clients can layout the blocks how they need.

  'core/paragraph',
  {
    name: 'alignwide',
    label: 'Align Wide'
  }
);```

@SilasOtoko
Copy link

What @nickfmc posted with having a style option for alignwide works for some cases, but unfortunately it doesn't work if you already have another style option you are trying to use on that element, since only one style option can be selected at a time. :(

@nickfmc
Copy link
Author

nickfmc commented Nov 18, 2022

What @nickfmc posted with having a style option for alignwide works for some cases, but unfortunately it doesn't work if you already have another style option you are trying to use on that element, since only one style option can be selected at a time. :(

don't get me started on one style option! lol I've done that before too, had to do "align wide style one" "align wide style two" .

@james-s-k
Copy link

This is definitely a needed feature. Doesn't make sense why the paragraph block doesn't have alignment settings.

@patrickwc
Copy link

I don't quite understand why you can't make the paragraph block align wide.

I'm a user. I want to add a Heading and a subtitle/paragraph. I want to do this in the template parts area. I add a Heading Block and a Paragraph Block. I group them. I set Heading to alignwide, I can't set Paragraph to alignwide. Really? You can if you add a column block and add a paragraph tag inside a column, and you set the Column block to alignwide, but this seems a bit crazy.

@patrickwc
Copy link

In case it helps someone, you can get around this by having a group block within a group block. Group your group, then set the child group block to be align wide. Paragraph tags inside that block will now all be wide width.

@SilasOtoko
Copy link

In case it helps someone, you can get around this by having a group block within a group block. Group your group, then set the child group block to be align wide. Paragraph tags inside that block will now all be wide width.

Yeah that's a valid method and what I normally end up doing. Just annoying to have to do that.

@paaljoachim
Copy link
Contributor

Paragraph block really should also include alignment controls just like the Heading block. As it creates consistency between two text focused blocks.

@paaljoachim
Copy link
Contributor

I had a client ask me. How can I add wide to the Paragraph block just like the Heading block? I had to say that it is not yet possible.... then say I do not know why one can add wide to Heading and not the Paragraph block.

@kaelansmith
Copy link

Is this feature planned/on the roadmap? If not, any good reason why? I keep coming across the need for this and am surprised this issue is 3 years old (maybe there's a more recent solution I'm unaware of?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Paragraph Affects the Paragraph Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

8 participants