From 9c03456e7527bfe8e1567bed4730562d7123c803 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 20 Mar 2017 15:43:49 -0400 Subject: [PATCH] Category description in sub-category boxes is truncated after height 6em, customizable with CSS --- .../discourse/templates/components/categories-boxes.hbs | 2 +- app/assets/stylesheets/desktop/category-list.scss | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs index 5c94459f078..45e336a2f0f 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs @@ -15,7 +15,7 @@
- {{{c.description_excerpt}}} + {{{text-overflow class="overflow" text=c.description_excerpt}}}
diff --git a/app/assets/stylesheets/desktop/category-list.scss b/app/assets/stylesheets/desktop/category-list.scss index 67577000863..a2b03a52f84 100644 --- a/app/assets/stylesheets/desktop/category-list.scss +++ b/app/assets/stylesheets/desktop/category-list.scss @@ -234,6 +234,11 @@ text-align: center; font-size: 1.05em; color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 40%)); + .overflow { + max-height: 6em; + overflow: hidden; + text-overflow: ellipsis; + } } h3 {