This commit is contained in:
Adam LaCombe
2018-08-05 20:19:01 -04:00
parent 235aa2118a
commit 92dc264feb
11 changed files with 132 additions and 57 deletions

View File

@@ -1,2 +1,15 @@
# Shadow-DOM-inject-styles
A helper function to easily modify Shadow DOM CSS.
```ts
const toolbar = (this.el.querySelector('ion-header > ion-toolbar') as HTMLElement);
// language=CSS
const styles = `
.toolbar-background {
background: red !important;;
}
`;
injectStyles(toolbar, '.toolbar-background', styles);
```