Compare commits

...

14 Commits

Author SHA1 Message Date
090e5b4d42 1.0.51 2020-09-16 11:29:27 +00:00
8168dd1a0c fix(core): update 2020-09-16 11:29:26 +00:00
de15bc0d1c 1.0.50 2020-09-16 10:06:23 +00:00
13fa3d655e fix(core): update 2020-09-16 10:06:22 +00:00
18b93b860d 1.0.49 2020-09-15 20:56:34 +00:00
e8e6416b6f fix(core): update 2020-09-15 20:56:33 +00:00
fbe2f381c9 1.0.48 2020-09-15 20:24:12 +00:00
3cb0aceaad fix(core): update 2020-09-15 20:24:11 +00:00
6d6c92eee4 1.0.47 2020-09-13 15:53:31 +00:00
4385909677 fix(core): update 2020-09-13 15:53:30 +00:00
2dc36d8170 1.0.46 2020-09-13 14:58:27 +00:00
ffbde62744 fix(core): update 2020-09-13 14:58:26 +00:00
7bde843e43 1.0.45 2020-09-13 14:57:31 +00:00
faa7adcffe fix(core): update 2020-09-13 14:57:30 +00:00
5 changed files with 41 additions and 31 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.44", "version": "1.0.51",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.44", "version": "1.0.51",
"private": false, "private": false,
"description": "tools to simplify complex css structures", "description": "tools to simplify complex css structures",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

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

View File

@ -1,27 +1,28 @@
import { DomTools } from './domtools.classes.domtools'; import { DomTools } from './domtools.classes.domtools';
export const setupGlobalTheme = (domToolsInstance: DomTools) => { /**
const styles = ` * changes scrollbar styles to be consistent across OS borders
/* width */ */
::-webkit-scrollbar { export const scrollBarStyles = (() => {
width: 8px; const returnStyles = navigator.userAgent.indexOf("Windows") !== -1 ? `
} /* width */
::-webkit-scrollbar {
width: 8px;
}
/* Track */ /* Track */
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: #111; background: #111;
} }
/* Handle */ /* Handle */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: #666; background: #666;
} }
/* Handle on hover */ /* Handle on hover */
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #777; background: #777;
} }
`; ` : ``;
})();
domToolsInstance.setGlobalStyles(styles);
};

View File

@ -1,13 +1,20 @@
import * as plugins from './domtools.plugins'; import * as plugins from './domtools.plugins';
import { DomTools } from './domtools.classes.domtools'; import { DomTools } from './domtools.classes.domtools';
import { scrollBarStyles } from './domtools.css.theme';
import { html } from 'lit-element'; import { html } from 'lit-element';
/**
* styles to be included in every webcomponent
*/
export const styles = html` export const styles = html`
<style> <style>
* { * {
font-family: 'Roboto', sans-serif; font-family: 'Roboto', sans-serif;
box-sizing: border-box; box-sizing: border-box;
} }
${scrollBarStyles}
</style> </style>
`; `;
@ -39,7 +46,13 @@ export const setup = async () => {
// Roboto Font // Roboto Font
domTools.setGlobalStyles(` domTools.setGlobalStyles(`
@import url('https://fonts.googleapis.com/css?family=Roboto'); @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@100;300;400');
`);
// scrollbars
domTools.setGlobalStyles(`
${scrollBarStyles}
`); `);
}); });
}; };