diff --git a/source/css/_defines/theme.styl b/source/css/_defines/theme.styl index e8b5e2b..d6c6b90 100644 --- a/source/css/_defines/theme.styl +++ b/source/css/_defines/theme.styl @@ -46,6 +46,7 @@ set_text_light() --block-hover: hsl($color-block-h, $color-block-s, 92) set_text_dark() --theme-link: $color-link + --theme-link-opa: rgba($color-link, 0.2) set_darkmode() :root diff --git a/source/css/_layout/md.styl b/source/css/_layout/md.styl index a40e266..959e001 100644 --- a/source/css/_layout/md.styl +++ b/source/css/_layout/md.styl @@ -108,16 +108,19 @@ margin: auto display: block -.md-text - p:not([class]), li:not([class]) - a:not([class]) - padding: 0 2px - margin: 0 -2px - border-radius: 2px - trans1 all - text-decoration: underline - &:hover - color: $color-hover - &:has(img) - text-decoration: none - padding: 0 +.md-text li:not([class]) a:not([class]), .md-text p:not([class]) a:not([class]) + position: relative + text-decoration: none + trans1 all + padding: 0 2px + border-radius: 0 + background: linear-gradient(0deg,var(--theme-link),var(--theme-link)) no-repeat left 100%/100% 1px + &:hover + color: var(--theme-link) + border-radius: 4px + background: linear-gradient(0deg,var(--theme-link-opa),var(--theme-link-opa)) no-repeat left 100%/100% 100% + &:has(img) + background: none + padding: 0 + &:hover + background: none diff --git a/source/css/_layout/partial/related.styl b/source/css/_layout/partial/related.styl index e82797a..91f2bca 100644 --- a/source/css/_layout/partial/related.styl +++ b/source/css/_layout/partial/related.styl @@ -94,12 +94,8 @@ article.md-text.content+.related-wrap margin: 0 font-size: inherit a - color: inherit - text-decoration: underline - &:hover - color: $color-hover - &:before - display: none + --theme-link: $color-theme + --theme-link-opa: rgba($color-theme, 0.2) .cmt-body min-height: 150px position: relative