Skip to content

Commit b3927ec

Browse files
authored
Styling improvements (#3442)
Styling improvements.
1 parent 01c05a9 commit b3927ec

33 files changed

+64
-51
lines changed

src/frontend/src/lib/components/layout/Header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="flex h-16 flex-1 items-center gap-4">
1515
<a href="/" class="flex items-center gap-4">
1616
<Logo class="text-fg-primary h-5.5" />
17-
<h1 class="text-md text-text-primary hidden font-semibold sm:block">
17+
<h1 class="text-text-primary hidden text-base font-semibold sm:block">
1818
Internet Identity
1919
</h1>
2020
</a>

src/frontend/src/lib/components/layout/LandingHeader.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import type { HTMLAttributes } from "svelte/elements";
33
import Logo from "$lib/components/ui/Logo.svelte";
4+
45
type Props = HTMLAttributes<HTMLElement>;
56
const { children, class: className, ...props }: Props = $props();
67
</script>
@@ -11,7 +12,7 @@
1112
>
1213
<div class="flex min-h-16 flex-1 items-center gap-4">
1314
<Logo class="text-fg-primary h-5.5" />
14-
<h1 class="text-md text-text-primary hidden font-semibold sm:block">
15+
<h1 class="text-text-primary hidden text-base font-semibold sm:block">
1516
Internet Identity
1617
</h1>
1718
</div>

src/frontend/src/lib/components/ui/Avatar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
{
1616
sm: "size-8 text-sm",
1717
md: "size-10 text-sm",
18-
lg: "text-md size-12",
19-
xl: "text-md size-14",
18+
lg: "size-12 text-base",
19+
xl: "size-14 text-base",
2020
}[size],
2121
className,
2222
]}

src/frontend/src/lib/components/ui/Button.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
{
7070
sm: iconOnly ? "size-9" : "h-9 gap-1.5 px-3 text-sm",
7171
md: iconOnly ? "size-10" : "h-10 gap-1.5 px-3.5 text-sm",
72-
lg: iconOnly ? "size-11" : "text-md h-11 gap-2.5 px-4",
73-
xl: iconOnly ? "size-12" : "text-md h-12 gap-2.5 px-4.5",
72+
lg: iconOnly ? "size-11" : "h-11 gap-2.5 px-4 text-base",
73+
xl: iconOnly ? "size-12" : "h-12 gap-2.5 px-4.5 text-base",
7474
}[size],
7575
className,
7676
]}

src/frontend/src/lib/components/ui/Checkbox.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<label
2727
class={[
28-
"flex w-max flex-row items-start",
28+
"flex w-max max-w-full flex-row items-start",
2929
{ sm: "gap-2", md: "gap-3" }[size],
3030
className,
3131
]}
@@ -38,7 +38,7 @@
3838
/>
3939
<div
4040
class={[
41-
"relative flex items-center justify-center rounded-sm border",
41+
"relative flex shrink-0 items-center justify-center rounded-sm border",
4242
"border-border-primary text-fg-primary-inversed bg-bg-primary",
4343
"hover:bg-bg-primary_hover",
4444
"peer-checked:bg-bg-brand-solid peer-checked:hover:bg-bg-brand-solid_hover peer-checked:border-none",
@@ -48,6 +48,7 @@
4848
sm: "size-4",
4949
md: "size-5",
5050
}[size],
51+
(nonNullish(label) || nonNullish(hint)) && "mt-0.5",
5152
className,
5253
]}
5354
>
@@ -73,7 +74,7 @@
7374
<p
7475
class={[
7576
"text-text-secondary font-medium select-none",
76-
{ sm: "text-sm", md: "text-md" }[size],
77+
{ sm: "text-sm", md: "text-base" }[size],
7778
]}
7879
>
7980
{label}
@@ -83,7 +84,7 @@
8384
<p
8485
class={[
8586
"text-text-tertiary select-none",
86-
{ sm: "text-sm", md: "text-md" }[size],
87+
{ sm: "text-sm", md: "text-base" }[size],
8788
]}
8889
>
8990
{hint}

src/frontend/src/lib/components/ui/IdentitySwitcher.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</script>
4242

4343
<div class="mb-4 flex items-center">
44-
<h2 class="text-text-primary text-md font-medium">{$t`Switch identity`}</h2>
44+
<h2 class="text-text-primary text-base font-medium">{$t`Switch identity`}</h2>
4545
{#if nonNullish(onClose)}
4646
<Button
4747
onclick={onClose}

src/frontend/src/lib/components/ui/Input.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
bind:value
4444
{...restProps}
4545
class={[
46-
"text-md bg-bg-primary text-text-primary placeholder:text-text-placeholder flex-1 rounded-lg border border-none p-0 opacity-100 ring outline-none ring-inset not-dark:shadow-xs",
46+
"bg-bg-primary text-text-primary placeholder:text-text-placeholder flex-1 rounded-lg border border-none p-0 text-base opacity-100 ring outline-none ring-inset not-dark:shadow-xs",
4747
errorBorder ? "ring-border-error_subtle" : "ring-border-secondary",
4848
"focus:ring-2",
4949
errorBorder ? "focus:ring-border-error" : "focus:ring-border-brand",

src/frontend/src/lib/components/ui/SideBar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
>
1212
<div class="mb-6 flex flex-1 items-center gap-4 px-3">
1313
<Logo class="text-fg-primary h-5.5" />
14-
<h1 class="text-md text-text-primary font-semibold sm:block">
14+
<h1 class="text-text-primary text-base font-semibold sm:block">
1515
Internet Identity <span class="font-medium">Hub</span>
1616
</h1>
1717
</div>

src/frontend/src/lib/components/ui/Toggle.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<label
2424
class={[
25-
"flex w-max flex-row items-start",
25+
"flex w-max max-w-full flex-row items-start",
2626
{ sm: "gap-2", md: "gap-3" }[size],
2727
className,
2828
]}
@@ -36,11 +36,10 @@
3636
/>
3737
<div
3838
class={[
39-
"cursor-pointer rounded-full p-0.5 transition-colors duration-200",
40-
"bg-bg-tertiary",
41-
"peer-checked:bg-bg-brand-solid dark:peer-checked:bg-bg-quaternary",
42-
"peer-checked:hover:bg-bg-brand-solid_hover dark:peer-checked:hover:bg-bg-quaternary_hover",
43-
"after:block after:rounded-full after:bg-white after:shadow-sm after:transition-transform after:duration-200",
39+
"shrink-0 cursor-pointer rounded-full p-0.5 transition-colors duration-200",
40+
"bg-bg-tertiary dark:bg-bg-quaternary/60",
41+
"peer-checked:bg-bg-brand-solid dark:peer-checked:bg-fg-tertiary",
42+
"after:block after:rounded-full after:bg-white after:shadow-xs after:transition-transform after:duration-200",
4443
"peer-checked:after:translate-x-[100%]",
4544
"peer-disabled:bg-bg-disabled peer-disabled:after:bg-surface-light-50 dark:peer-disabled:after:bg-surface-dark-400",
4645
"peer-focus-visible:ring-focus-ring peer-focus-visible:ring-offset-bg-primary outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2",
@@ -56,7 +55,7 @@
5655
<p
5756
class={[
5857
"text-text-secondary font-medium select-none",
59-
{ sm: "text-sm", md: "text-md" }[size],
58+
{ sm: "text-sm", md: "text-base" }[size],
6059
]}
6160
>
6261
{label}
@@ -66,7 +65,7 @@
6665
<p
6766
class={[
6867
"text-text-tertiary select-none",
69-
{ sm: "text-sm", md: "text-md" }[size],
68+
{ sm: "text-sm", md: "text-base" }[size],
7069
]}
7170
>
7271
{hint}

src/frontend/src/lib/components/views/AuthorizeError.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<CircleAlertIcon class="size-6" />
3434
</FeaturedIcon>
3535
<h1 class="text-text-primary mb-3 text-2xl font-medium">{title}</h1>
36-
<p class="text-md text-text-tertiary mb-6 font-medium">{description}</p>
36+
<p class="text-text-tertiary mb-6 text-base font-medium">{description}</p>
3737
<Button onclick={() => window.close()} variant="secondary">
3838
<RotateCcwIcon class="size-4" />
3939
<span>{$t`Return to app`}</span>
@@ -47,7 +47,7 @@
4747
<h1 class="text-text-primary mb-3 text-2xl font-medium">
4848
{$t`Authentication successful`}
4949
</h1>
50-
<p class="text-md text-text-tertiary mb-6 font-medium">
50+
<p class="text-text-tertiary mb-6 text-base font-medium">
5151
{$t`You may close this page.`}
5252
</p>
5353
<Button onclick={() => window.close()} variant="secondary">

0 commit comments

Comments
 (0)