fix(core): update
This commit is contained in:
parent
537902aa53
commit
73552ad80f
@ -5,6 +5,7 @@ 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;
|
||||
@ -22,6 +23,10 @@ export class DomTools {
|
||||
if (!globalThis.deesDomTools) {
|
||||
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') {
|
||||
|
27
ts/domtools.css.theme.ts
Normal file
27
ts/domtools.css.theme.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { DomTools } from "./domtools.classes.domtools";
|
||||
|
||||
export const setupGlobalTheme = (domToolsInstance: DomTools) => {
|
||||
const styles = `
|
||||
/* width */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
/* Track */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #111;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #666;
|
||||
}
|
||||
|
||||
/* Handle on hover */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #777;
|
||||
}
|
||||
`;
|
||||
|
||||
domToolsInstance.setGlobalStyles(styles);
|
||||
};
|
Loading…
Reference in New Issue
Block a user