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

Why is the Categories block rendered inside a div, while other similar blocks are not? #9411

Closed
kjellr opened this issue Aug 28, 2018 · 2 comments
Labels
[Feature] Blocks Overall functionality of blocks

Comments

@kjellr
Copy link
Contributor

kjellr commented Aug 28, 2018

During the course of the Block Audit, I noticed that the Categories block is rendered inside of a container div:

<!-- Categories Block -->
<div class="wp-block-categories wp-block-categories-list aligncenter">
  <ul>
    <li class="cat-item cat-item-1"><a href="#">Category</a></li>
    <li class="cat-item cat-item-2"><a href="#">Category</a></li>
    <li class="cat-item cat-item-3"><a href="#">Category</a></li>
  </ul>
</div>

This is at odds with the way the Latest Posts and Archives posts are handled. Those also render simple ul elements, but they have no outer div wrapper:

<!-- Latest Posts Block -->
<ul class="wp-block-latest-posts">
  <li><a href="#">Blog Post 1</a></li>
  <li><a href="#">Blog Post 2</a></li>
  <li><a href="#">Blog Post 3</a></li>
</ul>

<!-- Archives Block -->
<ul class="wp-block-archives alignnone">
  <li><a href="#">August 2018</a></li>
  <li><a href="#">July 2018</a></li>
  <li><a href="#">June 2018</a></li>
</ul>

Is there a reason for this inconsistency? (If not, I suggest we align these one way or another.)

@kjellr kjellr added [Type] Question Questions about the design or development of the editor. [Feature] Blocks Overall functionality of blocks labels Aug 28, 2018
@kjellr kjellr mentioned this issue Aug 28, 2018
3 tasks
@mtias
Copy link
Member

mtias commented Sep 11, 2018

@kjellr this seems like an oversight on the categories case. Would you mind updating it?

@mtias mtias removed the [Type] Question Questions about the design or development of the editor. label Sep 11, 2018
@kjellr
Copy link
Contributor Author

kjellr commented Sep 11, 2018

this seems like an oversight on the categories case. Would you mind updating it?

Opened #9798 to address this. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks
Projects
None yet
Development

No branches or pull requests

2 participants