chrisgrieser / shimmering-focus

A minimalistic and opinionated Obsidian theme for the keyboard-centric user.
MIT License
509 stars 20 forks source link

Contribution: Disable the Pseudo-Spoiler-Tag #119

Closed ReaderGuy42 closed 2 years ago

ReaderGuy42 commented 2 years ago

Type of Contribution

Other

Description

I thought maybe someone else might like to use this as well. I was having trouble with the pseudo-spoiler tags:

~~*X*~~ since I use italics for titles, and sometimes use strike-through to indicate that I'm done with that title, it makes my lists more confusing haha

I found this in your theme and just commented out the color selection part for the background of the spoiler. This essentially removed the whole thing:


/* ───────────────────────────────────────────────── */
/* << Pseudo-Spoiler-Tag
──────────────────────────────────────────────────── */

.theme-light { /* stylelint-disable-line no-duplicate-selectors */
    --spoiler-bg: /*hsl(0 0% 7%)*/;
}

.theme-dark { /* stylelint-disable-line no-duplicate-selectors */
    --spoiler-bg: /*hsl(0 0% 93%)*/;
}

.cm-line:not(.cm-active) .cm-em.cm-strikethrough,
em > del {
    font-style: initial;
    text-decoration: unset;
    color: var(--spoiler-bg);
    background-color: var(--spoiler-bg);
    transition: var(--slow-transition);
}

em > del:hover,
.cm-active .cm-em.cm-strikethrough,
.cm-em.cm-strikethrough:hover {
    background-color: var(--bg3) !important;
    transition: 400ms ease-in-out;
}

Thanks :)

Screenshot

No response

chrisgrieser commented 2 years ago

last update adds a Style Setting to turn off spoiler syntax off 🙂