`, but not its children:
```html run autorun="no-epub" untrusted height=80
```
Please note, `::slotted` selector can't descend any further into the slot. These selectors are invalid:
```css
::slotted(div span) {
/* our slotted
does not match this */
}
::slotted(div) p {
/* can't go inside light DOM */
}
```
Also, `::slotted` can only be used in CSS. We can't use it in `querySelector`.
## CSS hooks with custom properties
How do we style internal elements of a component from the main document?
Selectors like `:host` apply rules to `
` element or ``, but how to style shadow DOM elements inside them?
There's no selector that can directly affect shadow DOM styles from the document. But just as we expose methods to interact with our component, we can expose CSS variables (custom CSS properties) to style it.
**Custom CSS properties exist on all levels, both in light and shadow.**
For example, in shadow DOM we can use `--user-card-field-color` CSS variable to style fields, and the outer document can set its value:
```html
Name:
Birthday:
```
Then, we can declare this property in the outer document for ``:
```css
user-card {
--user-card-field-color: green;
}
```
Custom CSS properties pierce through shadow DOM, they are visible everywhere, so the inner `.field` rule will make use of it.
Here's the full example:
```html run autorun="no-epub" untrusted height=80
Name:
Birthday:
John Smith
01.01.2001
```
## Summary
Shadow DOM can include styles, such as `