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

【BUG】当开启样式隔离时子应用属性选择器样式错误 #1530

Open
uioonm opened this issue Feb 21, 2025 · 2 comments
Open

【BUG】当开启样式隔离时子应用属性选择器样式错误 #1530

uioonm opened this issue Feb 21, 2025 · 2 comments
Assignees
Labels
Need Reproduction 需要复现步骤

Comments

@uioonm
Copy link

uioonm commented Feb 21, 2025

问题描述

问题的具体描述

子应用的设置多个属性选择器样式时,后者会覆盖前者,如果取消样式隔离则没有这个问题

复现步骤

1.设置以下并引入

.test[data-selection-length="0"],
.test[data-selection-length="1"] {
    display: none;
}
  1. 最后子应用的样式变为
.test[data-selection-length="1"],
.test[data-selection-length="1"] {
    display: none;
}

后者会覆盖前者例如

.test[data-selection-length="1"],
.test[data-selection-length="0"] {
    display: none;
}

则会变成

.test[data-selection-length="0"],
.test[data-selection-length="0"] {
    display: none;
}

开启disableScopecss则正常

上传截图

请上传代码截图、控制台、终端等截图以帮助我们了解您的问题。

Image

复现仓库

请提供一个精简的代码仓库,然后上传到自己的 github,以帮助我们复现您的问题。

环境信息

  • micro-app版本:1.0.0-rc.20
  • 主应用前端框架&版本:react18
  • 子应用前端框架&版本:react18
  • 构建工具&版本:rspack
@timhub66 timhub66 added the Need Reproduction 需要复现步骤 label Feb 24, 2025
Copy link

Hello @uioonm. In order to facilitate location and troubleshooting, we need you to provide a realistic GitHub repository.
您好 @uioonm, 为了方便定位和排查问题,我们需要您提供一个重现实例,请提供一个尽可能精简的 GitHub 仓库地址。

@timhub66 timhub66 self-assigned this Feb 24, 2025
uioonm pushed a commit to uioonm/microApp-demo that referenced this issue Feb 24, 2025
@uioonm
Copy link
Author

uioonm commented Feb 24, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Reproduction 需要复现步骤
Projects
None yet
Development

No branches or pull requests

2 participants