Files
Dash/frontend/app/globals.css
T
Tomas Dvorak 9e7acc868d refactor(frontend): simplify theme system and unify UI components
Remove the "casaos" theme in favor of a unified design system. This involves cleaning up conditional styling across components, simplifying the theme toggle, and updating the global CSS variables to a more consistent dark/light mode implementation.

- Remove `casaos` theme from `themes.ts` and `ThemeToggle`
- Refactor `globals.css` to use a single dark mode definition
- Simplify component styling by removing `isCasaOS` conditional logic
- Update UI components (`Card`, `Badge`, `WidgetCard`, etc.) to use standard design tokens
- Update E2E smoke tests to reflect theme changes
2026-05-04 18:32:35 +02:00

195 lines
4.5 KiB
CSS

@import "tailwindcss";
@custom-variant dark (&:where([data-theme="dark"]));
/* ── Light (Vercel-inspired) ── */
:root,
[data-theme="light"] {
--color-background: #ffffff;
--color-foreground: #171717;
--color-card: #ffffff;
--color-card-foreground: #171717;
--color-popover: #ffffff;
--color-popover-foreground: #171717;
--color-primary: #171717;
--color-primary-foreground: #ffffff;
--color-secondary: #f5f5f5;
--color-secondary-foreground: #171717;
--color-muted: #f5f5f5;
--color-muted-foreground: #737373;
--color-accent: #f5f5f5;
--color-accent-foreground: #171717;
--color-destructive: #ef4444;
--color-destructive-foreground: #ffffff;
--color-border: #e5e5e5;
--color-ring: #0072f5;
--color-signal: #ff5b4f;
--color-input: #e5e5e5;
--color-overlay: #f5f5f5;
--radius: 0.5rem;
--font-geist-sans: "Geist", "Arial", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
--font-geist-mono: "Geist Mono", "ui-monospace", "SFMono-Regular", "Roboto Mono", monospace;
}
/* ── Dark (Rich warm dark — not pure black) ── */
[data-theme="dark"] {
--color-background: #0d0d0d;
--color-foreground: #ececec;
--color-card: #141414;
--color-card-foreground: #ececec;
--color-popover: #1a1a1a;
--color-popover-foreground: #ececec;
--color-primary: #ececec;
--color-primary-foreground: #0d0d0d;
--color-secondary: #1a1a1a;
--color-secondary-foreground: #ececec;
--color-muted: #1a1a1a;
--color-muted-foreground: #888888;
--color-accent: #1a1a1a;
--color-accent-foreground: #ececec;
--color-destructive: #f43f5e;
--color-destructive-foreground: #ececec;
--color-border: #262626;
--color-ring: #3b82f6;
--color-signal: #f43f5e;
--color-input: #262626;
--color-overlay: #050505;
}
/* ── Base ── */
* {
border-color: var(--color-border);
}
body {
background: var(--color-background);
color: var(--color-foreground);
font-family: var(--font-geist-sans);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* ── Focus ring ── */
:focus-visible {
outline: 2px solid var(--color-ring);
outline-offset: 2px;
}
/* ── Scrollbar ── */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--color-muted-foreground);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-foreground);
}
/* ── Selection ── */
::selection {
background: var(--color-accent);
color: var(--color-accent-foreground);
}
/* ── Shadow-as-border utility ── */
.shadow-border {
box-shadow: 0px 0px 0px 1px var(--color-border);
}
.shadow-border-card {
box-shadow:
0px 0px 0px 1px var(--color-border),
0px 2px 4px rgba(0, 0, 0, 0.04),
0px 8px 8px -8px rgba(0, 0, 0, 0.04);
}
.shadow-border-hover {
box-shadow:
0px 0px 0px 1px var(--color-border),
0px 4px 8px rgba(0, 0, 0, 0.08),
0px 8px 16px -4px rgba(0, 0, 0, 0.08);
}
/* ── Service card hover (all themes) ── */
.service-card {
transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.service-card:hover {
transform: translateY(-2px);
}
/* ── Drag overlay ── */
.drag-overlay {
opacity: 0.95;
transform: scale(1.03);
box-shadow:
0px 0px 0px 2px var(--color-ring),
0px 12px 32px rgba(0, 0, 0, 0.25);
z-index: 50;
}
/* ── Drop indicator ── */
.drop-indicator {
position: relative;
}
.drop-indicator::before {
content: "";
position: absolute;
inset: -4px;
border-radius: inherit;
border: 2px dashed var(--color-ring);
opacity: 0.5;
pointer-events: none;
}
/* ── Drop target line ── */
.drop-target-line {
height: 3px;
border-radius: 2px;
background: var(--color-ring);
box-shadow: 0 0 8px var(--color-ring);
margin: 4px 0;
animation: pulse-line 1.2s ease-in-out infinite;
}
@keyframes pulse-line {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
/* ── Dialog / Modal backdrop ── */
[data-state="open"] > [data-radix-dialog-overlay] {
background: rgba(0, 0, 0, 0.6) !important;
}
/* ── Dialog content surface ── */
.dialog-surface {
background: var(--color-popover);
border: 1px solid var(--color-border);
box-shadow:
0px 0px 0px 1px var(--color-border),
0px 8px 32px rgba(0, 0, 0, 0.35);
}
/* ── Colorful badge variants ── */
.badge-local {
background: #0f291e;
color: #34d399;
}
.badge-external {
background: #162038;
color: #60a5fa;
}
.badge-custom {
background: #231a38;
color: #a78bfa;
}