From ec0054cace73070b9f1717bb3ab571bf8c90141c Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 29 Feb 2016 19:00:38 +1030 Subject: [PATCH] Prevent tags from overlapping discussion titles This gives the tag labels a max-width in the discussion list, and overflows them with a gradient to transparency. (Unfortunately this only works in WebKit for now.) When hovering over them, they slide out to show more. Fixes flarum/core#702 --- extensions/tags/less/forum/extension.less | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/extensions/tags/less/forum/extension.less b/extensions/tags/less/forum/extension.less index 7375a493e..af30175ef 100644 --- a/extensions/tags/less/forum/extension.less +++ b/extensions/tags/less/forum/extension.less @@ -32,10 +32,24 @@ } @media @tablet-up { .IndexPage, .UserPage { + .DiscussionListItem-title { + margin-right: 155px; + } .DiscussionListItem-info > .item-tags { - float: right; - margin-top: -12px; margin-right: 0; + position: absolute; + right: 80px; + top: 23px; + max-width: 150px; + white-space: nowrap; + overflow: hidden; + transition: max-width 0.2s ease-in-out, -webkit-mask-image 0.2s; + -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 140px, rgba(0,0,0,0) 150px); + + &:hover { + max-width: 400px; + -webkit-mask-image: none; + } } } }