From 7d830c881c49fb703bafae7c49f03197c7a3bf16 Mon Sep 17 00:00:00 2001 From: Zog Date: Thu, 21 Dec 2017 10:06:21 +0100 Subject: Refs #5354 @0.5h; Truncate long breadcrumbs Went with a css solution --- app/assets/stylesheets/components/_breadcrumb.sass | 5 ++++- app/assets/stylesheets/components/_main_nav.sass | 16 +++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/components/_breadcrumb.sass b/app/assets/stylesheets/components/_breadcrumb.sass index 62f167eb4..1b30ca42b 100644 --- a/app/assets/stylesheets/components/_breadcrumb.sass +++ b/app/assets/stylesheets/components/_breadcrumb.sass @@ -1,3 +1,6 @@ .breadcrumbs + white-space: nowrap + text-overflow: ellipsis + overflow: hidden a - color: white \ No newline at end of file + color: white diff --git a/app/assets/stylesheets/components/_main_nav.sass b/app/assets/stylesheets/components/_main_nav.sass index 9f7a8e244..f102c4617 100644 --- a/app/assets/stylesheets/components/_main_nav.sass +++ b/app/assets/stylesheets/components/_main_nav.sass @@ -243,6 +243,9 @@ $menuW: 300px left: 0 top: 13px + & > .menu-item + max-width: 75% + .menu-item padding: 0 10px @@ -324,8 +327,11 @@ $menuW: 300px height: $menuH * 2 transition: 0.1s - #menu_top > .menu-content > .menu-item-group - display: none + #menu_top > .menu-content + & > .menu-item + max-width: 90% + & > .menu-item-group + display: none .sticky-content height: $menuH @@ -345,16 +351,16 @@ $menuW: 300px white-space: nowrap max-height: 1.1em margin: 0 -1.4em 0 0 - padding: 0 1.4em 0 0 + padding: 0 1.4em 5px 0 overflow: hidden &:before content: '[...]' font-size: 0.65em position: absolute - z-index: 5 + z-index: 6 right: 0 - bottom: 4px + bottom: 9px &:after content: '' -- cgit v1.2.3