# Sub-categories first in Composer category selector

**URL:** <https://meta.discourse.org/t/sub-categories-first-in-composer-category-selector/288756>\
**Category:** Development\
**Created:** [December 15, 2023, 1:55am UTC](https://meta.discourse.org/t/sub-categories-first-in-composer-category-selector/288756 "2023-12-15T01:55:57Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [December 15, 2023, 2:47pm UTC](https://meta.discourse.org/t/sub-categories-first-in-composer-category-selector/288756/6 "2023-12-15T14:47:46Z")

</div>

@martyn_thomas I updated my post above. You are on the right track. It misses one rule to restore `display` when there is no sub-category. (basically, the solution is to hide always the first element and unset the second)

---

_[View the full topic](https://meta.discourse.org/t/sub-categories-first-in-composer-category-selector/288756)._
