From 9510f3d737edf849ccc96fd092373a788b28853d Mon Sep 17 00:00:00 2001 From: Joe <33972521+hnb-ku@users.noreply.github.com> Date: Sun, 31 Mar 2019 17:16:40 +0800 Subject: [PATCH] card buttons should truncate if there isn't enough space (#7290) --- .../stylesheets/mobile/components/user-card.scss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/mobile/components/user-card.scss b/app/assets/stylesheets/mobile/components/user-card.scss index fcd0969d08d..5d87399f9d9 100644 --- a/app/assets/stylesheets/mobile/components/user-card.scss +++ b/app/assets/stylesheets/mobile/components/user-card.scss @@ -20,13 +20,17 @@ $avatar_width: 120px; display: flex; flex: 1; margin-top: 1em; - button { - white-space: nowrap; - } + max-width: 100%; li { flex: 1; - & + li { - margin-left: 0.5em; + min-width: 0; + &:nth-child(2) { + border-left: 0.5em solid transparent; + } + button { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } }