-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] 开启 experimentalStyleIsolation 后,样式处理异常 #2569
Comments
Hello @ken1987. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @ken1987,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
暂时没有比较简便的处理方案。 同样的问题,safari 低版本中,cssText 也存在兼容问题: var a = document.createElement('style')
a.innerText='body{ background-color: initial }'
document.body.appendChild(a)
a.sheet.cssRules[0].cssText
// safari 15.6.1 或 14.1 异常
// 'body { }'
// safari 16.6 或 17.2.1 正常
// 'body{ background-color: initial }' |
由于缺乏足够的信息(github、stackblitz、codesandbox等可复现仓库),我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。如果只是单独的技术咨询,可移步 https://qiankun.umijs.org/#-community 交流~ |
What happens?
开启 experimentalStyleIsolation 进行样式隔离,源码中样式代码如下:
在 chrome 49-103中,处理后的代码表现如下:
padding 被展开,并且前三个属性丢失
最小可复现仓库
子应用代码
复现步骤,错误日志以及相关配置
experimentalStyleIsolation: true
,并加载子应用相关环境信息
The text was updated successfully, but these errors were encountered: