Skip to content

Alignment: categories block forces aligncenter regardless of what is selected in the toolbar #7910

@designsimply

Description

@designsimply

Moved from #4010 h/t @bradyvercher.

Steps to reproduce:

  1. Insert a categories block and publish (the class is aligncenter).
  2. Align it right and save (the class is alignright).
  3. Unselect alignment and save (the class is aligncenter).

Result:

The PHP render method forces an aligncenter class to be applied even when an alignment button isn't selected in the toolbar.

screen shot 2018-07-11 at wed jul 11 5 55 16 pm
Seen at http://alittletestblog.com/2018/07/11/categories-block/ running WordPress 4.9.7 and Gutenberg 3.2.0 using Firefox 61.0.1 on macOS 10.13.5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] BlocksOverall functionality of blocks[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions