Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

refactor(styles): replace hard coded values with variables

Smaug67399e3a9a225dc8
diff --git a/frontend/app/components/AppAccordion.vue b/frontend/app/components/AppAccordion.vue
index 4e3ecd2a..9e6e43b3 100644
--- a/frontend/app/components/AppAccordion.vue
+++ b/frontend/app/components/AppAccordion.vue
@@ -91,10 +91,7 @@ function onLeave(el: Element) {
border-radius: var(--radius-lg);
background: #fff;
box-shadow: var(--shadow-sm);
- transition:
- box-shadow 0.25s ease,
- border-color 0.25s ease,
- background 0.25s ease;
+ transition: border-color $transition-base ease;
overflow: hidden;
&.open {
@@ -163,7 +160,7 @@ function onLeave(el: Element) {
.accordion-expand-leave-active {
transition:
max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
- opacity 0.25s ease;
+ opacity $transition-base ease;
}
.accordion-expand-enter-from,
diff --git a/frontend/app/components/ContextMenuManager.vue b/frontend/app/components/ContextMenuManager.vue
index 1d95955b..f1d4433c 100644
--- a/frontend/app/components/ContextMenuManager.vue
+++ b/frontend/app/components/ContextMenuManager.vue
@@ -165,9 +165,7 @@ const pos = computed(() => {
min-width: 240px;
border-radius: var(--radius-lg);
background: var(--surface-base);
- box-shadow:
- 0 8px 30px rgb(0 0 0 / 12%),
- 0 2px 8px rgb(0 0 0 / 6%);
+ box-shadow: var(--shadow-lg);
overflow: hidden;
}
@@ -184,9 +182,7 @@ const pos = computed(() => {
}
:root.dark .context-menu {
- box-shadow:
- 0 8px 30px rgb(0 0 0 / 40%),
- 0 0 1px rgb(255 255 255 / 10%);
+ box-shadow: var(--shadow-lg);
}
/* ========================
diff --git a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
index 0e32a3ff..ff0867cd 100644
--- a/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
+++ b/frontend/app/components/MarkdownEditor/ColorPickerModal.vue
@@ -231,9 +231,9 @@ onMounted(() => {
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
transition:
- transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
- border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
- box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
+ transform $transition-slow cubic-bezier(0.4, 0, 0.2, 1),
+ border-color $transition-slow cubic-bezier(0.4, 0, 0.2, 1),
+ box-shadow $transition-slow cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
overflow: hidden;
diff --git a/frontend/app/components/Notification.vue b/frontend/app/components/Notification.vue
index a3c8c7ed..b693b2c8 100644
--- a/frontend/app/components/Notification.vue
+++ b/frontend/app/components/Notification.vue
@@ -61,9 +61,7 @@ const close = (id: number) => manager.remove(id);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--surface-base);
- box-shadow:
- 0 4px 6px -1px rgb(0 0 0 / 10%),
- 0 2px 4px -2px rgb(0 0 0 / 10%);
+ box-shadow: var(--shadow-md);
align-items: flex-start;
gap: 12px;
overflow: hidden;
@@ -230,8 +228,6 @@ const close = (id: number) => manager.remove(id);
/* Dark mode adjustments */
:global(.dark-mode) .notification {
- box-shadow:
- 0 4px 6px -1px rgb(0 0 0 / 30%),
- 0 2px 4px -2px rgb(0 0 0 / 20%);
+ box-shadow: var(--shadow-md);
}
</style>
diff --git a/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue b/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
index 49d0ab5b..56182422 100644
--- a/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
+++ b/frontend/app/pages/(public)/_components/features/FeaturesTimeline.vue
@@ -225,7 +225,7 @@ section {
display: flex;
background: rgb(0 0 0 / 85%);
align-items: center;
- animation: fadeIn 0.25s ease;
+ animation: fadeIn $transition-base ease;
inset: 0;
justify-content: center;
@@ -234,7 +234,7 @@ section {
max-width: min(1100px, 92vw);
max-height: 85vh;
border-radius: var(--radius-lg);
- animation: zoomIn 0.25s ease;
+ animation: zoomIn $transition-base ease;
overflow: hidden;
img {
diff --git a/frontend/app/pages/(public)/about.vue b/frontend/app/pages/(public)/about.vue
index da700278..4b24578e 100644
--- a/frontend/app/pages/(public)/about.vue
+++ b/frontend/app/pages/(public)/about.vue
@@ -178,15 +178,11 @@ main {
}
.btn.glow {
- box-shadow:
- 0 10px 30px rgb(0 0 0 / 20%),
- 0 0 0 rgb(255 255 255 / 60%);
+ box-shadow: var(--shadow-lg);
}
.btn.glow:hover {
- box-shadow:
- 0 14px 36px rgb(0 0 0 / 24%),
- 0 0 30px rgb(255 255 255 / 35%);
+ box-shadow: var(--shadow-xl);
}
.about-section {