fix(core): update

This commit is contained in:
Philipp Kunz 2020-09-15 20:56:33 +00:00
parent fbe2f381c9
commit e8e6416b6f
3 changed files with 6 additions and 13 deletions

View File

@ -5,7 +5,6 @@ import { TViewport } from './domtools.breakpoints';
import { Scroller } from './domtools.classes.scroller';
import { delayForRandom } from '@pushrocks/smartdelay';
import { setupGlobalTheme } from './domtools.css.theme';
export interface IDomToolsState {
virtualViewport: TViewport;
@ -24,9 +23,6 @@ export class DomTools {
globalThis.deesDomTools = new DomTools();
domToolsInstance = globalThis.deesDomTools;
// lets setup theming
setupGlobalTheme(domToolsInstance);
// lets make sure the dom is ready
const readyStateChangedFunc = () => {
if (document.readyState === 'interactive' || document.readyState === 'complete') {

View File

@ -26,11 +26,3 @@ export const scrollBarStyles = (() => {
}
` : ``;
})();
export const setupGlobalTheme = (domToolsInstance: DomTools) => {
const styles = `
${scrollBarStyles}
`;
domToolsInstance.setGlobalStyles(styles);
};

View File

@ -46,7 +46,12 @@ export const setup = async () => {
// Roboto Font
domTools.setGlobalStyles(`
@import url('https://fonts.googleapis.com/css?family=Roboto');
@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400');
`);
// scrollbars
domTools.setGlobalStyles(`
${scrollBarStyles}
`);
});
};