Skip to content

Commit 4440737

Browse files
knowlerkeithamus
andauthored
Improve clarity about inheritance
Co-authored-by: Keith Cirkel <[email protected]>
1 parent 183d5f9 commit 4440737

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

learn/components/styling.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ The `<p>` element within the shadow tree is not effected by the styles declared
3737

3838
## Inheritance
3939

40-
Custom elements abide by the same rules of inheritance as other HTML elements. Properties such as `font-size`,
41-
`font-family`, and `color` are inherited from a parent element by default. So are [CSS custom properties][]. Top-level
42-
elements within a shadow tree inherit their inheritable properties from the custom element itself (also known as the
43-
shadow host). Here’s a demonstration of this at play:
40+
Custom elements abide by the same rules of inheritance as other HTML elements. CSS properties whose default value is
41+
`inherit` will inherit from their parent element, for example `font-size`, `font-family`, and `color`. This `inherit`
42+
property crosses the Shadow DOM boundary. [CSS custom properties][] default to `inherit`, so they'll cross Shadow DOM
43+
boundaries too. Top-level elements within a shadow tree inherit properties from the custom element itself (also known
44+
as the shadow host).
4445

4546
```html
4647
<style>

0 commit comments

Comments
 (0)