Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1022 Bytes

Spoiler text.md

File metadata and controls

53 lines (39 loc) · 1022 Bytes

Collection

Text styling - Spoiler text



Only works in reading mode.

cover::

/*
author: pseudometa
source: https://discord.com/channels/686053708261228577/702656734631821413/893816224247586868
*/

/* pseudo(meta) spoiler tags */
/* blacks out non-hovered-nonactive text surrounded in *~~text~~* */
.theme-light {
  --spoiler-bg: #111;
}

.theme-dark {
  --spoiler-bg: #eee;
}

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

.CodeMirror-activeline > .CodeMirror-line .cm-em.cm-strikethrough,
em > del:hover,
.cm-em.cm-strikethrough:hover {
  background-color: var(--background-secondary-alt) !important;
}

How to use

_~~your text here~~_