Skip to content

Commit

Permalink
feat(style): Add highlight transition
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilsang committed Feb 15, 2024
1 parent 10bc46c commit 068138e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/features/shared/components/ExternalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ExternalLink: FunctionComponent<ExternalLinkProps> = ({
}) => {
return (
<a
className={`hashtag ${classNames}`}
className={`highlighter ${classNames}`}
href={href}
rel="noopener noreferrer"
target="_blank"
Expand Down
23 changes: 23 additions & 0 deletions src/features/styles/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,29 @@ $target: #e73c7e;
font-size: small;
}

.highlighter {
display: inline-block;
color: $highlight-color;
line-height: 1.1;

&::after {
content: '';
display: block;
height: 1px;
background-color: $highlight-color;
transition: width 0.5s ease;
width: 0;
}

&:hover {
cursor: pointer;

&::after {
width: 100%;
}
}
}

.progress {
display: flex;
flex-direction: column;
Expand Down
9 changes: 4 additions & 5 deletions src/features/styles/markdown/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@

a {
color: $highlight-color;
}

a:hover,
summary:hover {
text-decoration-line: underline;
cursor: pointer;
&:hover {
cursor: pointer;
text-decoration: underline;
}
}

u {
Expand Down
3 changes: 1 addition & 2 deletions src/features/styles/ui/about/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,10 @@
}

.link {
color: #28b592;
color: #21997b;

&:hover {
color: $highlight-color;
text-decoration-line: underline;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/features/styles/ui/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

::-webkit-progress-value {
background-color: #28bc97;
transition: width 0.3s ease-out;
}
}

Expand Down

0 comments on commit 068138e

Please sign in to comment.