From 3731d3c7728f475c8cd6eed23df23e6cd7cb7170 Mon Sep 17 00:00:00 2001 From: Kris Date: Mon, 3 May 2021 13:56:58 -0400 Subject: [PATCH] UX: anticipate anchor link hover (#12920) --- .../stylesheets/common/base/topic-post.scss | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/common/base/topic-post.scss b/app/assets/stylesheets/common/base/topic-post.scss index 0fd5e21b5da..bbefe2792b7 100644 --- a/app/assets/stylesheets/common/base/topic-post.scss +++ b/app/assets/stylesheets/common/base/topic-post.scss @@ -94,17 +94,30 @@ $quote-share-maxwidth: 150px; h6 { margin: 30px 0 10px; line-height: $line-height-medium; - + a.anchor { + &:before { + content: svg-uri( + '' + ); + line-height: 1.4; + margin-left: -20px; + padding-right: 4px; + position: absolute; + opacity: 0; + transition: opacity 0.25s; + } + &:hover { + // show when hovering where icon should be + &:before { + opacity: 1; + } + } + } &:hover { + // show when hovering header a.anchor { &:before { - content: svg-uri( - '' - ); - float: left; - margin-left: -20px; - padding-right: 4px; - position: absolute; + opacity: 1; } } }