Skip to content

Shadow DOM styling #739

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

Merged
merged 23 commits into from
May 17, 2020
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e418449
Add translation of 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 5, 2020
3e7b9d2
Add translation of 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 5, 2020
ad9c963
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
88e95bc
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
db4e34c
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
938f902
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
a6d0189
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
e98e51a
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
82c3189
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
8a84b24
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
77e3575
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
c26c0fe
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
05e1783
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
46dbb41
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
9a1d9c1
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
bd68c53
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
03a8996
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
7799d78
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
425872b
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
36b77dc
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
178481a
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
f167f34
Update 8-web-components/6-shadow-dom-style/article.md
wen-k-s May 11, 2020
f391464
Update 8-web-components/6-shadow-dom-style/article.md
MartinsYong May 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 8-web-components/6-shadow-dom-style/article.md
Co-authored-by: bemself <45781328+bemself@users.noreply.github.com>
  • Loading branch information
wen-k-s and bemself authored May 11, 2020
commit 05e1783d990377a8c076fdd39acab319abea8083
2 changes: 1 addition & 1 deletion 8-web-components/6-shadow-dom-style/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ customElements.define('custom-dialog', class extends HTMLElement {

## :host-context(selector)

与 `:host` 相同,但仅当外部文档中的 shadow 宿主或它的任何祖先节点与选择器匹配时才应用样式
与 `:host` 相同,但仅当外部文档中的 shadow 宿主或它的任何祖先节点与 `selector` 匹配时才应用样式

例如,`:host-context(.dark-theme)` 只有在 `<custom-dialog>` 或者 `<custom-dialog>` 的任何祖先节点上有 `dark-theme` 类时才匹配:

Expand Down