Skip to content

Commit 3a98c3e

Browse files
author
Egor Dymov
committed
Changed all single styles to style directives
1 parent 17e54ff commit 3a98c3e

9 files changed

+13
-12
lines changed

src/ui/components/App.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
{#if $isP3}
3434
<Tooltip>
3535
{#snippet trigger()}
36-
<div style="mix-blend-mode: difference;" class="flex items-center">
36+
<div style:mix-blend-mode="difference" class="flex items-center">
3737
<p
3838
class="mr-3 rounded border-0.5 border-secondary-75 p-1 text-xxxs font-medium leading-[8px] text-secondary-75"
3939
>

src/ui/components/ColorIndicator.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<div class="mr-2">
6161
<ColorPreview {borderColor} {indicatorColor} {isBlended} />
6262
</div>
63-
<span style="color: var({textColor})">{displayValue}</span>
63+
<span style:color="var({textColor})">{displayValue}</span>
6464
</div>
6565
</button>
6666
{/snippet}

src/ui/components/InvalidBackgroundSelectionMessage.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<script lang="ts">
22
import layersImage from '~ui/assets/layers@2x.webp';
3+
const image = `url("${layersImage}")`;
34
</script>
45

56
<p
6-
style="background-image: url({layersImage});"
7+
style:background-image="url({image})"
78
class="mx-auto flex h-[200px] w-[180px] select-none items-end justify-center bg-[length:180px_180px] bg-center bg-no-repeat pt-2 text-center font-martianMono text-xxs text-secondary-75"
89
>
910
The background layer should be a solid fill

src/ui/components/ProgressBar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<div class="flex items-center justify-center">
4242
<div class="flex items-center">
4343
<span
44-
style="color: var({ThemeVariablesKeys.secondary})"
44+
style:color="var({ThemeVariablesKeys.secondary})"
4545
class="mr-2 text-xxs"
4646
>
4747
0
@@ -89,7 +89,7 @@
8989
</div>
9090
</div>
9191
<span
92-
style="color: var({ThemeVariablesKeys.secondary})"
92+
style:color="var({ThemeVariablesKeys.secondary})"
9393
class="ml-2 text-xxs"
9494
>
9595
{maxScale}

src/ui/components/Selection.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
size === 'small' && isLast === true && 'px-5 py-3',
5757
size === 'large' && 'p-5',
5858
]}
59-
style="background-color: var({ThemeVariablesKeys.bg})"
59+
style:background-color="var({ThemeVariablesKeys.bg})"
6060
id={`selection-${id}`}
6161
>
6262
<SegmentedFontStyleDefinition

src/ui/components/SelectionContent.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'flex items-center justify-between',
2828
]}
2929
>
30-
<p style="color: var({ThemeVariablesKeys.fg})" class="text-xxs">
30+
<p style:color="var({ThemeVariablesKeys.fg})" class="text-xxs">
3131
{getConclusionByScore(Math.abs(apca))}
3232
</p>
3333

src/ui/components/TextMetrics.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
{:else if Math.abs(apca) < conclusions['Large Text']}
2222
<PictureIcon />
2323
{:else}
24-
<div style="color: var({ThemeVariablesKeys.fg})" class="flex items-center">
24+
<div style:color="var({ThemeVariablesKeys.fg})" class="flex items-center">
2525
<div class="mr-3 flex items-center">
2626
<p
27-
style="borderColor: var({ThemeVariablesKeys.fg})"
27+
style:border-color=" var({ThemeVariablesKeys.fg})"
2828
class="mr-2 rounded border-0.5 p-1 text-xxxs font-medium leading-[8px]"
2929
>
3030
Rg
@@ -33,7 +33,7 @@
3333
</div>
3434
<div class="flex items-center">
3535
<p
36-
style="borderColor: var({ThemeVariablesKeys.fg})"
36+
style:border-color="var({ThemeVariablesKeys.fg})"
3737
class="mr-2 rounded border-0.5 p-1 text-xxxs font-medium leading-[8px]"
3838
>
3939
Bd

src/ui/components/Tooltip.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
{#if showTooltip}
4545
<div
46-
style="position:absolute"
46+
style:position="absolute"
4747
use:floatingContent
4848
class="rounded-full bg-black p-2 px-3 py-1.5 font-martianMono text-xxs font-medium text-white shadow-md dark:bg-white dark:text-black"
4949
>

src/ui/components/UnprocessedBlendModesSelectionMessage.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</script>
44

55
<p
6-
style="backgroundImage: url({layersImage});"
6+
style:background-image="url({layersImage})"
77
class="mx-auto flex h-[200px] w-[250px] select-none items-end justify-center bg-[length:180px_180px] bg-center bg-no-repeat pt-2 text-center font-martianMono text-xxs text-secondary-75"
88
>
99
The blending mode Plus Darker is not supported

0 commit comments

Comments
 (0)