Files
ProjectE/apps/web/src/index.css
T

132 lines
4.6 KiB
CSS
Raw Normal View History

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
/* Typography — Inter via Google Fonts @import above; falls back to system-ui */
--font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
/* Density — scales content spacing (see the density utilities below and the
calc() padding on <main> in the app layout). 1 = comfortable. */
--density-scale: 1;
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
2026-08-01 02:00:24 +00:00
--accent-hsl: 217 91% 60%;
}
/* Density modes: toggled on <html> by the settings page (and applied from
localStorage on app load). They only flip --density-scale, which the
layout padding and the space-y utilities below multiply by. */
.density-compact {
--density-scale: 0.85;
}
.density-spacious {
--density-scale: 1.15;
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
2026-08-01 02:00:24 +00:00
--accent-hsl: 217 91% 60%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
font-family: var(--font-sans);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
}
/* Real reduced-motion support: the settings page toggles `.reduce-motion` on
<html>. This standard override collapses animation/transition durations so
users who enable it get an effectively static UI. */
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
animation-duration: 0.001s !important;
transition-duration: 0.001s !important;
animation-iteration-count: 1 !important;
}
@layer utilities {
/* Density: multiply the vertical rhythm between stacked sections inside page
content. Mirrors Tailwind's own `.space-y-*` selector shape and is scoped
to <main> so the sidebar and topbar stay fixed. Combined with the calc()
padding on <main> in the app layout, the Density setting now visibly
changes spacing (0.85x compact, 1.15x spacious). */
.density-compact main .space-y-1 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-1 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(0.25rem * var(--density-scale));
}
.density-compact main .space-y-2 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-2 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(0.5rem * var(--density-scale));
}
.density-compact main .space-y-3 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-3 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(0.75rem * var(--density-scale));
}
.density-compact main .space-y-4 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-4 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(1rem * var(--density-scale));
}
.density-compact main .space-y-5 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-5 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(1.25rem * var(--density-scale));
}
.density-compact main .space-y-6 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-6 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(1.5rem * var(--density-scale));
}
.density-compact main .space-y-8 > :not([hidden]) ~ :not([hidden]),
.density-spacious main .space-y-8 > :not([hidden]) ~ :not([hidden]) {
margin-top: calc(2rem * var(--density-scale));
}
}