Skip to content
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

[Feature Request] 使用 experimentalStyleIsolation 配置实现样式隔离,使用 :where(div[data-qiankun="xxx"]) 代替 div[data-qiankun="xxx"] 。 #2821

Open
zhl0791 opened this issue Nov 20, 2023 · 1 comment

Comments

@zhl0791
Copy link

zhl0791 commented Nov 20, 2023

Background

添加 experimentalStyleIsolation 实现样式隔离,结合 antd 5 使用时,样式隔离机制会破坏子应用的样式优先级。

Proposal

使用 :where(div[data-qiankun="xxx"]) 代替 div[data-qiankun="xxx"]

Additional context

:where 选择器能限制样式的范围,但不会改变子应用中 css 选择器的权重,对子应用的影响最小。

@zhl0791 zhl0791 changed the title [Feature Request] 使用 experimentalStyleIsolation 配置实现样式隔离,能否使用 :where(div[data-qiankun="xxx"]) 代替原 div[data-qiankun="xxx"] ? [Feature Request] 使用 experimentalStyleIsolation 配置实现样式隔离,使用 :where(div[data-qiankun="xxx"]) 代替 div[data-qiankun="xxx"] 。 Nov 21, 2023
@Ray-56
Copy link

Ray-56 commented Oct 9, 2024

遇见相同问题,目前是锁定版本来解决的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants