mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
styles/tokens.css was a 494-line FORK of @luxfi/ui/tokens.css, which is how it drifted its own browns: --color-status-warn #B45309 / #FBBF7A and the whole Chakra orange + yellow badge ramp (#FEEBCB #FFFAF0 #DD6B20 #FFFFF0 #D69E2E #FEFCBF #B7791F #C05621 #7B341E #744210 #FAF089). It imports the umbrella now and adds nothing of its own. next.config.js hand-listed SEVEN of the engine's 55 packages in transpilePackages and deduped none of them, which is how this app's store holds seven physical copies of @hanzogui/popper (3.0.0, 3.0.1, 3.0.2 x3, 7.3.0 x2). A context published at module scope is per-copy, so PopperAnchor read the empty default and called refs.setReference on undefined once per tooltip trigger. It uses withLuxUi now — the one place that wiring lives. 47 files reached for Tailwind's chromatic ramps directly (108 occurrences). They resolve through tokens now, under short semantic names registered in the @theme block: text-good / text-bad / text-warn, where warn is ACHROMATIC — attention in Lux is the loudest neutral, not a hue. The Quasar certificate tooltip stops naming colours it no longer paints ("BLS (green)", "Corona (blue)", "ML-DSA (purple)") — copy that describes a palette has to change with it. Measured on the rendered pages: warm 0%, tinted-neutral 0.0003%, mean chroma 0.004 (/) and 0.003 (/txs) at 1440x900, 0.000 at 390x844, both modes; zero uncaught setReference errors. Two pre-existing defects surfaced because lint-staged now lints these files and are fixed here rather than skipped: `Box` was used but never imported in AddressEntity.pw.tsx, and eight lines already exceeded the 160-column limit. Co-authored-by: Hanzo Dev <[email protected]>
281 lines
12 KiB
CSS
281 lines
12 KiB
CSS
@import "tailwindcss" layer(tailwind);
|
|
@import "../styles/tokens.css";
|
|
|
|
@plugin "tailwindcss-animate";
|
|
|
|
/*
|
|
* Scan the @luxfi/ui component library for Tailwind classes.
|
|
*
|
|
* @luxfi/ui ships pre-built components whose className strings use arbitrary
|
|
* Tailwind utilities that resolve design tokens — e.g. the popover / menu /
|
|
* drawer surfaces are styled with bg-[var(--color-popover-bg)],
|
|
* bg-[var(--color-drawer-bg)], shadow-[var(--shadow-popover)] and
|
|
* border-[var(--color-popover-border)]. Tailwind v4 does not scan node_modules
|
|
* by default, so without this @source those utilities are purged and every
|
|
* floating panel (Sign-in popover, Blockchain menu, chain/network selectors,
|
|
* mobile nav drawer) renders with a transparent background — the page bleeds
|
|
* through and the content is unreadable. Sourcing the package makes Tailwind
|
|
* emit the utilities so the panels get their solid token-driven backgrounds.
|
|
*/
|
|
@source "../node_modules/@luxfi/ui";
|
|
|
|
/*
|
|
* Tailwind v4 theme configuration
|
|
*
|
|
* Breakpoints match Chakra: sm=415px, lg=1000px, xl=1440px, 2xl=1920px
|
|
* Dark mode via .dark class (next-themes "class" strategy)
|
|
* Font families: Geist (body/heading), Geist Mono (mono)
|
|
*/
|
|
@theme {
|
|
/* --- Breakpoints --- */
|
|
--breakpoint-sm: 415px;
|
|
--breakpoint-lg: 1000px;
|
|
--breakpoint-xl: 1440px;
|
|
--breakpoint-2xl: 1920px;
|
|
|
|
/* --- Font Families --- */
|
|
--font-sans: "Geist", sans-serif;
|
|
--font-heading: "Geist", sans-serif;
|
|
--font-mono: "Geist Mono", monospace;
|
|
|
|
/* --- State. The only two hues Lux keeps, plus the achromatic warn.
|
|
Registered here so a call site can say `text-good` instead of
|
|
`text-[var(--color-status-good)]`, which is the same token and
|
|
shorter than the `text-green-500` it replaced. --- */
|
|
--color-good: var(--color-status-good);
|
|
--color-bad: var(--color-status-bad);
|
|
--color-warn: var(--color-status-warn);
|
|
|
|
/* --- Colors (mapped from CSS custom properties) --- */
|
|
--color-bg-primary: var(--color-bg-primary);
|
|
--color-bg-info: var(--color-bg-info);
|
|
--color-bg-body: var(--color-bg-body);
|
|
|
|
--color-fg-info: var(--color-fg-info);
|
|
|
|
--color-text-primary: var(--color-text-primary);
|
|
--color-text-secondary: var(--color-text-secondary);
|
|
--color-text-error: var(--color-text-error);
|
|
--color-text-success: var(--color-text-success);
|
|
|
|
--color-heading: var(--color-heading);
|
|
|
|
--color-icon-primary: var(--color-icon-primary);
|
|
--color-icon-secondary: var(--color-icon-secondary);
|
|
|
|
--color-border-divider: var(--color-border-divider);
|
|
--color-border-error: var(--color-border-error);
|
|
--color-border-info: var(--color-border-info);
|
|
|
|
--color-link-primary: var(--color-link-primary);
|
|
--color-link-primary-hover: var(--color-link-primary-hover);
|
|
--color-link-secondary: var(--color-link-secondary);
|
|
|
|
--color-hover: var(--color-hover);
|
|
--color-selected-control-bg: var(--color-selected-control-bg);
|
|
--color-selected-control-text: var(--color-selected-control-text);
|
|
--color-selected-option-bg: var(--color-selected-option-bg);
|
|
|
|
--color-button-solid-bg: var(--color-button-solid-bg);
|
|
--color-button-solid-text: var(--color-button-solid-text);
|
|
--color-button-outline-fg: var(--color-button-outline-fg);
|
|
--color-button-subtle-fg: var(--color-button-subtle-fg);
|
|
--color-button-subtle-bg: var(--color-button-subtle-bg);
|
|
--color-button-dropdown-fg: var(--color-button-dropdown-fg);
|
|
--color-button-dropdown-border: var(--color-button-dropdown-border);
|
|
--color-button-header-fg: var(--color-button-header-fg);
|
|
--color-button-header-fg-selected: var(--color-button-header-fg-selected);
|
|
--color-button-header-fg-highlighted: var(--color-button-header-fg-highlighted);
|
|
--color-button-header-border: var(--color-button-header-border);
|
|
--color-button-header-bg-selected: var(--color-button-header-bg-selected);
|
|
--color-button-header-bg-highlighted: var(--color-button-header-bg-highlighted);
|
|
--color-button-pagination-fg: var(--color-button-pagination-fg);
|
|
--color-button-pagination-border: var(--color-button-pagination-border);
|
|
--color-button-hero-bg: var(--color-button-hero-bg);
|
|
--color-button-hero-fg: var(--color-button-hero-fg);
|
|
--color-button-hero-bg-hover: var(--color-button-hero-bg-hover);
|
|
--color-button-hero-fg-hover: var(--color-button-hero-fg-hover);
|
|
--color-button-hero-bg-selected: var(--color-button-hero-bg-selected);
|
|
--color-button-hero-fg-selected: var(--color-button-hero-fg-selected);
|
|
--color-button-segmented-fg: var(--color-button-segmented-fg);
|
|
--color-button-icon-bg: var(--color-button-icon-bg);
|
|
--color-button-icon-background-bg: var(--color-button-icon-background-bg);
|
|
|
|
--color-nav-bg-selected: var(--color-nav-bg-selected);
|
|
--color-nav-text-selected: var(--color-nav-text-selected);
|
|
|
|
--color-input-fg: var(--color-input-fg);
|
|
--color-input-bg: var(--color-input-bg);
|
|
--color-input-border: var(--color-input-border);
|
|
--color-input-border-hover: var(--color-input-border-hover);
|
|
--color-input-placeholder: var(--color-input-placeholder);
|
|
|
|
--color-dialog-bg: var(--color-dialog-bg);
|
|
--color-dialog-fg: var(--color-dialog-fg);
|
|
--color-popover-bg: var(--color-popover-bg);
|
|
--color-drawer-bg: var(--color-drawer-bg);
|
|
|
|
--color-tooltip-bg: var(--color-tooltip-bg);
|
|
--color-tooltip-fg: var(--color-tooltip-fg);
|
|
|
|
--color-table-header-bg: var(--color-table-header-bg);
|
|
--color-table-header-fg: var(--color-table-header-fg);
|
|
|
|
--color-alert-fg: var(--color-alert-fg);
|
|
--color-alert-bg-info: var(--color-alert-bg-info);
|
|
--color-alert-bg-warning: var(--color-alert-bg-warning);
|
|
--color-alert-bg-success: var(--color-alert-bg-success);
|
|
--color-alert-bg-error: var(--color-alert-bg-error);
|
|
|
|
--color-skeleton-start: var(--color-skeleton-start);
|
|
--color-skeleton-end: var(--color-skeleton-end);
|
|
|
|
--color-progress-track: var(--color-progress-track);
|
|
--color-stats-bg: var(--color-stats-bg);
|
|
--color-topbar-bg: var(--color-topbar-bg);
|
|
|
|
--color-graph-line: var(--color-graph-line);
|
|
--color-graph-gradient-start: var(--color-graph-gradient-start);
|
|
--color-graph-gradient-stop: var(--color-graph-gradient-stop);
|
|
|
|
--color-scrollbar-thumb: var(--color-scrollbar-thumb);
|
|
--color-selection-bg: var(--color-selection-bg);
|
|
|
|
/* --- Tabs colors --- */
|
|
--color-tabs-solid-fg: var(--color-tabs-solid-fg);
|
|
--color-tabs-secondary-fg: var(--color-tabs-secondary-fg);
|
|
--color-tabs-secondary-border: var(--color-tabs-secondary-border);
|
|
|
|
/* --- Badge colors --- */
|
|
--color-badge-gray-bg: var(--color-badge-gray-bg);
|
|
--color-badge-gray-fg: var(--color-badge-gray-fg);
|
|
--color-badge-green-bg: var(--color-badge-green-bg);
|
|
--color-badge-green-fg: var(--color-badge-green-fg);
|
|
--color-badge-red-bg: var(--color-badge-red-bg);
|
|
--color-badge-red-fg: var(--color-badge-red-fg);
|
|
--color-badge-purple-bg: var(--color-badge-purple-bg);
|
|
--color-badge-purple-fg: var(--color-badge-purple-fg);
|
|
--color-badge-orange-bg: var(--color-badge-orange-bg);
|
|
--color-badge-orange-fg: var(--color-badge-orange-fg);
|
|
--color-badge-blue-bg: var(--color-badge-blue-bg);
|
|
--color-badge-blue-fg: var(--color-badge-blue-fg);
|
|
--color-badge-yellow-bg: var(--color-badge-yellow-bg);
|
|
--color-badge-yellow-fg: var(--color-badge-yellow-fg);
|
|
--color-badge-teal-bg: var(--color-badge-teal-bg);
|
|
--color-badge-teal-fg: var(--color-badge-teal-fg);
|
|
--color-badge-cyan-bg: var(--color-badge-cyan-bg);
|
|
--color-badge-cyan-fg: var(--color-badge-cyan-fg);
|
|
--color-badge-pink-bg: var(--color-badge-pink-bg);
|
|
--color-badge-pink-fg: var(--color-badge-pink-fg);
|
|
--color-badge-purple-alt-bg: var(--color-badge-purple-alt-bg);
|
|
--color-badge-purple-alt-fg: var(--color-badge-purple-alt-fg);
|
|
--color-badge-blue-alt-bg: var(--color-badge-blue-alt-bg);
|
|
--color-badge-blue-alt-fg: var(--color-badge-blue-alt-fg);
|
|
--color-badge-bright-gray-bg: var(--color-badge-bright-gray-bg);
|
|
--color-badge-bright-gray-fg: var(--color-badge-bright-gray-fg);
|
|
--color-badge-bright-green-bg: var(--color-badge-bright-green-bg);
|
|
--color-badge-bright-green-fg: var(--color-badge-bright-green-fg);
|
|
--color-badge-bright-red-bg: var(--color-badge-bright-red-bg);
|
|
--color-badge-bright-red-fg: var(--color-badge-bright-red-fg);
|
|
--color-badge-bright-blue-bg: var(--color-badge-bright-blue-bg);
|
|
--color-badge-bright-blue-fg: var(--color-badge-bright-blue-fg);
|
|
--color-badge-bright-yellow-bg: var(--color-badge-bright-yellow-bg);
|
|
--color-badge-bright-yellow-fg: var(--color-badge-bright-yellow-fg);
|
|
--color-badge-bright-teal-bg: var(--color-badge-bright-teal-bg);
|
|
--color-badge-bright-teal-fg: var(--color-badge-bright-teal-fg);
|
|
--color-badge-bright-cyan-bg: var(--color-badge-bright-cyan-bg);
|
|
--color-badge-bright-cyan-fg: var(--color-badge-bright-cyan-fg);
|
|
--color-badge-bright-orange-bg: var(--color-badge-bright-orange-bg);
|
|
--color-badge-bright-orange-fg: var(--color-badge-bright-orange-fg);
|
|
--color-badge-bright-purple-bg: var(--color-badge-bright-purple-bg);
|
|
--color-badge-bright-purple-fg: var(--color-badge-bright-purple-fg);
|
|
--color-badge-bright-pink-bg: var(--color-badge-bright-pink-bg);
|
|
--color-badge-bright-pink-fg: var(--color-badge-bright-pink-fg);
|
|
|
|
/* --- Palette rungs ---
|
|
Self-references, like the badge block above: they exist so Tailwind emits
|
|
the `bg-gray-100` / `text-red-500` utilities, while the VALUES come from
|
|
@luxfi/ui/tokens.css (imported outside any @layer at the top, so it wins).
|
|
This block used to hold literals, which is how the explorer kept its own
|
|
browns after the token set went monochrome:
|
|
--color-orange-50 #FFFAF0 --color-orange-100 #FEEBCB
|
|
--color-orange-500 #DD6B20 --color-yellow-400 #ECC94B */
|
|
--color-gray-50: var(--color-gray-50);
|
|
--color-gray-100: var(--color-gray-100);
|
|
--color-gray-200: var(--color-gray-200);
|
|
--color-gray-300: var(--color-gray-300);
|
|
--color-gray-400: var(--color-gray-400);
|
|
--color-gray-500: var(--color-gray-500);
|
|
--color-gray-600: var(--color-gray-600);
|
|
--color-gray-700: var(--color-gray-700);
|
|
--color-gray-800: var(--color-gray-800);
|
|
--color-gray-900: var(--color-gray-900);
|
|
|
|
--color-green-50: var(--color-green-50);
|
|
--color-green-100: var(--color-green-100);
|
|
--color-green-200: var(--color-green-200);
|
|
--color-green-500: var(--color-green-500);
|
|
--color-green-800: var(--color-green-800);
|
|
|
|
--color-red-50: var(--color-red-50);
|
|
--color-red-100: var(--color-red-100);
|
|
--color-red-200: var(--color-red-200);
|
|
--color-red-500: var(--color-red-500);
|
|
--color-red-600: var(--color-red-600);
|
|
--color-red-800: var(--color-red-800);
|
|
|
|
--color-orange-50: var(--color-orange-50);
|
|
--color-orange-100: var(--color-orange-100);
|
|
--color-orange-500: var(--color-orange-500);
|
|
|
|
--color-yellow-400: var(--color-yellow-400);
|
|
|
|
--color-white: var(--color-white);
|
|
--color-black: var(--color-black);
|
|
|
|
/* --- Shadows --- */
|
|
--shadow-action-bar: var(--shadow-action-bar);
|
|
--shadow-popover: var(--shadow-popover);
|
|
--shadow-drawer: var(--shadow-drawer);
|
|
}
|
|
|
|
/*
|
|
* Motion lives in @luxfi/ui/tokens.css (imported above via styles/tokens.css):
|
|
* durations, curves, enter/exit, hover/press, the skeleton, and one global
|
|
* prefers-reduced-motion rule. Add a move to the design system, never here.
|
|
*
|
|
* What this replaced: a local `skeleton-shimmer` that animated
|
|
* background-position on a 200%-wide gradient. The explorer mounts ~1460
|
|
* skeletons, so that was ~1460 full-box repaints per frame on the main thread.
|
|
*/
|
|
|
|
/*
|
|
* Dark mode: use .dark class (next-themes)
|
|
* Tailwind v4 default is prefers-color-scheme; override to class-based.
|
|
*/
|
|
@custom-variant dark (&:is(.dark *));
|
|
|
|
/*
|
|
* Scope Tailwind to a layer so it does not override Chakra styles.
|
|
* Chakra styles have no layer, so they win by default cascade rules.
|
|
* New Tailwind components explicitly opt in via utility classes.
|
|
*/
|
|
|
|
@font-face {
|
|
font-family: 'InterFallback';
|
|
src: url('/static/fonts/Inter-fallback.woff2') format('woff2');
|
|
unicode-range: U+2192; /* Only the right arrow */
|
|
font-display: swap;
|
|
}
|
|
|
|
/*
|
|
* Global font and body styles.
|
|
* Geist is loaded via Google Fonts in _document.tsx.
|
|
* Apply it universally so Chakra components inherit it too.
|
|
*/
|
|
html, body {
|
|
font-family: 'Geist', sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|