mhs.us
PD🧩 Plasmo Developers
•Created by mhs.us on 11/30/2023 in #👾extension
Ant-design elements are affected by CSS on different websites, how do I fix this?
Hello everyone,
I think ant-design uses a CSS file, as mentioned in this example https://github.com/PlasmoHQ/examples/blob/main/with-antd/content.tsx, to reset its elements in the shadow DOM called reset.css. This didn't work for me, but I added
:host {
all: initial; /* subsequent properties are reset. */
}
to the beginning of this CSS file, and the error has been corrected. Now, no site is breaking my antdesign content script. Is this the right method?2 replies