From 58c93f5032321220e4dd33f6149007af7b68c651 Mon Sep 17 00:00:00 2001 From: pierangelomiceli Date: Mon, 26 Apr 2021 23:44:27 +0200 Subject: [PATCH 1/4] inizio --- 8-web-components/6-shadow-dom-style/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/8-web-components/6-shadow-dom-style/article.md b/8-web-components/6-shadow-dom-style/article.md index 83a6962fa..0840a7c2e 100644 --- a/8-web-components/6-shadow-dom-style/article.md +++ b/8-web-components/6-shadow-dom-style/article.md @@ -1,12 +1,12 @@ # 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 cosa 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 è però 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