From c9b6f02fd304e47d602af68c63d052187d296c52 Mon Sep 17 00:00:00 2001 From: Danny Morabito Date: Fri, 29 Nov 2024 19:16:34 +0100 Subject: [PATCH] clean css --- src/components/Checkbox.svelte | 8 +- src/components/ColorPicker.svelte | 20 +- src/components/Dialog.svelte | 1 - src/components/MailboxFolderItems.svelte | 93 +--- src/components/Notification.svelte | 2 + src/components/Tooltip.svelte | 1 - src/lib/base.css | 520 +---------------------- src/lib/style/animations.css | 38 ++ src/lib/style/form.css | 58 +++ src/lib/style/hr.css | 34 ++ src/lib/style/layout.css | 167 ++++++++ src/lib/style/mailbox-folder-items.css | 82 ++++ src/lib/style/notifications.css | 74 ++++ src/lib/style/reset.css | 36 ++ src/lib/style/stamps.css | 20 + src/lib/style/typography.css | 11 + src/lib/style/variables.css | 51 +++ src/routes/+layout.svelte | 1 + src/routes/letters/[id]/+page.svelte | 6 - 19 files changed, 585 insertions(+), 638 deletions(-) create mode 100644 src/lib/style/animations.css create mode 100644 src/lib/style/form.css create mode 100644 src/lib/style/hr.css create mode 100644 src/lib/style/layout.css create mode 100644 src/lib/style/mailbox-folder-items.css create mode 100644 src/lib/style/notifications.css create mode 100644 src/lib/style/reset.css create mode 100644 src/lib/style/stamps.css create mode 100644 src/lib/style/typography.css create mode 100644 src/lib/style/variables.css diff --git a/src/components/Checkbox.svelte b/src/components/Checkbox.svelte index 9b5f306..95d8518 100644 --- a/src/components/Checkbox.svelte +++ b/src/components/Checkbox.svelte @@ -158,7 +158,7 @@ } input:checked ~ .checkbox-wrapper .check-path { - animation: check-draw 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; + animation: draw-svg 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; } input:checked ~ .checkbox-wrapper .checkbox-border { @@ -187,12 +187,6 @@ scale: 0.95; } - @keyframes check-draw { - to { - stroke-dashoffset: 0; - } - } - @media (prefers-reduced-motion: reduce) { .checkbox-container *, .checkbox-container { diff --git a/src/components/ColorPicker.svelte b/src/components/ColorPicker.svelte index d208fd7..7ba25c0 100644 --- a/src/components/ColorPicker.svelte +++ b/src/components/ColorPicker.svelte @@ -97,7 +97,7 @@ transparent 60% ); transform: rotate(45deg); - animation: shine 4s infinite cubic-bezier(0.4, 0, 0.2, 1); + animation: gleam 4s infinite cubic-bezier(0.4, 0, 0.2, 1); } .glow { @@ -110,22 +110,4 @@ ); animation: pulse 3s infinite alternate; } - - @keyframes shine { - 0% { - transform: translateX(-150%) rotate(45deg); - } - 100% { - transform: translateX(150%) rotate(45deg); - } - } - - @keyframes pulse { - 0% { - opacity: 0.5; - } - 100% { - opacity: 1; - } - } diff --git a/src/components/Dialog.svelte b/src/components/Dialog.svelte index 711b79f..c33f6d0 100644 --- a/src/components/Dialog.svelte +++ b/src/components/Dialog.svelte @@ -15,7 +15,6 @@ { open = false; onClose(); }} use:appendToBody > diff --git a/src/components/MailboxFolderItems.svelte b/src/components/MailboxFolderItems.svelte index 0623203..783dd28 100644 --- a/src/components/MailboxFolderItems.svelte +++ b/src/components/MailboxFolderItems.svelte @@ -8,6 +8,7 @@ import type { Letter } from '$lib/letter'; import { slide } from 'svelte/transition'; import { FolderLabel } from '$lib/folderLabel'; + import '$lib/style/mailbox-folder-items.css'; let { letters, @@ -215,95 +216,3 @@ {@render letterGroup(sortedInbox)} {/if} - - diff --git a/src/components/Notification.svelte b/src/components/Notification.svelte index 231726e..ed49199 100644 --- a/src/components/Notification.svelte +++ b/src/components/Notification.svelte @@ -1,4 +1,6 @@