Download frontend/src/index.css from jqub21/quaim: direct link, hf CLI and curl.
- Browser
- Download file 10.4 kB
-
https://huggingface.co/spaces/jqub21/quaim/resolve/8311ef0480c4e9dd94de89120b420e1957f31fc9/frontend/src/index.css
- Command line
-
hf download hf://spaces/jqub21/quaim@8311ef0480c4e9dd94de89120b420e1957f31fc9/frontend/src/index.css
-
curl -L -o index.css https://huggingface.co/spaces/jqub21/quaim/resolve/8311ef0480c4e9dd94de89120b420e1957f31fc9/frontend/src/index.css
10.4 kB
| @tailwind base; | |
| @tailwind components; | |
| @tailwind utilities; | |
| /* ============================================================ | |
| * Theme tokens | |
| * | |
| * Default is "light" — CSS variables on `:root` are the light palette, | |
| * so the app renders correctly even before any JS runs (no flash of | |
| * unthemed content on first paint, SSR-safe, accessibility-friendly). | |
| * data-theme="dark" : original navy + cyan palette | |
| * | |
| * Values are `R G B` triplets so Tailwind's `/ <alpha-value>` syntax | |
| * works uniformly: `bg-canvas/80` → rgb(var(--color-canvas) / 0.8). | |
| * ============================================================ */ | |
| @layer base { | |
| :root { | |
| color-scheme: light; | |
| /* LIGHT (default) — white background with soft accents */ | |
| --color-canvas: 246 247 251; | |
| --color-surface: 255 255 255; | |
| --color-surfaceAlt: 240 243 249; | |
| --color-edge: 216 222 232; | |
| --color-mute: 100 116 139; | |
| --color-ink: 15 23 42; | |
| --color-accent: 2 132 199; | |
| --color-accent2: 124 58 237; | |
| --color-accent3: 219 39 119; | |
| --color-accent4: 5 150 105; | |
| --color-warn: 217 119 6; | |
| --color-danger: 220 38 38; | |
| --color-ok: 5 150 105; | |
| --body-bg: | |
| radial-gradient(1200px 600px at 80% -10%, rgb(124 58 237 / 0.08), transparent 70%), | |
| radial-gradient(1000px 500px at 0% 110%, rgb(2 132 199 / 0.08), transparent 70%), | |
| rgb(var(--color-canvas)); | |
| --scrollbar-thumb: rgb(var(--color-edge)); | |
| --rf-edge-stroke: 148 163 184; /* slate-400 */ | |
| --rf-edge-selected: var(--color-accent); | |
| } | |
| [data-theme="dark"] { | |
| color-scheme: dark; | |
| --color-canvas: 11 16 32; | |
| --color-surface: 17 24 48; | |
| --color-surfaceAlt: 21 29 56; | |
| --color-edge: 31 42 74; | |
| --color-mute: 132 146 199; | |
| --color-ink: 230 235 255; | |
| --color-accent: 76 201 240; | |
| --color-accent2: 123 92 255; | |
| --color-accent3: 247 37 133; | |
| --color-accent4: 6 214 160; | |
| --color-warn: 244 162 97; | |
| --color-danger: 239 71 111; | |
| --color-ok: 45 212 191; | |
| --body-bg: | |
| radial-gradient(1200px 600px at 80% -10%, rgb(123 92 255 / 0.12), transparent 70%), | |
| radial-gradient(1000px 500px at 0% 110%, rgb(76 201 240 / 0.10), transparent 70%), | |
| rgb(var(--color-canvas)); | |
| --scrollbar-thumb: rgb(var(--color-edge)); | |
| --rf-edge-stroke: 74 90 138; /* #4a5a8a */ | |
| --rf-edge-selected: var(--color-accent); | |
| } | |
| html, body, #root { | |
| height: 100%; | |
| } | |
| body { | |
| background: var(--body-bg); | |
| } | |
| *::-webkit-scrollbar { | |
| width: 10px; | |
| height: 10px; | |
| } | |
| *::-webkit-scrollbar-thumb { | |
| background: var(--scrollbar-thumb); | |
| border-radius: 5px; | |
| } | |
| *::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| } | |
| /* ============================================================ | |
| * UI conventions (typography / spacing / numbers) — audit 2026-07 | |
| * | |
| * Type scale (floor is 9px — nothing smaller anywhere): | |
| * text-[9px] micro-annotations only: legend lines, strip labels, | |
| * role suffixes ("plugin", "divergence point"). | |
| * text-[10px] dense metadata rows, section labels, chip-adjacent | |
| * stats inside cards/boards. | |
| * text-[11px] body copy of dense panels (hints, tooltips, captions). | |
| * text-xs(12) tab labels, toolbar copy, pane headers' metadata. | |
| * text-sm(14) primary copy, card titles, buttons. | |
| * | |
| * Labels: section labels are `text-[10px] uppercase tracking-wider | |
| * text-mute`; `tracking-widest` is reserved for the palette/picker | |
| * family badges. Kickers (tour, hints) are `text-xs uppercase | |
| * tracking-wider text-mute`. | |
| * | |
| * Chips: the .chip component (px-2 py-0.5, rounded-full) is the | |
| * default. Deliberate exceptions: micro-chips inside 28px history | |
| * rows (px-1, rounded) and count badges inside tabs (!px-1 !py-0). | |
| * | |
| * Numbers: all values that update or align vertically render in | |
| * font-mono or tabular-nums. Percent/pp decimals — headline metric | |
| * values and mono detail lines: 2dp; compact strips, chips, board | |
| * stats and legends: 1dp; precision targets are whole pp (±2pp). | |
| * Units are stated at the value, not in the label. | |
| * ============================================================ */ | |
| @layer components { | |
| .panel { | |
| @apply bg-surface border border-edge rounded-xl shadow-card; | |
| } | |
| .panel-alt { | |
| @apply bg-surfaceAlt border border-edge rounded-xl shadow-card; | |
| } | |
| .chip { | |
| @apply inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full border border-edge bg-surfaceAlt text-mute; | |
| } | |
| /* All four button variants carry `whitespace-nowrap` so their labels | |
| (e.g. "Auto-connect", "Load preset", "Run pipeline") never wrap onto | |
| a second line when a sibling element — typically a long status | |
| message in the toolbar — squeezes the button container. If the | |
| surrounding layout runs out of horizontal room, the button keeps | |
| its single-line label and it is the label's `hidden sm:inline` wrap | |
| in the component that drops the text to icon-only instead. */ | |
| .btn { | |
| @apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-edge bg-surfaceAlt text-ink hover:border-accent/60 hover:text-accent transition-colors text-sm whitespace-nowrap; | |
| } | |
| .btn-primary { | |
| @apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg font-medium text-sm whitespace-nowrap | |
| bg-gradient-to-r from-accent/90 to-accent2/90 text-canvas shadow-glow | |
| hover:from-accent hover:to-accent2 transition; | |
| } | |
| /* Secondary filled button. Tinted accent2 background so it reads as a | |
| discoverable action next to the subtle outline `btn`, but is clearly | |
| not the primary `btn-primary` (which owns the Run-pipeline gradient). */ | |
| .btn-secondary { | |
| @apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium whitespace-nowrap | |
| bg-accent2/15 border border-accent2/50 text-accent2 | |
| hover:bg-accent2/25 hover:border-accent2 transition-colors; | |
| } | |
| .btn-ghost { | |
| @apply inline-flex items-center gap-2 px-2 py-1 rounded-md text-xs text-mute hover:text-ink hover:bg-surfaceAlt transition-colors whitespace-nowrap; | |
| } | |
| .node-card { | |
| @apply panel-alt px-3 py-2 min-w-[180px] text-sm; | |
| } | |
| .kbd { | |
| @apply px-1.5 py-0.5 rounded border border-edge bg-surface text-[11px] font-mono text-mute; | |
| } | |
| } | |
| /* React Flow overrides — read from theme variables so colors travel with | |
| the active theme. Hex values used to be hard-coded here. */ | |
| .react-flow__background { | |
| background-color: transparent; | |
| } | |
| .react-flow__pane { | |
| cursor: default; | |
| } | |
| .react-flow__edge-path { | |
| stroke: rgb(var(--rf-edge-stroke)); | |
| stroke-width: 1.5; | |
| } | |
| .react-flow__edge.selected .react-flow__edge-path { | |
| stroke: rgb(var(--color-accent)); | |
| } | |
| .react-flow__arrowhead { | |
| fill: rgb(var(--rf-edge-stroke)); | |
| } | |
| .react-flow__handle { | |
| background: rgb(var(--color-accent)); | |
| border: 2px solid rgb(var(--color-canvas)); | |
| width: 10px; | |
| height: 10px; | |
| } | |
| .react-flow__controls { | |
| background: rgb(var(--color-surfaceAlt)); | |
| border: 1px solid rgb(var(--color-edge)); | |
| border-radius: 8px; | |
| overflow: hidden; | |
| } | |
| .react-flow__controls-button { | |
| background: transparent ; | |
| color: rgb(var(--color-mute)) ; | |
| border-bottom: 1px solid rgb(var(--color-edge)) ; | |
| } | |
| .react-flow__controls-button:hover { | |
| background: rgb(var(--color-edge)) ; | |
| color: rgb(var(--color-ink)) ; | |
| } | |
| .react-flow__minimap { | |
| background: rgb(var(--color-surfaceAlt)) ; | |
| border: 1px solid rgb(var(--color-edge)) ; | |
| border-radius: 8px ; | |
| } | |
| .react-flow__attribution { | |
| background: transparent ; | |
| color: rgb(var(--rf-edge-stroke)) ; | |
| font-size: 10px ; | |
| } | |
| /* ----- Touch + viewport polish --------------------------------------- | |
| * | |
| * touch-action: none on the React Flow canvas wrapper hands all touch | |
| * gestures (pan, pinch, two-finger drag) to React Flow's own handler. | |
| * Without this, iOS Safari intercepts two-finger pinches as page zoom | |
| * BEFORE React Flow ever sees the event, breaking canvas pinch-zoom. | |
| * | |
| * The inner React Flow elements re-enable touch as needed via their | |
| * own handlers; this only affects the wrapper's default routing. | |
| */ | |
| .qf-canvas-wrapper { | |
| touch-action: none; | |
| } | |
| /* iOS magnifier / "callout" suppression for elements that participate | |
| * in our custom touch drag (palette tiles, draggable nodes). Without | |
| * this, a long press on a tile triggers the system text magnifier | |
| * and steals the gesture from our PointerEvent handler. */ | |
| .qf-no-callout { | |
| -webkit-user-select: none; | |
| user-select: none; | |
| -webkit-touch-callout: none; | |
| } | |
| /* Slightly bigger zoom / fit / pan buttons on the React Flow Controls, | |
| * matching the 44 CSS-px Material/iOS hit target on touch breakpoints. | |
| * Desktop keeps the compact 26px sizing. */ | |
| @media (pointer: coarse) { | |
| .react-flow__controls-button { | |
| width: 44px ; | |
| height: 44px ; | |
| } | |
| } | |
| /* Restore/replay acknowledgment: FlowCanvas adds .restore-pulse to every | |
| node it just rebuilt from an archived run (or a scenario boot) and | |
| removes it ~1.4s later. One accent ring swelling out and fading — long | |
| enough to catch peripheral vision, short enough not to nag. Radius | |
| matches .panel-alt's rounded-xl so the ring hugs the node card. The | |
| global prefers-reduced-motion rule below collapses the animation. */ | |
| .react-flow__node.restore-pulse { | |
| border-radius: 0.75rem; | |
| animation: restore-pulse 1.2s ease-out 1; | |
| } | |
| @keyframes restore-pulse { | |
| 0% { | |
| box-shadow: 0 0 0 0 rgb(var(--color-accent) / 0.85); | |
| } | |
| 70% { | |
| box-shadow: 0 0 0 7px rgb(var(--color-accent) / 0.3); | |
| } | |
| 100% { | |
| box-shadow: 0 0 0 11px rgb(var(--color-accent) / 0); | |
| } | |
| } | |
| /* ----- prefers-reduced-motion ---------------------------------------- | |
| * Honor the OS-level "reduce motion" setting. Without this rule the | |
| * default React Flow `animated` edges loop a stroke-dash forever, and | |
| * the various spinners / pulse loaders run regardless of user | |
| * preference. We keep transitions essentially instant so the UI is | |
| * still responsive but without continuous motion. */ | |
| @media (prefers-reduced-motion: reduce) { | |
| *, | |
| *::before, | |
| *::after { | |
| animation-duration: 0.01ms ; | |
| animation-iteration-count: 1 ; | |
| transition-duration: 0.01ms ; | |
| scroll-behavior: auto ; | |
| } | |
| .react-flow__edge-path { | |
| stroke-dasharray: none ; | |
| animation: none ; | |
| } | |
| } | |