refactor(news): move keyword highlighting back to news details
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user