1
0
Fork 0
forked from Mirrors/gomuks

web/timeline: add special style for spoiler reasons

This commit is contained in:
Tulir Asokan 2024-11-29 17:28:53 +02:00
parent 90ca56f321
commit 91676f3e98
2 changed files with 13 additions and 1 deletions

View file

@ -441,7 +441,7 @@ func writeSpan(w *strings.Builder, attr []html.Attribute) {
if isSpoiler && spoiler != "" {
w.WriteString(`<span class="spoiler-reason">`)
w.WriteString(spoiler)
w.WriteString(" </span>")
w.WriteString("</span>")
}
w.WriteByte('<')
w.WriteString("span")

View file

@ -105,6 +105,18 @@ div.html-body {
max-width: 5rem;
}
span.spoiler-reason {
font-size: .8em;
color: var(--secondary-text-color);
&::before {
content: "(";
}
&::after {
content: ") ";
}
}
span.hicli-spoiler {
filter: blur(4px);
transition: filter .5s;