Files
Stalwart-webui/src/index.css
T

300 lines
8.8 KiB
CSS

/*
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <hello@stalw.art>
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
*/
@import 'tailwindcss';
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0.017 285.823);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0.017 285.823);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0.017 285.823);
--content-background: oklch(0.97 0.003 285.823);
--primary: oklch(0.205 0.017 285.823);
--primary-foreground: oklch(0.985 0.002 285.823);
--secondary: oklch(0.965 0.005 285.823);
--secondary-foreground: oklch(0.205 0.017 285.823);
--muted: oklch(0.93 0.005 285.823);
--muted-foreground: oklch(0.556 0.015 285.823);
--accent: oklch(0.965 0.005 285.823);
--accent-foreground: oklch(0.205 0.017 285.823);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(0.985 0.002 285.823);
--border: oklch(0.922 0.007 285.823);
--input: oklch(0.922 0.007 285.823);
--ring: oklch(0.708 0.015 285.823);
/* Form fields use the page background tone so cards read as elevated
surfaces (shadcn convention: inset fields on a raised card). */
--field: var(--background);
--radius: 0.5rem;
--chart-1: 220 70% 50%;
--chart-2: 160 60% 45%;
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
}
.dark {
--background: oklch(0.141 0.005 285.823);
--foreground: oklch(0.985 0.002 285.823);
--card: oklch(0.235 0.008 285.823);
--card-foreground: oklch(0.985 0.002 285.823);
--popover: oklch(0.205 0.007 285.823);
--popover-foreground: oklch(0.985 0.002 285.823);
--content-background: oklch(0.115 0.005 285.823);
--primary: oklch(0.985 0.002 285.823);
--primary-foreground: oklch(0.205 0.017 285.823);
--secondary: oklch(0.274 0.009 285.823);
--secondary-foreground: oklch(0.985 0.002 285.823);
--muted: oklch(0.274 0.009 285.823);
--muted-foreground: oklch(0.708 0.015 285.823);
--accent: oklch(0.274 0.009 285.823);
--accent-foreground: oklch(0.985 0.002 285.823);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(0.985 0.002 285.823);
--border: oklch(0.274 0.009 285.823);
--input: oklch(0.274 0.009 285.823);
--ring: oklch(0.553 0.013 285.823);
--field: var(--background);
--chart-1: 220 70% 60%;
--chart-2: 160 60% 55%;
--chart-3: 30 80% 60%;
--chart-4: 280 65% 65%;
--chart-5: 340 75% 60%;
}
/* Square mode: every radius token derives multiplicatively from --radius,
so zeroing it here flattens all corners (rounded-full stays untouched). */
:root[data-radius='square'] {
--radius: 0px;
}
/* Color themes. Each theme re-hues the neutral tokens at the same lightness
and chroma as the default palette (contrast is preserved) and replaces
primary/ring with the theme color. The default "Stalwart" theme is the
bare :root/.dark above and needs no data-theme attribute. Dark theme
blocks must stay after their light counterpart: both selectors have the
same specificity, so source order decides. */
:root[data-theme='ocean'] {
--foreground: oklch(0.145 0.02 264);
--content-background: oklch(0.965 0.008 264);
--primary: oklch(0.546 0.215 262.9);
--primary-foreground: oklch(0.985 0.002 264);
--secondary: oklch(0.955 0.012 264);
--secondary-foreground: oklch(0.3 0.035 264);
--muted: oklch(0.935 0.01 264);
--muted-foreground: oklch(0.556 0.022 264);
--accent: oklch(0.94 0.018 264);
--accent-foreground: oklch(0.3 0.035 264);
--border: oklch(0.912 0.012 264);
--input: oklch(0.912 0.012 264);
--ring: oklch(0.546 0.215 262.9);
--chart-1: 221 83% 53%;
}
.dark[data-theme='ocean'] {
--background: oklch(0.152 0.014 264);
--foreground: oklch(0.96 0.008 264);
--card: oklch(0.235 0.02 264);
--card-foreground: oklch(0.96 0.008 264);
--popover: oklch(0.208 0.018 264);
--popover-foreground: oklch(0.96 0.008 264);
--content-background: oklch(0.122 0.012 264);
--primary: oklch(0.623 0.214 259.8);
--primary-foreground: oklch(0.985 0.002 264);
--secondary: oklch(0.28 0.022 264);
--secondary-foreground: oklch(0.96 0.008 264);
--muted: oklch(0.28 0.022 264);
--muted-foreground: oklch(0.715 0.022 264);
--accent: oklch(0.305 0.028 264);
--accent-foreground: oklch(0.96 0.008 264);
--border: oklch(0.29 0.024 264);
--input: oklch(0.29 0.024 264);
--ring: oklch(0.623 0.214 259.8);
--chart-1: 217 91% 60%;
}
:root[data-theme='forest'] {
--foreground: oklch(0.145 0.02 150);
--content-background: oklch(0.965 0.008 150);
--primary: oklch(0.527 0.137 150.1);
--primary-foreground: oklch(0.985 0.004 150);
--secondary: oklch(0.955 0.012 150);
--secondary-foreground: oklch(0.3 0.035 150);
--muted: oklch(0.935 0.01 150);
--muted-foreground: oklch(0.556 0.022 150);
--accent: oklch(0.94 0.018 150);
--accent-foreground: oklch(0.3 0.035 150);
--border: oklch(0.912 0.012 150);
--input: oklch(0.912 0.012 150);
--ring: oklch(0.527 0.137 150.1);
--chart-1: 142 71% 45%;
}
.dark[data-theme='forest'] {
--background: oklch(0.152 0.012 150);
--foreground: oklch(0.96 0.008 150);
--card: oklch(0.235 0.018 150);
--card-foreground: oklch(0.96 0.008 150);
--popover: oklch(0.208 0.016 150);
--popover-foreground: oklch(0.96 0.008 150);
--content-background: oklch(0.122 0.01 150);
--primary: oklch(0.723 0.219 149.6);
--primary-foreground: oklch(0.2 0.03 150);
--secondary: oklch(0.28 0.02 150);
--secondary-foreground: oklch(0.96 0.008 150);
--muted: oklch(0.28 0.02 150);
--muted-foreground: oklch(0.715 0.02 150);
--accent: oklch(0.305 0.024 150);
--accent-foreground: oklch(0.96 0.008 150);
--border: oklch(0.29 0.022 150);
--input: oklch(0.29 0.022 150);
--ring: oklch(0.723 0.219 149.6);
--chart-1: 142 69% 58%;
}
:root[data-theme='violet'] {
--foreground: oklch(0.145 0.02 290);
--content-background: oklch(0.965 0.008 290);
--primary: oklch(0.541 0.281 293);
--primary-foreground: oklch(0.985 0.002 290);
--secondary: oklch(0.955 0.012 290);
--secondary-foreground: oklch(0.3 0.04 290);
--muted: oklch(0.935 0.01 290);
--muted-foreground: oklch(0.556 0.025 290);
--accent: oklch(0.94 0.02 290);
--accent-foreground: oklch(0.3 0.04 290);
--border: oklch(0.912 0.014 290);
--input: oklch(0.912 0.014 290);
--ring: oklch(0.541 0.281 293);
--chart-1: 262 83% 58%;
}
.dark[data-theme='violet'] {
--background: oklch(0.152 0.014 290);
--foreground: oklch(0.96 0.008 290);
--card: oklch(0.235 0.02 290);
--card-foreground: oklch(0.96 0.008 290);
--popover: oklch(0.208 0.018 290);
--popover-foreground: oklch(0.96 0.008 290);
--content-background: oklch(0.122 0.012 290);
--primary: oklch(0.702 0.183 293.5);
--primary-foreground: oklch(0.21 0.03 293);
--secondary: oklch(0.28 0.024 290);
--secondary-foreground: oklch(0.96 0.008 290);
--muted: oklch(0.28 0.024 290);
--muted-foreground: oklch(0.715 0.024 290);
--accent: oklch(0.305 0.03 290);
--accent-foreground: oklch(0.96 0.008 290);
--border: oklch(0.29 0.026 290);
--input: oklch(0.29 0.026 290);
--ring: oklch(0.702 0.183 293.5);
--chart-1: 263 70% 66%;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-content-background: var(--content-background);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--color-field: var(--field);
--color-chart-1: hsl(var(--chart-1));
--color-chart-2: hsl(var(--chart-2));
--color-chart-3: hsl(var(--chart-3));
--color-chart-4: hsl(var(--chart-4));
--color-chart-5: hsl(var(--chart-5));
--radius-sm: calc(var(--radius) * 0.5);
--radius-md: calc(var(--radius) * 0.75);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) * 1.5);
--animate-collapsible-down: collapsible-down 0.2s ease-out;
--animate-collapsible-up: collapsible-up 0.2s ease-out;
@keyframes collapsible-down {
from {
height: 0;
}
to {
height: var(--radix-collapsible-content-height);
}
}
@keyframes collapsible-up {
from {
height: var(--radix-collapsible-content-height);
}
to {
height: 0;
}
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
.dark input[type='number'] {
color-scheme: dark;
}