From 11e08904f9e22d8dd1422f0116aadcaa87ed2b98 Mon Sep 17 00:00:00 2001 From: Osvaldo Dias dos Santos Date: Sun, 16 May 2021 14:06:13 +0100 Subject: [PATCH 1/6] Fix typo. --- 9-regular-expressions/17-regexp-methods/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9-regular-expressions/17-regexp-methods/article.md b/9-regular-expressions/17-regexp-methods/article.md index d4092181..96e9fa71 100644 --- a/9-regular-expressions/17-regexp-methods/article.md +++ b/9-regular-expressions/17-regexp-methods/article.md @@ -247,7 +247,7 @@ alert('12-34-56'.replaceAll("-", ":")) // 12:34:56 ## regexp.exec(str) -The method `regexp.exec(str)` method returns a match for `regexp` in the string `str`. Unlike previous methods, it's called on a regexp, not on a string. +The `regexp.exec(str)` method returns a match for `regexp` in the string `str`. Unlike previous methods, it's called on a regexp, not on a string. It behaves differently depending on whether the regexp has flag `pattern:g`. From ac96edec3fe5afc6022b61a2c14c899b6c993dad Mon Sep 17 00:00:00 2001 From: Serhii Kulykov Date: Mon, 17 May 2021 14:19:19 +0300 Subject: [PATCH 2/6] Remove mentions of :host-context --- .../6-shadow-dom-style/article.md | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/8-web-components/6-shadow-dom-style/article.md b/8-web-components/6-shadow-dom-style/article.md index 83a6962f..98e246a7 100644 --- a/8-web-components/6-shadow-dom-style/article.md +++ b/8-web-components/6-shadow-dom-style/article.md @@ -111,22 +111,7 @@ customElements.define('custom-dialog', class extends HTMLElement { Now the additional centering styles are only applied to the first dialog: ``. -## :host-context(selector) - -Same as `:host`, but applied only if the shadow host or any of its ancestors in the outer document matches the `selector`. - -E.g. `:host-context(.dark-theme)` matches only if there's `dark-theme` class on `` on anywhere above it: - -```html - - - ... - -``` - -To summarize, we can use `:host`-family of selectors to style the main element of the component, depending on the context. These styles (unless `!important`) can be overridden by the document. +To summarize, we can use `:host`-family of selectors to style the main element of the component. These styles (unless `!important`) can be overridden by the document. ## Styling slotted content @@ -317,7 +302,7 @@ Shadow DOM can include styles, such as `