From 89fd8b50807241ce1b1dd4c192b994658f67f175 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 11 Jan 2023 20:52:37 +0100 Subject: [PATCH] fix(core): update --- ts_web/00_commitinfo_data.ts | 2 +- ts_web/elements/dees-icon.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 09e5eab..8ff1803 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@designestate/dees-catalog', - version: '1.0.130', + version: '1.0.131', description: 'website for lossless.com' } diff --git a/ts_web/elements/dees-icon.ts b/ts_web/elements/dees-icon.ts index 2b6edc3..6c97043 100644 --- a/ts_web/elements/dees-icon.ts +++ b/ts_web/elements/dees-icon.ts @@ -83,7 +83,7 @@ declare global { export class DeesIcon extends DeesElement { public static demo = () => html` -
+
@@ -95,7 +95,7 @@ export class DeesIcon extends DeesElement { public iconFA: keyof typeof faIcons; @property() - public iconSize: number = 20; + public iconSize: number; constructor() { super(); @@ -108,6 +108,9 @@ export class DeesIcon extends DeesElement { :host { display: block; white-space: nowrap; + display: flex; + align-items: center; + justify-content: center; } `, ]; @@ -117,6 +120,7 @@ export class DeesIcon extends DeesElement { ${domtools.elementBasic.styles} @@ -125,6 +129,9 @@ export class DeesIcon extends DeesElement { } public async firstUpdated() { + if (!this.iconSize) { + this.iconSize = parseInt(globalThis.getComputedStyle(this).fontSize.replace(/\D/g,'')); + } if (this.iconFA) { this.shadowRoot.querySelector('#iconContainer').innerHTML = this.iconFA ? icon(faIcons[this.iconFA]).html[0]