Skip to content

Open source personal finance application

chore(css): clean up

Ilya Komichev61415f2c39ba
diff --git a/app/assets/css/main.css b/app/assets/css/main.css
index de3dbe15..2c187498 100644
--- a/app/assets/css/main.css
+++ b/app/assets/css/main.css
@@ -1,79 +1,14 @@
@import 'tailwindcss' theme(static);
@import '@nuxt/ui';
-@import './vars.css';
-@import './others.css';
@import './theme.css';
+@import './toastify.css';
+@import './utility.css';
@custom-variant dark (&:where(.dark, .dark *));
@custom-variant hover {
- @media (hover: hover) and (pointer: fine) {
- &:hover {
- @slot;
- }
- }
-
- &:active {
- @slot;
- }
-}
-
-@utility flex-center {
- @apply flex items-center justify-center;
-}
-
-@utility flex-center-col {
- @apply flex flex-col items-center justify-center;
-}
-
-@utility absolute-center {
- @apply absolute top-1/2 left-1/2;
- transform: translate(-50%, -50%);
-}
-
-@utility layoutBase {
- @apply h-dvh;
-}
-
-@utility pageWrapper {
- @apply @xl/page:max-w-2xl grow px-2 lg:px-4 2xl:px-8;
-}
-
-@utility bottomSheetDrugClassesCustom {
- @apply bg-default max-w-md rounded-xl;
-}
-
-@utility bottomSheetContent {
- @apply grid h-full max-h-[98dvh] grid-rows-[auto_1fr_auto] overflow-hidden;
- padding-bottom: calc(env(safe-area-inset-bottom) - 22px);
-}
-
-@utility bottomSheetContentInside {
- @apply grid h-full bg-default gap-1 overflow-hidden overflow-y-auto px-2 py-px;
-}
-
-@utility bottomSheetContentBottom {
- @apply flex items-center justify-center p-2;
-}
-
-@utility scrollbar {
- @apply h-full overflow-hidden overflow-y-auto;
-
- &::-webkit-scrollbar {
- @apply w-1.5 h-1.5;
- }
-
- &::-webkit-scrollbar-track {
- @apply bg-transparent rounded-[10px];
- }
-
- &::-webkit-scrollbar-thumb {
- @apply bg-gray-500 rounded-[10px];
- }
-
- &::-webkit-scrollbar-thumb:hover {
- @apply bg-gray-600;
- }
+ @media (hover: hover) and (pointer: fine) { &:hover { @slot; } }
+ &:active { @slot; }
}
@layer base {
diff --git a/app/assets/css/others.css b/app/assets/css/toastify.css
similarity index 100%
rename from app/assets/css/others.css
rename to app/assets/css/toastify.css
diff --git a/app/assets/css/utility.css b/app/assets/css/utility.css
new file mode 100644
index 00000000..948f9f2a
--- /dev/null
+++ b/app/assets/css/utility.css
@@ -0,0 +1,57 @@
+@utility flex-center {
+ @apply flex items-center justify-center;
+}
+
+@utility flex-center-col {
+ @apply flex flex-col items-center justify-center;
+}
+
+@utility absolute-center {
+ @apply absolute top-1/2 left-1/2;
+ transform: translate(-50%, -50%);
+}
+
+@utility layoutBase {
+ @apply h-dvh;
+}
+
+@utility pageWrapper {
+ @apply @xl/page:max-w-2xl grow px-2 lg:px-4 2xl:px-8;
+}
+
+@utility bottomSheetDrugClassesCustom {
+ @apply bg-default max-w-md rounded-xl;
+}
+
+@utility bottomSheetContent {
+ @apply grid h-full max-h-[98dvh] grid-rows-[auto_1fr_auto] overflow-hidden;
+ padding-bottom: calc(env(safe-area-inset-bottom) - 22px);
+}
+
+@utility bottomSheetContentInside {
+ @apply grid h-full bg-default gap-1 overflow-hidden overflow-y-auto px-2 py-px;
+}
+
+@utility bottomSheetContentBottom {
+ @apply flex items-center justify-center p-2;
+}
+
+@utility scrollbar {
+ @apply h-full overflow-hidden overflow-y-auto;
+
+ &::-webkit-scrollbar {
+ @apply w-1.5 h-1.5;
+ }
+
+ &::-webkit-scrollbar-track {
+ @apply bg-transparent rounded-[10px];
+ }
+
+ &::-webkit-scrollbar-thumb {
+ @apply bg-gray-500 rounded-[10px];
+ }
+
+ &::-webkit-scrollbar-thumb:hover {
+ @apply bg-gray-600;
+ }
+}
diff --git a/app/assets/css/vars.css b/app/assets/css/vars.css
deleted file mode 100644
index af8b1b7c..00000000
--- a/app/assets/css/vars.css
+++ /dev/null
@@ -1,14 +0,0 @@
-:root {
- --chart-label: var(--text-4);
- --chart-line: var(--item-5);
- --chart-splitLine: var(--item-6);
- --chart-tooltip: var(--ui-text-muted);
- --chart-axisLabel: var(--text-1);
-
- --expense-1: oklch(0.63 0.24 24.81);
- --expense-2: oklch(0.63 0.24 24.81 / 0.5);
- --income-1: oklch(0.65 0.2 142.06);
- --income-2: oklch(0.65 0.2 142.06 / 0.5);
-
- --text-alert-1: oklch(0.63 0.24 24.81);
-}