Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f76d4e920 | |||
082ef21078 | |||
4db0e6f5fc | |||
40b8c5010d | |||
16297dc630 | |||
7c3d131b46 | |||
2032df467e | |||
21bcd390d6 |
@ -4,9 +4,9 @@
|
|||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "designestate",
|
||||||
"gitrepo": "dees-csstools",
|
"gitrepo": "dees-domtools",
|
||||||
"shortDescription": "tools to simplify complex css structures",
|
"shortDescription": "tools to simplify complex css structures",
|
||||||
"npmPackagename": "@designestate/dees-csstools",
|
"npmPackagename": "@designestate/dees-domtools",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate"
|
"projectDomain": "design.estate"
|
||||||
}
|
}
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-csstools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.3",
|
"version": "1.0.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-csstools",
|
"name": "@designestate/dees-domtools",
|
||||||
"version": "1.0.3",
|
"version": "1.0.7",
|
||||||
"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",
|
||||||
@ -8,8 +8,8 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/)",
|
"test": "(tstest test/ --web)",
|
||||||
"build": "(tsbuild)",
|
"build": "(tsbuild --web)",
|
||||||
"format": "(gitzone format)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
18
readme.md
18
readme.md
@ -1,17 +1,17 @@
|
|||||||
# @designestate/dees-csstools
|
# @designestate/dees-domtools
|
||||||
tools to simplify complex css structures
|
tools to simplify complex css structures
|
||||||
|
|
||||||
## Availabililty and Links
|
## Availabililty and Links
|
||||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-csstools)
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@designestate/dees-domtools)
|
||||||
* [gitlab.com (source)](https://gitlab.com/designestate/dees-csstools)
|
* [gitlab.com (source)](https://gitlab.com/designestate/dees-domtools)
|
||||||
* [github.com (source mirror)](https://github.com/designestate/dees-csstools)
|
* [github.com (source mirror)](https://github.com/designestate/dees-domtools)
|
||||||
* [docs (typedoc)](https://designestate.gitlab.io/dees-csstools/)
|
* [docs (typedoc)](https://designestate.gitlab.io/dees-domtools/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[](https://gitlab.com/designestate/dees-csstools/commits/master)
|
[](https://gitlab.com/designestate/dees-domtools/commits/master)
|
||||||
[](https://gitlab.com/designestate/dees-csstools/commits/master)
|
[](https://gitlab.com/designestate/dees-domtools/commits/master)
|
||||||
[](https://www.npmjs.com/package/@designestate/dees-csstools)
|
[](https://www.npmjs.com/package/@designestate/dees-domtools)
|
||||||
[](https://snyk.io/test/npm/@designestate/dees-csstools)
|
[](https://snyk.io/test/npm/@designestate/dees-domtools)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://prettier.io/)
|
[](https://prettier.io/)
|
||||||
|
@ -8,7 +8,37 @@ export const elementBasicSetup = async () => {
|
|||||||
if (globalThis.deesCssToolsReady) {
|
if (globalThis.deesCssToolsReady) {
|
||||||
await globalThis.deesCssToolsReady.promise;
|
await globalThis.deesCssToolsReady.promise;
|
||||||
} else {
|
} else {
|
||||||
|
// lets prevent double execution
|
||||||
globalThis.deesCssToolsReady = defer();
|
globalThis.deesCssToolsReady = defer();
|
||||||
|
|
||||||
|
// lets make sure the dom is ready
|
||||||
|
const documentReady = defer();
|
||||||
|
document.onreadystatechange = () => {
|
||||||
|
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
||||||
|
documentReady.resolve();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
await documentReady.promise;
|
||||||
|
|
||||||
|
// lets get started
|
||||||
|
const head = document.querySelector('head');
|
||||||
|
const body = document.querySelector('body');
|
||||||
|
|
||||||
|
// material font
|
||||||
|
const materialFontCss = `
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Material Icons';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(https://fonts.gstatic.com/s/materialicons/v42/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2) format('woff2');
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
const styleElement = document.createElement('style');
|
||||||
|
styleElement.type = 'text/css';
|
||||||
|
styleElement.appendChild(document.createTextNode(materialFontCss));
|
||||||
|
head.appendChild(styleElement);
|
||||||
|
|
||||||
|
|
||||||
globalThis.deesCssToolsReady.resolve();
|
globalThis.deesCssToolsReady.resolve();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user