空气主题

一些用户询问了如何在“分类”页面中显示子分类。这与 Modern Category + Group Boxes 组件有关,但由于它没有自己的主题(对吧?),我将在此分享我的发现:

这样做有效:

/* 显示子分类 */
.custom-category-boxes:not(.above-discovery-categories-outlet) .subcategories {
  display: inline-flex;
  flex-flow: wrap;
}

.custom-category-boxes:not(.above-discovery-categories-outlet) .subcategory {
  display: inline-flex;
  align-items: baseline;
  margin-right: .3em;
}

/* 移除列表中的分类图片 */
.custom-category-boxes:not(.above-discovery-categories-outlet) .subcategories .subcategory .subcategory-image-placeholder {
  display: none;
}

另外,如果你有很多子分类,也许你想每行显示一个分类。

/* 每行一个分类 */
.custom-category-boxes:not(.above-discovery-categories-outlet) {
  grid-template-columns: 1fr;
}

结果看起来像这样:

我认为这些框有一个高度限制,但我还没有找到移除它的方法。我们还没有足够的子分类在桌面上看到这个问题,但我们在移动设备上遇到了限制:

有什么解决这个问题的想法吗?

2 个赞