Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
a6f382dd7f | |||
0de00cb2c1 | |||
570a026cf8 | |||
48b5cc770c |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.76",
|
"version": "1.0.78",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-domtools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.76",
|
"version": "1.0.78",
|
||||||
"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",
|
||||||
|
@ -143,6 +143,14 @@ export class DomTools {
|
|||||||
this.elements.headElement.appendChild(styleElement);
|
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) {
|
public setVirtualViewport(environmentArg: TViewport) {
|
||||||
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
|
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ export class ThemeManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async updateAllConnectedElements() {
|
private async updateAllConnectedElements() {
|
||||||
|
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
|
||||||
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
|
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
|
||||||
await this.setThemeStatusForElement(elementArg, this.goBrightBoolean);
|
await this.setThemeStatusForElement(elementArg, this.goBrightBoolean);
|
||||||
});
|
});
|
||||||
|
@ -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');
|
@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
|
// scrollbars
|
||||||
domTools.setGlobalStyles(`
|
domTools.setGlobalStyles(`
|
||||||
${scrollBarStyles}
|
${scrollBarStyles}
|
||||||
|
Reference in New Issue
Block a user