diff --git a/8-web-components/6-shadow-dom-style/article.md b/8-web-components/6-shadow-dom-style/article.md index 98e246a7f..8c647cc2e 100644 --- a/8-web-components/6-shadow-dom-style/article.md +++ b/8-web-components/6-shadow-dom-style/article.md @@ -1,21 +1,21 @@ -# Shadow DOM styling +# Стилізація тіньового DOM -Shadow DOM may include both ` ``` -...Then the `` would be without padding. +...Тоді `` не матиме відступів. -It's very convenient, as we can setup "default" component styles in its `:host` rule, and then easily override them in the document. +Це дуже зручно, оскільки ми можемо встановити типові стилі компоненту локально всередині його `:host` правила, та легко перетерти їх стилями документу. -The exception is when a local property is labelled `!important`, for such properties, local styles take precedence. +Винятком є ситуація, коли локальна властивість позначена як `!important`, для таких властивостей, пріоритет надається локальним стилям. ## :host(selector) -Same as `:host`, but applied only if the shadow host matches the `selector`. +Теж саме, що й `:host`, але застосовується лише у випадку, коли тіньовий хост співпадає з `selector`. -For example, we'd like to center the `` only if it has `centered` attribute: +Наприклад, ми бажаємо центрувати ``, тільки якщо він має атрибут `centered`: ```html run autorun="no-epub" untrusted height=80 - John Smith + Петро Щур 01.01.2001 ``` -## Summary +## Підсумки -Shadow DOM can include styles, such as `