From 8f6d5c2d3d649197a3206263c8ef0c760355f951 Mon Sep 17 00:00:00 2001 From: freeplay Date: Mon, 10 Jul 2023 13:09:44 -0400 Subject: [PATCH] =?UTF-8?q?style:=20link=20underlines,=20attempt=20two?= =?UTF-8?q?=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/src/components/MkUrlPreview.vue | 8 ++++++-- .../client/src/components/global/MkUrl.vue | 2 ++ packages/client/src/style.scss | 19 +++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/packages/client/src/components/MkUrlPreview.vue b/packages/client/src/components/MkUrlPreview.vue index 6452e135d..73938cf86 100644 --- a/packages/client/src/components/MkUrlPreview.vue +++ b/packages/client/src/components/MkUrlPreview.vue @@ -196,6 +196,7 @@ onUnmounted(() => { > a { display: flex; transition: background 0.2s; + text-decoration: none; > div:first-child:not(:last-child) { position: relative; width: 90px; @@ -252,6 +253,9 @@ onUnmounted(() => { font-size: 1em; white-space: nowrap; margin-bottom: 0.2em; + text-decoration: underline; + text-decoration-color: transparent; + transition: text-decoration-color .2s; } p { margin-bottom: -0.5em; @@ -277,8 +281,8 @@ onUnmounted(() => { &:focus, &:focus-within { background: var(--panelHighlight); - h1 { - text-decoration: underline; + h3 { + text-decoration-color: currentColor; } } } diff --git a/packages/client/src/components/global/MkUrl.vue b/packages/client/src/components/global/MkUrl.vue index 98ba8d94e..3453bf5ed 100644 --- a/packages/client/src/components/global/MkUrl.vue +++ b/packages/client/src/components/global/MkUrl.vue @@ -80,6 +80,8 @@ const target = self ? null : "_blank"; display: inline-block; overflow: clip; text-overflow: ellipsis; + text-decoration: none !important; + line-height: 1.05; > .icon { padding-left: 2px; diff --git a/packages/client/src/style.scss b/packages/client/src/style.scss index a6ef73015..7f3713881 100644 --- a/packages/client/src/style.scss +++ b/packages/client/src/style.scss @@ -145,6 +145,12 @@ a { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; + text-decoration: underline; + text-decoration-color: transparent; + transition: text-decoration-color .2s; + &:hover { + text-decoration-color: currentColor; + } } // i { @@ -229,6 +235,7 @@ hr { font-size: 1em; font-family: inherit; line-height: inherit; + text-decoration: none; &, * { @@ -628,18 +635,22 @@ hr { ._link { position: relative; color: var(--link); + text-decoration: none !important; - &:after { + &::before, &::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0%; - border-bottom: 2px solid var(--link); + border-bottom: 1px solid currentColor; transition: 0.3s ease-in-out; } - - &:hover:after { + &::before { + width: 100%; + opacity: .4; + } + &:hover:after, &:focus:after { width: 100%; } }