mirror of
https://gitee.com/shuto-github/Shadow-DOM-inject-styles.git
synced 2024-10-06 04:02:06 +08:00
dist | ||
src | ||
.gitignore | ||
.npmignore | ||
.npmrc | ||
LICENSE | ||
package.json | ||
README.md | ||
rollup.config.js | ||
tsconfig.json | ||
tslint.json |
Shadow-DOM-inject-styles
A helper function to easily modify Shadow DOM CSS.
import {injectStyles} from 'shadow-dom-inject-styles';
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);