obsidian: normalize 'either' polarity variant to 'light' (#2288)

Link: https://github.com/nix-community/stylix/pull/2288

Reviewed-by: https://github.com/TheColorman
Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: Noah Biewesch <dev@noahbiewesch.com>
This commit is contained in:
Ulises Britos 2026-06-05 14:55:12 -03:00 committed by GitHub
parent dd0d01ee2c
commit 6c382b2867
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,12 +32,15 @@ mkTarget {
colors,
polarity,
}:
let
polarity' = if polarity == "dark" then polarity else "light";
in
{
programs.obsidian.defaultSettings.cssSnippets = with colors.withHashtag; [
{
name = "Stylix Config";
text = ''
.theme-${polarity} {
.theme-${polarity'} {
/* Base Colors */
--color-base-00: ${base00};
--color-base-05: ${base00};
@ -63,7 +66,7 @@ mkTarget {
{
name = "Stylix Config";
text = ''
.theme-${polarity} {
.theme-${polarity'} {
/* Base Colors */
--color-base-00: ${base00};
--color-base-05: ${base00};