From ef2ea4688248135b3b786157cef8e83dca81dfa3 Mon Sep 17 00:00:00 2001 From: "noemi.kallweit" Date: Sat, 15 Aug 2026 20:48:39 +0200 Subject: [PATCH] refactor(news): move keyword highlighting back to news details --- .../news-detail/news-detail.component.scss | 35 ++++++++++++++++++ webapp/src/styles.scss | 36 ------------------- 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/webapp/src/app/modules/news-detail/news-detail.component.scss b/webapp/src/app/modules/news-detail/news-detail.component.scss index a3aaa6c7..4b091f89 100644 --- a/webapp/src/app/modules/news-detail/news-detail.component.scss +++ b/webapp/src/app/modules/news-detail/news-detail.component.scss @@ -586,3 +586,38 @@ main { --topic-bg: color-mix(in srgb, var(--sg-error) 8%, var(--sg-color-mix-base)); --topic-color: var(--sg-error); } + +@keyframes kw-flash { + 0% { + background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base)); + } + 40% { + background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base)); + } + 100% { + background: transparent; + } +} + +:host ::ng-deep .kw-mark { + background: transparent; + color: var(--t); + text-decoration: underline; + text-decoration-color: var(--t); + text-decoration-style: solid; + text-decoration-thickness: 2px; + text-underline-offset: 2px; + font-weight: inherit; + border-radius: 2px; + padding: 0 1px; + cursor: help; + transition: background 0.15s; + + &:hover { + background: color-mix(in srgb, var(--t) 15%, var(--sg-color-mix-base)); + } + + &.kw-flash { + animation: kw-flash 2.4s ease-out forwards; + } +} diff --git a/webapp/src/styles.scss b/webapp/src/styles.scss index 05b08f35..6d39dd4b 100644 --- a/webapp/src/styles.scss +++ b/webapp/src/styles.scss @@ -627,39 +627,3 @@ html.dark-theme { flex-shrink: 0; transition: transform 0.3s ease; } - -/* Keyword highlight */ -@keyframes kw-flash { - 0% { - background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base)); - } - 40% { - background: color-mix(in srgb, var(--t) 45%, var(--sg-color-mix-base)); - } - 100% { - background: transparent; - } -} - -.kw-mark { - background: transparent; - color: var(--t); - text-decoration: underline; - text-decoration-color: var(--t); - text-decoration-style: solid; - text-decoration-thickness: 2px; - text-underline-offset: 2px; - font-weight: inherit; - border-radius: 2px; - padding: 0 1px; - cursor: help; - transition: background 0.15s; - - &:hover { - background: color-mix(in srgb, var(--t) 15%, var(--sg-color-mix-base)); - } - - &.kw-flash { - animation: kw-flash 2.4s ease-out forwards; - } -}