reactjs - Styles appear differently for different pages in shadow DOM - Stack Overflow

admin2025-04-16  3

I'm developing a google extension, where I came to know the concept of shadow dom, but the behavior I'm facing is that same style of same element appear differently on different sites and it's visible in the 'Styles' tab, when we inspect, that the style is same, as there was no cut line on that style. I've come through solutions e.g use root.style.cssText = 'all:initial', but still no results. Kindly help me fix that !

On site 1, the style is this

On site 2, the style is this:

Content.tsx:

转载请注明原文地址:http://www.anycun.com/QandA/1744738257a86919.html