From 95095083c39d2337b491edf3fadfa87573e40e08 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 11 Oct 2024 14:43:20 -0700 Subject: [PATCH] refactor: Move global styles to `app.css` --- .pre-commit-config.yaml | 2 +- src/app.css | 57 ++++++++++++++++++++++++++++++++++++++ src/routes/+layout.svelte | 58 --------------------------------------- 3 files changed, 58 insertions(+), 59 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e128de..3e6b0fa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: hooks: - id: conventional-pre-commit stages: [commit-msg] - args: [feat, fix, chore, test, build, merge] + args: [feat, fix, chore, test, build, merge, refactor] - repo: local hooks: - id: eslint diff --git a/src/app.css b/src/app.css index b761127..329d28d 100644 --- a/src/app.css +++ b/src/app.css @@ -95,3 +95,60 @@ html { hr { @apply separator; } + +a, button { + color: theme('colors.eucalyptus.400'); + &:hover, + &:focus { + color: theme('colors.java.500'); + } +} +.dark a:not(.disabled-link),button { + text-shadow: 0 0 5px; +} +.nav-link { + @apply text-lg; + font-weight: 500; + font-family: serif; +} +a.disabled-link { + color: rgb(128,128,128); + pointer-events: none; +} +a:not(.icon) { + position: relative; + text-decoration: inherit; + + &::after { + content: ""; + display: block; + width: 100%; + position: absolute; + height: 2px; + bottom: 0; + left: 0; + background-color: theme('colors.java.500'); + transform: scaleX(0); + transition: transform 0.3s ease; + } + + &:hover, + &:focus { + &::after { + content: ""; + position: absolute; + transform: scaleX(1); + } + } +} +a.current-link { + color: theme('colors.magenta.500'); + + &::after { + background-color: theme('colors.magenta.500'); + } + &:hover, + &:focus { + color: theme('colors.magenta.500'); + } +} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 17b941b..bdee40b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -31,59 +31,6 @@ {/if}