fix(core): update

This commit is contained in:
Philipp Kunz 2020-12-01 17:31:37 +00:00
parent 570a026cf8
commit 0de00cb2c1
2 changed files with 11 additions and 0 deletions

View File

@ -143,6 +143,14 @@ export class DomTools {
this.elements.headElement.appendChild(styleElement);
}
public async setExternalCss(cssLinkArg: string) {
const cssTag = document.createElement('link');
cssTag.rel = 'stylesheet';
cssTag.crossOrigin = 'anonymous';
cssTag.href = cssLinkArg;
document.head.append(cssTag);
}
public setVirtualViewport(environmentArg: TViewport) {
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
}

View File

@ -56,6 +56,9 @@ export const setup = async (elementArg?: LitElement): Promise<DomTools> => {
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;300;400');
`);
// font awesome brands
domTools.setExternalCss('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/brands.min.css');
// scrollbars
domTools.setGlobalStyles(`
${scrollBarStyles}