mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 17:41:25 -08:00
fix: spoilers leaking emojis and mentions
This commit is contained in:
1 parent
3dfede9b0e
commit
c2c82b5e8f
2 files changed
+24
-13
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Fix spoilers not hiding nested content like mentions, emoji images, and custom-colored spans.
|
||||
@@ -1,4 +1,4 @@
|
||||
import { style } from '@vanilla-extract/css';
|
||||
import { globalStyle, style } from '@vanilla-extract/css';
|
||||
import { recipe } from '@vanilla-extract/recipes';
|
||||
import { color, config, DefaultReset, toRem } from 'folds';
|
||||
import { ContainerColor } from './ContainerColor.css';
|
||||
@@ -60,20 +60,26 @@ export const Code = style([
|
||||
},
|
||||
]);
|
||||
|
||||
export const Spoiler = recipe({
|
||||
base: [
|
||||
DefaultReset,
|
||||
{
|
||||
padding: `0 ${config.space.S100}`,
|
||||
backgroundColor: color.SurfaceVariant.ContainerLine,
|
||||
borderRadius: config.radii.R300,
|
||||
selectors: {
|
||||
'&[aria-pressed=true]': {
|
||||
color: 'transparent',
|
||||
},
|
||||
const SpoilerBase = style([
|
||||
DefaultReset,
|
||||
{
|
||||
padding: `0 ${config.space.S100}`,
|
||||
backgroundColor: color.SurfaceVariant.ContainerLine,
|
||||
borderRadius: config.radii.R300,
|
||||
selectors: {
|
||||
'&[aria-pressed=true]': {
|
||||
color: 'transparent',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
globalStyle(`${SpoilerBase}[aria-pressed="true"] *`, {
|
||||
visibility: 'hidden',
|
||||
});
|
||||
|
||||
export const Spoiler = recipe({
|
||||
base: SpoilerBase,
|
||||
variants: {
|
||||
active: {
|
||||
true: {
|
||||
|
||||
Reference in new issue
Block a user