feat: add support for spoiler text (#602)
This commit is contained in:
parent
59f71f5ef3
commit
d0689b7a8a
2 changed files with 22 additions and 0 deletions
|
|
@ -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**]!
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue