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

Media & Text Block: Applies 'wide' alignment, even in themes that don't support it #11259

Closed
laurelfulford opened this issue Oct 30, 2018 · 2 comments
Labels
[Block] Media & Text Affects the Media & Text Block

Comments

@laurelfulford
Copy link
Contributor

Describe the bug
When you add a Media & Text block to a post, using a theme that doesn't support the wide alignments, it still adds the the .alignwide class on the front end, and the data-align="wide" attribute to the editor.

To Reproduce
Steps to reproduce the behavior:

  1. Start with a theme without wide alignment support (I was using the version of Twenty Seventeen in the 5.0 branch, or Beta 1).
  2. Create a post, and add a "Media & Text" block.
  3. Inspect the block in the editor and note the data-align="wide" attribute.
  4. Publish the post. Inspect the block to see the .alignwide class.

Expected behavior
That the block would not automatically add these alignments, at least in themes that don't support them. If a theme supports them, it does make sense as a default because this block benefits from some extra space.

Screenshots
In the editor (RC 4.1.1):

image

On the front-end (RC 4.1.1):

image

Additional context
I can recreate this in Gutenberg 4.1.1 and WordPress 5.0 beta.

Using the the master branch of the Gutenberg repo (latest commit 9d46788), I can also recreate the issue; in that case, updates to the editor also style the block as 'wide' in the editor (which is the only reason I noticed this!):

image

@Soean Soean added the [Block] Media & Text Affects the Media & Text Block label Oct 31, 2018
@dashkevych
Copy link

I can also recreate this issue when the theme does not have add_theme_support( 'align-wide' ).

@designsimply
Copy link
Member

Closing in order to consolidate with #4342. @laurelfulford, if you feel strongly that the two should remain open separately, please reply and let me know and I will re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block
Projects
None yet
Development

No branches or pull requests

4 participants