plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

[BUG] about csui style hierarchy

Open woftsun opened this issue 8 months ago • 0 comments

What happened?

image

const getStyle: PlasmoGetStyle = () => {
  const style = document.createElement("style")
  style.textContent = (cssText + antCssText).replaceAll(':root', ':host')
  return style
}

const getInlineAnchor: PlasmoGetInlineAnchor = () =>
    document.querySelector(".ecom-g-layout-sider")

const mountShadowHost: PlasmoMountShadowHost = ({ anchor, shadowHost }) => {
  anchor!.element!.insertBefore(shadowHost!, anchor!.element!.firstChild)
}

I'm going to hang the dom in 1, and when I use the component library, the message component of the component library is at the position of the entire page 2, so I can't override the injected style, so I can choose the mount location of the style

Version

Latest

What OS are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

  • [ ] I would like to fix this BUG via a PR

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct
  • [X] I checked the current issues for duplicate problems.

woftsun avatar Nov 30 '23 06:11 woftsun