feat: add support for spoiler text (#602)

This commit is contained in:
hexzii 2025-08-24 16:54:02 +08:00 committed by GitHub
parent 59f71f5ef3
commit d0689b7a8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

View file

@ -81,4 +81,15 @@ This is a note with a custom title.
> [!TIP] > [!TIP]
> The GitHub syntax is also supported. > The GitHub syntax is also supported.
```
### Spoiler
You can add spoilers to your text. The text also supports **Markdown** syntax.
The content :spoiler[is hidden **ayyy**]!
```markdown
The content :spoiler[is hidden **ayyy**]!
``` ```

View file

@ -139,3 +139,14 @@
.collapsed { .collapsed {
height: var(--collapsedHeight); height: var(--collapsedHeight);
} }
.custom-md spoiler {
@apply bg-[var(--codeblock-bg)] hover:bg-transparent px-1 py-0.5 overflow-hidden rounded-md transition-all duration-150;
&:not(:hover) {
color: var(--codeblock-bg);
* {
color: var(--codeblock-bg);
}
}
}