Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bailicangdu committed Jan 9, 2022
1 parent 59dc501 commit 5050cfd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/zh-cn/scopecss.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
## 一、样式隔离
MicroApp的样式隔离是默认开启的,开启后会以`<micro-app>`标签作为样式作用域,利用标签的`name`属性为每个样式添加前缀,将子应用的样式影响禁锢在当前标签区域。

```css
.test {
color: red;
}

转换为
micro-app[name=xxx].test {
color: red;
}
```

但基座应用的样式依然会对子应用产生影响,如果发生样式污染,推荐通过约定前缀或CSS Modules方式解决。

## 二、禁用样式隔离
Expand Down

0 comments on commit 5050cfd

Please sign in to comment.