@@ -269,8 +269,8 @@ export async function inlinePseudoElements(source, clone, sessionCache, options)
269269 borderStyle && borderStyle !== 'none' && borderWidth > 0 ;
270270 const hasTransform = transform && transform !== 'none' ;
271271
272- const shouldRender =
273- hasExplicitContent || hasBg || hasBgColor || hasBox || hasBorder || hasTransform ;
272+ const shouldRender =
273+ hasExplicitContent || hasBg || hasBgColor || hasBorder || hasTransform ;
274274
275275 if ( ! shouldRender ) {
276276 // Aun si no renderizamos caja, si el pseudo tenía increments, propagar a hermanos
@@ -294,6 +294,7 @@ export async function inlinePseudoElements(source, clone, sessionCache, options)
294294 const pseudoEl = document . createElement ( 'span' ) ;
295295 pseudoEl . dataset . snapdomPseudo = pseudo ;
296296 pseudoEl . style . verticalAlign = 'middle' ;
297+ pseudoEl . style . pointerEvents = 'none' ;
297298 const snapshot = snapshotComputedStyle ( style ) ;
298299 const key = getStyleKey ( snapshot , 'span' ) ;
299300 sessionCache . styleMap . set ( pseudoEl , key ) ;
@@ -326,6 +327,12 @@ export async function inlinePseudoElements(source, clone, sessionCache, options)
326327 }
327328
328329 // ---- Backgrounds / colors ----
330+ // Reset explícito para no heredar nada a menos que el pseudo lo defina
331+ pseudoEl . style . background = 'none' ;
332+ // Mask también reseteada por defecto (si tu pipeline soporta masks)
333+ if ( 'mask' in pseudoEl . style ) {
334+ pseudoEl . style . mask = 'none' ;
335+ }
329336 if ( hasBg ) {
330337 try {
331338 const bgSplits = splitBackgroundImage ( bg ) ;
@@ -339,8 +346,8 @@ export async function inlinePseudoElements(source, clone, sessionCache, options)
339346
340347 const hasContent2 =
341348 pseudoEl . childNodes . length > 0 || ( pseudoEl . textContent ?. trim ( ) !== '' ) ;
342- const hasVisibleBox =
343- hasContent2 || hasBg || hasBgColor || hasBox || hasBorder || hasTransform ;
349+ const hasVisibleBox =
350+ hasContent2 || hasBg || hasBgColor || hasBorder || hasTransform ;
344351
345352 // Antes de insertar, si hubo increments en el pseudo, propagar valor final a los hermanos
346353 if ( incs && incs . length && source . parentElement ) {
0 commit comments