From 61d1cf73928e345dcfe4a8521762b6467ed4c9db Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 20 Jan 2023 23:20:03 +0100 Subject: small css cleanup --- anki-card-template/card.css | 3 --- anki-card-template/readme.md | 8 ++++++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'anki-card-template') diff --git a/anki-card-template/card.css b/anki-card-template/card.css index 35c99ec..578866e 100644 --- a/anki-card-template/card.css +++ b/anki-card-template/card.css @@ -33,7 +33,6 @@ body { /* separator color */ #separator { background-color: black; } -.nightMode #separator, .night_mode #separator { background-color: white; } /* separator size */ @@ -125,10 +124,8 @@ body { /* tag style */ #card #back #tags .tag { background-color: hsl(calc(1deg * var(--tag-hue)), 60%, 20%); } -.nightMode #card #back #tags .tag, .night_mode #card #back #tags .tag { background-color: hsl(calc(1deg * var(--tag-hue)), 65%, 80%); } #card #back #tags .tag .inner { color: white; } -.nightMode #card #back #tags .tag .inner, .night_mode #card #back #tags .tag .inner { color: black; } #card #back #tags .tag { --tag-hue: 0; diff --git a/anki-card-template/readme.md b/anki-card-template/readme.md index ec53a9b..b502df1 100644 --- a/anki-card-template/readme.md +++ b/anki-card-template/readme.md @@ -70,6 +70,10 @@ are instructions to apply to an empty deck. This card template is also compatible with AnkiDroid, but you need to add `.night_mode { }` to the Styling tab for this to work. For some reason -AnkiDroid's night mode CSS class is called `night_mode` instead of `nightMode` -like the desktop version. +AnkiDroid checks if the card has dark mode 'support' by checking if the Styling +tab CSS contains the literal string `.night_mode`. [The +documentation](https://docs.ankiweb.net/templates/styling.html#night-mode) +suggests that the night mode CSS class is called `nightMode` instead of +`night_mode`, but `night_mode` works fine on desktop too, so is used in this +card template. -- cgit v1.2.3