Design lines: tuix vs rubik
Two presentations, one component API. Live demos below follow the global sidebar switch (they remount on change); the printed snippets pin one line so they stand alone. Every component accepts design?: 'tuix' | 'rubik' (or inherits from the nearest [data-design] / global setDesign()). Default: tuix.
tuix (original)
Flat terminal look: sharp corners, border-radius: 0, mono font, subtle border, no elevation (--shadow: none), minimal motion.
rubik (new — from HomeTemplate3)
Squared-futuristic HUD translated from portafolio template3 into pure tokens. Rubik is morphology + motion + hierarchy, NEVER palette (colors stay consumer-owned).
- Geometry (v2 — minimal-futurist): sharp base (
border-radius: 0) with a SINGLE angular cut top-right viaclip-path(--cp-cut: 12pxcontainers,8pxbuttons,6pxchips). No brackets, no neon. Reference: sci-fi button sheets + HUD panels, restrained to one cut per surface. - HUD micro-ticks: tiny
+/tick markers in border color at low emphasis (panel corners, section labels). Decorative, never glowing. - Rail: thin accent rail (
2–3px,var(--cp-rail), NO glow) marking headers, actives and rails. Grows or appears on hover/interaction. - Type: labels/headers mono uppercase (
letter-spacing: .07–.16em); rubik card title in display font (--font-display), body in sans; tuix stays full mono. - Elevation: tuix flat; rubik lifts softly (
--shadow/--shadow-hover, neutral only), hovertranslateY(-1px~-2px). No colored shadows. - Motion:
--cp-easestandard;120mspress,~200mshover. Honorprefers-reduced-motion. - No glow, no neon: rubik stays inside the consumer palette (monochrome- leaning). Accent marks state (rails, actives, focus outline) but never emits light: no
box-shadowwith accent color, no gradients-for-glow. Focus = flat2pxoutline, offset2px. - Numbers: mono index prefix (
// 01) on cards/steps, muted → accent on rubik. - CSS home (Fase 2 rule): the scoped
.x--rubikvariant is the source of truth — it must carry the FULL visible delta, because[data-design="rubik"] .xglobal selectors do NOT match when class + attribute sit on the SAME element (prop-only usage:<Button design="rubik">).src/themes/rubik.csskeeps only tokens, keyframes, and ancestor-scoped enhancements. Never touch tuix. - Contract per component:
designprop +useDesign()+card--rubik-style class and/ordata-design="rubik"attr + spec asserting the class + docs demo inside[data-design="rubik"]. - Teleport limitation: teleported content (
Modal,CommandPalette) escapes the[data-design]ancestor subtree — passdesignexplicitly instead of relying on ancestor inheritance there.