css-ing to death of the writer

I hate css.
This commit is contained in:
2023-08-14 17:14:46 +02:00
parent 6f6178b066
commit 3cc52e37b2
9 changed files with 245 additions and 52 deletions

View File

@@ -3,6 +3,7 @@
export let brand: BrandConfig = {};
export let size = 48;
export let color = 'var(--text)';
console.log(brand);
function masked() {
@@ -11,8 +12,8 @@
</script>
<div
class="logo container"
style="--size: {size}px; --mask: url({brand.logo || ''})"
class="container"
style="--size: {size}px; --mask: url({brand.logo || ''}); --mask-color: {color}"
class:masked={masked()}
>
{#if brand.logo}
@@ -20,7 +21,7 @@
<img src={brand.logo} alt="logo" />
{/if}
{:else if brand.icon}
<i class="fa-fw {brand.icon}" />
<i class={brand.icon} />
{/if}
</div>
@@ -29,11 +30,11 @@
width: var(--size);
min-width: min-content;
height: var(--size);
font-size: var(--size);
color: var(--mask-color);
}
.masked {
background: black;
background: var(--mask-color);
mask: var(--mask) center no-repeat;
mask-size: var(--size);
-webkit-mask: var(--mask) center no-repeat;

View File

@@ -9,12 +9,14 @@
}
</script>
<button on:click={next}>
{#if $themeVariant == 'default'}
<i class="fa fa-circle-half-stroke" />
{:else if $themeVariant == 'light'}
<i class="fa-regular fa-circle" />
{:else if $themeVariant == 'dark'}
<i class="fa-solid fa-circle" />
{/if}
</button>
<a on:click={next}>
<span class="icon">
{#if $themeVariant == 'default'}
<i class="fas fa-circle-half-stroke" />
{:else if $themeVariant == 'light'}
<i class="fa-regular fa-circle" />
{:else if $themeVariant == 'dark'}
<i class="fa-solid fa-circle" />
{/if}
</span>
</a>