From d0bcc908b56d30bc379829206eec7bb32491f371 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 13 Oct 2023 10:22:34 +0200 Subject: [PATCH 1/5] fix(docs): restore color on description term page links --- client/src/document/index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/document/index.scss b/client/src/document/index.scss index 8d451a360f2c..0a222a2c21d9 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -148,7 +148,6 @@ a { &:link, &:visited { - color: inherit; text-decoration: none; } @@ -158,6 +157,7 @@ } &[href^="#"] { + color: inherit; position: relative; &:hover::before { From 5225110c362ac3441124d04b5abf6af6ef1ea838 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 13 Oct 2023 11:20:24 +0200 Subject: [PATCH 2/5] chore(kumascript): remove empty anchor links --- kumascript/src/api/util.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kumascript/src/api/util.ts b/kumascript/src/api/util.ts index 2116717e116b..0e7f0c2e9cb3 100644 --- a/kumascript/src/api/util.ts +++ b/kumascript/src/api/util.ts @@ -224,6 +224,11 @@ export class HTMLTool { $element.attr("id", id); if (isDt) { + // Remove empty anchor links. + // This happens if the term already links to a page. + $element.find("a[data-link-to-id = true]:empty").remove(); + + // Link remaining anchor links to the term's ID. $element .find("a[data-link-to-id = true]") .attr("href", "#" + id) From c8b113693eba73e011ae1d5f6343a08ca6202188 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 13 Oct 2023 13:36:42 +0200 Subject: [PATCH 3/5] fix(docs): restore underline behavior on dt links Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> --- client/src/document/index.scss | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/client/src/document/index.scss b/client/src/document/index.scss index 0a222a2c21d9..5c0c42b985c0 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -146,19 +146,15 @@ margin-top: 2rem; a { - &:link, - &:visited { - text-decoration: none; - } - - &:hover, - &:focus { - text-decoration: underline; - } - &[href^="#"] { color: inherit; position: relative; + text-decoration: none; + + &:hover, + &:focus { + text-decoration: underline; + } &:hover::before { color: var(--text-inactive); From d36dafa4cf755c1b5bf3eaf65541ac135c2a8594 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 13 Oct 2023 13:39:57 +0200 Subject: [PATCH 4/5] fix(docs): make hashtag of dt anchor links interactive Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> --- client/src/document/index.scss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/document/index.scss b/client/src/document/index.scss index 5c0c42b985c0..35632b7993fd 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -156,16 +156,21 @@ text-decoration: underline; } - &:hover::before { + &::before { color: var(--text-inactive); content: "#"; display: inline-flex; font-size: 0.7em; - left: -0.75em; line-height: 1; - position: absolute; + margin-left: -0.8em; text-decoration: none; top: 0.5em; + visibility: hidden; + width: 0.8em; + } + + &:hover::before { + visibility: visible; } } } From fe2be5174eeb53a6ca01b2546edf9809c8d383a5 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Fri, 13 Oct 2023 14:33:15 +0200 Subject: [PATCH 5/5] refactor(docs): combine unnecessarily nested selectors Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> --- client/src/document/index.scss | 48 ++++++++++++++++------------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/client/src/document/index.scss b/client/src/document/index.scss index 35632b7993fd..984ddb87f731 100644 --- a/client/src/document/index.scss +++ b/client/src/document/index.scss @@ -145,33 +145,31 @@ margin-bottom: 0.5rem; margin-top: 2rem; - a { - &[href^="#"] { - color: inherit; - position: relative; + a[href^="#"] { + color: inherit; + position: relative; + text-decoration: none; + + &:hover, + &:focus { + text-decoration: underline; + } + + &::before { + color: var(--text-inactive); + content: "#"; + display: inline-flex; + font-size: 0.7em; + line-height: 1; + margin-left: -0.8em; text-decoration: none; + top: 0.5em; + visibility: hidden; + width: 0.8em; + } - &:hover, - &:focus { - text-decoration: underline; - } - - &::before { - color: var(--text-inactive); - content: "#"; - display: inline-flex; - font-size: 0.7em; - line-height: 1; - margin-left: -0.8em; - text-decoration: none; - top: 0.5em; - visibility: hidden; - width: 0.8em; - } - - &:hover::before { - visibility: visible; - } + &:hover::before { + visibility: visible; } } }