Skip to content

Commit

Permalink
refactor: update link style
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Dec 12, 2023
1 parent e511057 commit 6c74649
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ code[data-line-numbers] > [data-line]::before {
--at-apply: inline-block w-4 mr-4 text-right;
}

.prose a:not(:has(h1, h2, h3, h4, h5, h6, [data-rehype-pretty-code-figure])),
.prose a > [data-rehype-pretty-code-figure] > code > span {
color: var(--md-sys-color-primary);
text-decoration: none;
section a:not(:has(h1, h2, h3, h4, h5, h6, [data-rehype-pretty-code-figure])),
section a > [data-rehype-pretty-code-figure] > code > span {
text-decoration-line: underline;
text-decoration-color: var(--md-sys-color-on-primary-container);
text-decoration-thickness: 1px;
text-underline-offset: 0.125em;
background: linear-gradient(
0deg,
var(--md-sys-color-on-primary-container),
Expand All @@ -93,8 +95,8 @@ code[data-line-numbers] > [data-line]::before {
transition: background-size 400ms var(--md-sys-motion-easing-emphasized-decelerate);
} */

.prose a:hover,
.prose a:hover > [data-rehype-pretty-code-figure] > code > span {
a:hover,
a:hover > [data-rehype-pretty-code-figure] > code > span {
color: var(--md-sys-color-on-primary-container);
background-position-x: left;
background-size: 100% 0.125em;
Expand Down
2 changes: 1 addition & 1 deletion uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
},
'a': {
'text-decoration': 'none',
// color: 'var(--md-sys-color-on-surface)',
color: 'var(--md-sys-color-on-surface)',
},
// 'a:has(span[data-rehype-pretty-code-figure])': {
// 'text-decoration': 'none',
Expand Down

0 comments on commit 6c74649

Please sign in to comment.