style: underline links in two-color schemes

This commit is contained in:
Erzbir
2026-07-15 03:47:29 +08:00
parent a87cc72124
commit e7074dea62
4 changed files with 9 additions and 0 deletions
+1
View File
@@ -234,6 +234,7 @@ html[theme-color-scheme='matrix'] {
| `--style-theme-title-divider` | `dashed` | | `--style-theme-title-divider` | `dashed` |
| `--radius-theme-border` | `0` | | `--radius-theme-border` | `0` |
| `--text-decoration-theme-link` | `none` | | `--text-decoration-theme-link` | `none` |
| `--text-decoration-theme-post-link` | `var(--text-decoration-theme-link)` |
| `--lig-theme-font` | `none` | | `--lig-theme-font` | `none` |
| `--width-theme-scrollbar` | `thin` | | `--width-theme-scrollbar` | `thin` |
+1
View File
@@ -2,6 +2,7 @@
:root { :root {
--text-decoration-theme-link: none; --text-decoration-theme-link: none;
--text-decoration-theme-post-link: var(--text-decoration-theme-link);
--list-theme-marker: "►"; --list-theme-marker: "►";
--size-theme-font: 1rem; --size-theme-font: 1rem;
--height-theme-line: calc(var(--size-theme-font) * 1.8); --height-theme-line: calc(var(--size-theme-font) * 1.8);
+1
View File
@@ -133,6 +133,7 @@
.post-content-body a { .post-content-body a {
color: var(--color-theme-post-link); color: var(--color-theme-post-link);
text-decoration: var(--text-decoration-theme-post-link);
} }
.post-cover { .post-cover {
+6
View File
@@ -1,3 +1,5 @@
@use "sass:map";
:root { :root {
--color-theme-background: #f4f4f4; --color-theme-background: #f4f4f4;
--color-theme-foreground: #3e3e3e; --color-theme-foreground: #3e3e3e;
@@ -113,5 +115,9 @@ $color-schemes: (
@each $role, $color in $scheme-colors { @each $role, $color in $scheme-colors {
--color-theme-#{$role}: #{$color}; --color-theme-#{$role}: #{$color};
} }
@if map.get($scheme-colors, "foreground") == map.get($scheme-colors, "accent") {
--text-decoration-theme-post-link: underline;
}
} }
} }