Extract glass system into shared CSS utilities and design tokens

Centralize all hardcoded rgba color values into CSS custom properties
and extract glass/glow styles into reusable utility classes (.glass,
.glass-inner, .glow-border, .glow-border--animated) in main.css.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 18:35:36 +01:00
parent 29974704d0
commit 019ead7be3
7 changed files with 133 additions and 55 deletions

View File

@@ -28,7 +28,7 @@ defineProps<{
.attendee-list__heading {
font-size: 0.75rem;
font-weight: 700;
color: rgba(255, 255, 255, 0.5);
color: var(--color-text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
}
@@ -44,7 +44,7 @@ defineProps<{
.attendee-list__item {
font-size: 0.95rem;
color: rgba(255, 255, 255, 0.85);
color: var(--color-text-soft);
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
@@ -53,7 +53,7 @@ defineProps<{
.attendee-list__empty {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.5);
color: var(--color-text-muted);
font-style: italic;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<RouterLink to="/create" class="fab" aria-label="Create event">
<span class="fab__inner">
<RouterLink to="/create" class="fab glow-border" aria-label="Create event">
<span class="fab__inner glass-inner">
<span class="fab__icon" aria-hidden="true">+</span>
</span>
</RouterLink>
@@ -18,37 +18,19 @@ import { RouterLink } from 'vue-router'
width: 56px;
height: 56px;
border-radius: 50%;
background: conic-gradient(from 135deg, #F06292, #AB47BC, #5C6BC0, #F06292);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
z-index: 100;
padding: 2px;
transition: transform 0.15s ease;
}
.fab::before {
content: '';
position: absolute;
inset: -4px;
border-radius: 50%;
background: conic-gradient(from 135deg, #F06292, #AB47BC, #5C6BC0, #F06292);
filter: blur(8px);
opacity: 0.3;
z-index: -1;
}
.fab__inner {
width: 100%;
height: 100%;
border-radius: 50%;
background: rgba(27, 23, 48, 0.55);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
display: flex;
align-items: center;
justify-content: center;

View File

@@ -12,7 +12,7 @@ defineProps<{
.date-subheader {
font-size: 0.85rem;
font-weight: 500;
color: rgba(255, 255, 255, 0.85);
color: var(--color-text-soft);
margin: 0;
padding: var(--spacing-xs) 0;
}

View File

@@ -1,7 +1,9 @@
<template>
<div class="empty-state">
<p class="empty-state__message">No events yet.<br />Create your first one!</p>
<RouterLink to="/create" class="btn-primary empty-state__cta">+ Create Event</RouterLink>
<RouterLink to="/create" class="empty-state__cta glow-border glow-border--animated">
<span class="empty-state__cta-inner glass-inner">Create Event</span>
</RouterLink>
</div>
</template>
@@ -27,5 +29,34 @@ import { RouterLink } from 'vue-router'
.empty-state__cta {
max-width: 280px;
width: 100%;
border-radius: var(--radius-button);
text-decoration: none;
transition: transform 0.1s ease;
}
.empty-state__cta-inner {
display: block;
width: 100%;
padding: var(--spacing-md) var(--spacing-lg);
border-radius: calc(var(--radius-button) - 2px);
font-family: inherit;
font-size: 1rem;
font-weight: 700;
color: #fff;
text-align: center;
}
.empty-state__cta:hover {
transform: scale(1.02);
}
.empty-state__cta:active {
transform: scale(0.98);
}
.empty-state__cta:focus-visible {
outline: 2px solid #fff;
outline-offset: 3px;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div
class="event-card"
class="event-card glass"
:class="{ 'event-card--past': isPast, 'event-card--swiping': isSwiping }"
:style="swipeStyle"
@touchstart="onTouchStart"
@@ -93,22 +93,12 @@ function onTouchEnd() {
.event-card {
display: flex;
align-items: center;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
border: 1px solid var(--color-glass-border);
border-radius: var(--radius-card);
box-shadow: var(--shadow-card);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
padding: var(--spacing-md) var(--spacing-lg);
gap: var(--spacing-sm);
transition: background 0.2s ease, border-color 0.2s ease;
}
.event-card:hover {
background: var(--color-glass-hover);
border-color: rgba(255, 255, 255, 0.3);
}
.event-card--past {
opacity: 0.6;
filter: saturate(0.5);
@@ -140,7 +130,7 @@ function onTouchEnd() {
.event-card__time {
font-size: 0.8rem;
font-weight: 400;
color: rgba(255, 255, 255, 0.7);
color: var(--color-text-secondary);
}
.event-card__badge {
@@ -158,8 +148,8 @@ function onTouchEnd() {
}
.event-card__badge--attendee {
background: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.9);
background: var(--color-glass-strong);
color: var(--color-text-bright);
}
.event-card__delete {
@@ -172,7 +162,7 @@ function onTouchEnd() {
background: none;
border: none;
font-size: 1.2rem;
color: rgba(255, 255, 255, 0.5);
color: var(--color-text-muted);
cursor: pointer;
border-radius: 50%;
transition: color 0.15s ease, background 0.15s ease;