fix: clip material background to padding-box to stop weird firefox glitch
This commit is contained in:
7 files changed
+120
-123
No files matched your search
@@ -14,7 +14,6 @@
|
|||||||
--animate-pop-in: pop-in 0.8s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
|
--animate-pop-in: pop-in 0.8s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
|
||||||
|
|
||||||
--ease-cubic: cubic-bezier(0.075, 0.82, 0.165, 1);
|
--ease-cubic: cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
--spacing-22: 88px;
|
|
||||||
|
|
||||||
--color-slate-25: rgb(252 253 254);
|
--color-slate-25: rgb(252 253 254);
|
||||||
--color-zinc-925: 28 28 32;
|
--color-zinc-925: 28 28 32;
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
import Subscribe from '../../../routes/communities/Subscribe.svelte'
|
import Subscribe from '../../../routes/communities/Subscribe.svelte'
|
||||||
import { addSubscription } from '../user'
|
import { addSubscription } from '../user'
|
||||||
import CommunityCard from './CommunityCard.svelte'
|
import CommunityCard from './CommunityCard.svelte'
|
||||||
|
import { settings } from '$lib/app/settings.svelte'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
community: CommunityView
|
community: CommunityView
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
<CommonItem
|
<CommonItem
|
||||||
icon={community.community.icon}
|
icon={settings.nsfwBlur && community.community.nsfw ? undefined : community.community.icon}
|
||||||
href="/c/{fullCommunityName(
|
href="/c/{fullCommunityName(
|
||||||
community.community.name,
|
community.community.name,
|
||||||
community.community.actor_id,
|
community.community.actor_id,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
danger: 'btn-danger',
|
danger: 'btn-danger',
|
||||||
ghost: 'btn-ghost',
|
ghost: 'btn-ghost',
|
||||||
'danger-subtle':
|
'danger-subtle':
|
||||||
'text-red-500 dark:text-red-400 hover:bg-red-500 hover:dark:bg-red-400 hover:text-inherit!',
|
'text-red-500 dark:text-red-400 hover:bg-red-500/15 hover:dark:bg-red-400/20',
|
||||||
'success-subtle':
|
'success-subtle':
|
||||||
'text-green-500 dark:text-green-400 hover:bg-green-500 hover:dark:bg-green-400 hover:text-inherit!',
|
'text-green-500 dark:text-green-400 hover:bg-green-500 hover:dark:bg-green-400 hover:text-inherit!',
|
||||||
'warning-subtle':
|
'warning-subtle':
|
||||||
@@ -183,8 +183,8 @@
|
|||||||
font-size: var(--text-sm);
|
font-size: var(--text-sm);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
|
|
||||||
transition: 75ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
transition: 75ms cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
|
background-clip: padding-box;
|
||||||
|
|
||||||
@variant hover {
|
@variant hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -196,16 +196,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
border: 1px solid var(--color-primary-900);
|
background-image: linear-gradient(to bottom, var(--color-primary-800), var(--color-primary-900));
|
||||||
background: linear-gradient(to bottom, var(--color-primary-800), var(--color-primary-900));
|
|
||||||
box-shadow: 0px 1.5px 0px 0px var(--color-slate-500) inset;
|
box-shadow: 0px 1.5px 0px 0px var(--color-slate-500) inset;
|
||||||
color: var(--color-slate-50);
|
color: var(--color-slate-50);
|
||||||
|
border: 1px solid var(--color-slate-900);
|
||||||
|
|
||||||
@variant dark {
|
@variant dark {
|
||||||
border-color: var(--color-primary-200);
|
border-color: var(--color-primary-200);
|
||||||
background: linear-gradient(to bottom, var(--color-primary-100), var(--color-primary-200));
|
background-image: linear-gradient(to bottom, var(--color-primary-100), var(--color-primary-200));
|
||||||
color: var(--color-zinc-900);
|
color: var(--color-zinc-900);
|
||||||
box-shadow: 0px 1.5px 0px 0px --alpha(var(--color-white) / 100%) inset;
|
box-shadow: 0px 2.5px 0px -1px var(--color-white) inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@variant hover {
|
@variant hover {
|
||||||
@@ -295,16 +295,17 @@
|
|||||||
|
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
background: linear-gradient(to bottom, var(--color-red-400), var(--color-red-500));
|
background: linear-gradient(to bottom, var(--color-red-400), var(--color-red-500));
|
||||||
border: 1px solid var(--color-red-600);
|
border: 1px solid var(--color-red-700);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0px 1.5px 0px 0px inset --alpha(var(--color-red-50) / 50%),
|
0px 1.5px 0px 0px inset --alpha(var(--color-red-50) / 50%),
|
||||||
0px -1px 0px 0px inset --alpha(var(--color-red-900) / 50%);
|
0px -1px 0px 0px inset --alpha(var(--color-red-900) / 50%);
|
||||||
color: var(--color-white);
|
color: var(--color-white);
|
||||||
|
|
||||||
@variant dark {
|
@variant dark {
|
||||||
background: linear-gradient(to bottom, var(--color-red-300), var(--color-red-400));
|
background-image: linear-gradient(to bottom, var(--color-red-300), var(--color-red-400));
|
||||||
color: var(--color-black);
|
color: var(--color-black);
|
||||||
border: 1px solid var(--color-red-900);
|
border-color: var(--color-red-900);
|
||||||
|
background-clip: padding-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@variant hover {
|
@variant hover {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
}: Props = $props()
|
}: Props = $props()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={['text-input-container', clazz]}>
|
<div class={['text-input-container ', clazz]}>
|
||||||
{#if passedCustomLabel || label}
|
{#if passedCustomLabel || label}
|
||||||
<Label
|
<Label
|
||||||
for={id}
|
for={id}
|
||||||
@@ -133,6 +133,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: calc(var(--spacing) * 1);
|
gap: calc(var(--spacing) * 1);
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
*:focus {
|
*:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|||||||
@@ -134,21 +134,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.material-distinct {
|
.material-distinct {
|
||||||
background-color: --alpha(var(--color-slate-50) / 70%);
|
background-image: linear-gradient(to bottom, var(--color-white), var(--color-slate-50));
|
||||||
border: 1px solid var(--color-slate-200);
|
border: 1px solid var(--color-slate-200);
|
||||||
box-shadow: 0px 1.5px 0px 0px --alpha(var(--color-white) / 90%) inset;
|
box-shadow: 0px -2px 0px -1px --alpha(var(--color-slate-200) / 90%) inset;
|
||||||
|
background-clip: padding-box;
|
||||||
@variant not-dark {
|
|
||||||
border-bottom-color: var(--color-slate-300);
|
|
||||||
}
|
|
||||||
|
|
||||||
@variant dark {
|
@variant dark {
|
||||||
background: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
var(--color-zinc-800),
|
var(--color-zinc-800),
|
||||||
var(--color-zinc-900)
|
var(--color-zinc-900)
|
||||||
);
|
);
|
||||||
border-color: oklab(0.2 0 00%);
|
border-color: oklab(0.2 0 0%);
|
||||||
box-shadow: 0px 1.5px 0px 0px --alpha(var(--color-zinc-700) / 80%) inset;
|
box-shadow: 0px 1.5px 0px 0px --alpha(var(--color-zinc-700) / 80%) inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
size="custom"
|
size="custom"
|
||||||
rounding="none"
|
rounding="none"
|
||||||
class={[
|
class={[
|
||||||
'w-full px-3 py-1.5 min-h-7 duration-75 hover:cursor-default font-normal rounded-lg flex items-center gap-1 text-sm',
|
'w-full px-3 py-1.5 min-h-7 duration-75 hover:duration-0 hover:cursor-default font-normal rounded-lg flex items-center gap-1 text-sm',
|
||||||
disabled && 'opacity-70 pointer-events-none cursor-not-allowed',
|
disabled && 'opacity-70 pointer-events-none cursor-not-allowed',
|
||||||
color == 'tertiary' && 'dark:hover:bg-zinc-800/70',
|
color == 'tertiary' && 'dark:hover:bg-zinc-800/70',
|
||||||
clazz,
|
clazz,
|
||||||
|
|||||||
+100
-102
@@ -150,110 +150,108 @@
|
|||||||
<title>{$t('account.login')}</title>
|
<title>{$t('account.login')}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="max-w-xl w-full mx-auto h-max my-auto">
|
<form
|
||||||
<form
|
onsubmit={(e) => {
|
||||||
onsubmit={(e) => {
|
e.preventDefault()
|
||||||
e.preventDefault()
|
logIn()
|
||||||
logIn()
|
}}
|
||||||
}}
|
class="flex flex-col gap-5 max-w-xl w-full mx-auto h-max my-auto"
|
||||||
class="flex flex-col gap-5"
|
>
|
||||||
>
|
<div class="flex flex-col">
|
||||||
<div class="flex flex-col">
|
{@render children?.()}
|
||||||
{@render children?.()}
|
<Header>{$t('account.login')}</Header>
|
||||||
<Header>{$t('account.login')}</Header>
|
<ErrorContainer class="pt-2" scope={page.route.id} />
|
||||||
<ErrorContainer class="pt-2" scope={page.route.id} />
|
</div>
|
||||||
</div>
|
{#if form.client.name == 'piefed'}
|
||||||
{#if form.client.name == 'piefed'}
|
<Note>
|
||||||
<Note>
|
{$t('account.piefedGate')}
|
||||||
{$t('account.piefedGate')}
|
</Note>
|
||||||
</Note>
|
{/if}
|
||||||
{/if}
|
<div class="flex items-center gap-2">
|
||||||
<div class="flex flex-row w-full items-center gap-2">
|
<TextInput
|
||||||
|
id="username"
|
||||||
|
bind:value={form.username}
|
||||||
|
label={$t('form.username')}
|
||||||
|
class="flex-1"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
{#if !LINKED_INSTANCE_URL}
|
||||||
<TextInput
|
<TextInput
|
||||||
id="username"
|
id="instance_url"
|
||||||
bind:value={form.username}
|
placeholder={DEFAULT_INSTANCE_URL}
|
||||||
label={$t('form.username')}
|
disabled={LINKED_INSTANCE_URL != undefined}
|
||||||
|
bind:value={form.instance}
|
||||||
class="flex-1"
|
class="flex-1"
|
||||||
required
|
required
|
||||||
/>
|
pattern={DOMAIN_REGEX_FORMS}
|
||||||
{#if !LINKED_INSTANCE_URL}
|
autocorrect="off"
|
||||||
<TextInput
|
autocapitalize="off"
|
||||||
id="instance_url"
|
>
|
||||||
placeholder={DEFAULT_INSTANCE_URL}
|
{#snippet customLabel()}
|
||||||
disabled={LINKED_INSTANCE_URL != undefined}
|
{$t('form.instance')}
|
||||||
bind:value={form.instance}
|
<span class="absolute right-0">
|
||||||
class="flex-1"
|
{#if detectedClient}
|
||||||
required
|
<span
|
||||||
pattern={DOMAIN_REGEX_FORMS}
|
class="capitalize font-normal"
|
||||||
autocorrect="off"
|
in:fly={{ duration: 300, y: 2, easing: expoOut }}
|
||||||
autocapitalize="off"
|
>
|
||||||
>
|
{detectedClient}
|
||||||
{#snippet customLabel()}
|
</span>
|
||||||
{$t('form.instance')}
|
{:else if detectedClient === null}
|
||||||
<span class="absolute right-0">
|
<Spinner />
|
||||||
{#if detectedClient}
|
{/if}
|
||||||
<span
|
</span>
|
||||||
class="capitalize font-normal"
|
{/snippet}
|
||||||
in:fly={{ duration: 300, y: 2, easing: expoOut }}
|
</TextInput>
|
||||||
>
|
{/if}
|
||||||
{detectedClient}
|
</div>
|
||||||
</span>
|
<div role="presentation" class="flex flex-row gap-2">
|
||||||
{:else if detectedClient === null}
|
<TextInput
|
||||||
<Spinner />
|
id="password"
|
||||||
{/if}
|
bind:value={form.password}
|
||||||
</span>
|
label={$t('form.password')}
|
||||||
{/snippet}
|
type="password"
|
||||||
</TextInput>
|
minlength={form.client.name == 'piefed'
|
||||||
{/if}
|
? PiefedClient.constants.password.minLength
|
||||||
</div>
|
: LemmyClient.constants.password.minLength}
|
||||||
<div role="presentation" class="flex flex-row gap-2">
|
maxlength={form.client.name == 'piefed'
|
||||||
<TextInput
|
? PiefedClient.constants.password.maxLength
|
||||||
id="password"
|
: LemmyClient.constants.password.maxLength}
|
||||||
bind:value={form.password}
|
required
|
||||||
label={$t('form.password')}
|
class="flex-1!"
|
||||||
type="password"
|
/>
|
||||||
minlength={form.client.name == 'piefed'
|
<TextInput
|
||||||
? PiefedClient.constants.password.minLength
|
id="totp"
|
||||||
: LemmyClient.constants.password.minLength}
|
bind:value={form.totp}
|
||||||
maxlength={form.client.name == 'piefed'
|
label={$t('form.2fa')}
|
||||||
? PiefedClient.constants.password.maxLength
|
placeholder="123456"
|
||||||
: LemmyClient.constants.password.maxLength}
|
pattern={'\\d{6}'}
|
||||||
required
|
minlength={6}
|
||||||
class="w-full"
|
maxlength={6}
|
||||||
/>
|
class="w-24"
|
||||||
<TextInput
|
/>
|
||||||
id="totp"
|
</div>
|
||||||
bind:value={form.totp}
|
<Button
|
||||||
label={$t('form.2fa')}
|
loading={form.loading}
|
||||||
placeholder="123456"
|
disabled={form.loading}
|
||||||
pattern={'\\d{6}'}
|
color="primary"
|
||||||
minlength={6}
|
size="lg"
|
||||||
maxlength={6}
|
submit
|
||||||
class="w-24"
|
>
|
||||||
/>
|
{$t('account.login')}
|
||||||
</div>
|
</Button>
|
||||||
<Button
|
<hr class="border-slate-200 dark:border-zinc-800" />
|
||||||
loading={form.loading}
|
<ButtonGroup orientation="horizontal" class="flex overflow-auto">
|
||||||
disabled={form.loading}
|
<Button href="/signup" icon={Identification}>
|
||||||
color="primary"
|
{$t('account.signup')}
|
||||||
size="lg"
|
|
||||||
submit
|
|
||||||
>
|
|
||||||
{$t('account.login')}
|
|
||||||
</Button>
|
</Button>
|
||||||
<hr class="border-slate-200 dark:border-zinc-800" />
|
<Button href="/login_reset" icon={QuestionMarkCircle}>
|
||||||
<ButtonGroup orientation="horizontal" class="flex overflow-auto">
|
{$t('form.forgotpassword')}
|
||||||
<Button href="/signup" icon={Identification}>
|
</Button>
|
||||||
{$t('account.signup')}
|
{#if !LINKED_INSTANCE_URL}
|
||||||
|
<Button href="/login/guest" icon={UserCircle}>
|
||||||
|
{$t('account.guest')}
|
||||||
</Button>
|
</Button>
|
||||||
<Button href="/login_reset" icon={QuestionMarkCircle}>
|
{/if}
|
||||||
{$t('form.forgotpassword')}
|
</ButtonGroup>
|
||||||
</Button>
|
</form>
|
||||||
{#if !LINKED_INSTANCE_URL}
|
|
||||||
<Button href="/login/guest" icon={UserCircle}>
|
|
||||||
{$t('account.guest')}
|
|
||||||
</Button>
|
|
||||||
{/if}
|
|
||||||
</ButtonGroup>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
Reference in new issue
Block a user