diff --git a/8-web-components/6-shadow-dom-style/article.md b/8-web-components/6-shadow-dom-style/article.md index 83a6962fa..fac913e9b 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 -Shadow DOM may include both ` ``` -...Then the `` would be without padding. +...in questo caso il `` non avrebbe nessun padding. -It's very convenient, as we can setup "default" component styles in its `:host` rule, and then easily override them in the document. +Questo comportamento può fare comodo, perché in pratica ci permette di impostare gli stili di "default" di un componente nelle sue regole `:host`, per poterle poi facilmente sovrascrivere nel documento. -The exception is when a local property is labelled `!important`, for such properties, local styles take precedence. +Un'eccezione a questo comportamento si verifica quando una proprietà locale viene contrassegnata come `!important`, di conseguenza gli stili locali avranno la precedenza. ## :host(selector) -Same as `:host`, but applied only if the shadow host matches the `selector`. +Come nel caso di `:host`, ma applicato solo se lo shadow host combacia con il `selettore`. -For example, we'd like to center the `` only if it has `centered` attribute: +Ad esempio, se volessimo centrare il `` contenente l'attributo `centered`: ```html run autorun="no-epub" untrusted height=80