diff options
Diffstat (limited to 'anki-card-template/card.css')
| -rw-r--r-- | anki-card-template/card.css | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/anki-card-template/card.css b/anki-card-template/card.css index c8ffd6f..885b0a7 100644 --- a/anki-card-template/card.css +++ b/anki-card-template/card.css @@ -19,6 +19,7 @@ --definition-marker-height: 2px; /* definition marker height (mobile vertical only) */ --definition-marker-opacity: 50%; /* definition marker opacity (mobile vertical only) */ --indicator-stroke-weight: 1px; /* pitch accent / word type indicator stroke weight */ + --sentence-highlight-contrast: 80%; /* opacity of non-highlighted text in sentence */ } .mobile #card { --text-block-padding: 0.5em; @@ -34,10 +35,8 @@ body { } /* increase contrast of highlighted word */ -#card #sentence:has(b) { color: #000b; } -#card #sentence b { color: #000f; } -.night_mode #card #sentence:has(b) { color: #fffb; } -.night_mode #card #sentence b { color: #ffff; } +#card #sentence:has(b) > * { opacity: var(--sentence-highlight-contrast); } +#card #sentence > b { opacity: 100%; } /* body margin */ body { @@ -356,7 +355,6 @@ body { opacity: 70%; } - /* theme colors */ #target-word-reading .indicator, .indicator .stamp { color: white; } |