From e7074dea62869f55ddfcdcc84c4f43cdd9a1750a Mon Sep 17 00:00:00 2001 From: Erzbir Date: Wed, 15 Jul 2026 03:47:29 +0800 Subject: [PATCH] style: underline links in two-color schemes --- README.md | 1 + src/styles/main.scss | 1 + src/styles/post.scss | 1 + src/styles/scheme.scss | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 74a5e5c..9834e51 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,7 @@ html[theme-color-scheme='matrix'] { | `--style-theme-title-divider` | `dashed` | | `--radius-theme-border` | `0` | | `--text-decoration-theme-link` | `none` | +| `--text-decoration-theme-post-link` | `var(--text-decoration-theme-link)` | | `--lig-theme-font` | `none` | | `--width-theme-scrollbar` | `thin` | diff --git a/src/styles/main.scss b/src/styles/main.scss index 04feabe..b1a94a3 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -2,6 +2,7 @@ :root { --text-decoration-theme-link: none; + --text-decoration-theme-post-link: var(--text-decoration-theme-link); --list-theme-marker: "►"; --size-theme-font: 1rem; --height-theme-line: calc(var(--size-theme-font) * 1.8); diff --git a/src/styles/post.scss b/src/styles/post.scss index b905723..14ef124 100644 --- a/src/styles/post.scss +++ b/src/styles/post.scss @@ -133,6 +133,7 @@ .post-content-body a { color: var(--color-theme-post-link); + text-decoration: var(--text-decoration-theme-post-link); } .post-cover { diff --git a/src/styles/scheme.scss b/src/styles/scheme.scss index b1f222d..11df7e4 100644 --- a/src/styles/scheme.scss +++ b/src/styles/scheme.scss @@ -1,3 +1,5 @@ +@use "sass:map"; + :root { --color-theme-background: #f4f4f4; --color-theme-foreground: #3e3e3e; @@ -113,5 +115,9 @@ $color-schemes: ( @each $role, $color in $scheme-colors { --color-theme-#{$role}: #{$color}; } + + @if map.get($scheme-colors, "foreground") == map.get($scheme-colors, "accent") { + --text-decoration-theme-post-link: underline; + } } }