diff --git a/.jules/rules/design.md b/.jules/rules/design.md index 0112490..39bfbfb 100644 --- a/.jules/rules/design.md +++ b/.jules/rules/design.md @@ -1,17 +1,18 @@ --- -description: Vibe coding guidelines and architectural constraints for Vibe Coding within the Documentation domain. -tags: [vibe-coding, documentation, best-practices, architecture] -topic: Vibe Coding -complexity: Architect -last_evolution: 2026-03-29 -vibe_coding_ready: true -technology: Vibe Coding +technology: UI/UX Design domain: Documentation level: Senior/Architect version: Latest +tags: [vibe-coding, documentation, best-practices, architecture, design-system, accessibility] ai_role: Senior Vibe Coding Expert -last_updated: 2026-03-29---# 🎨 UI/UX Design & Styling Rules for Jules -## 1. Context & Scope +last_updated: 2026-03-29 +--- + +# 🎨 UI/UX Design & Styling Rules for Jules + +This document outlines the core styling rules and design principles for generating UI components, emphasizing accessibility, responsive design, and component architecture. + +## 📖 1. Context & Scope - **Primary Goal:** Maintain a consistent, **accessible (a11y)**, and visually appealing user interface across all applications through strict **responsive design** practices. - **Target Tooling:** Jules AI agent (UI Generation & CSS Audits). - **Tech Stack Version:** Agnostic (CSS, SCSS, Tailwind, Material UI, etc.). @@ -19,22 +20,81 @@ last_updated: 2026-03-29---# 🎨 UI/UX Design & Styling Rules for Jules
Design Overview
+ --- -## 2. Design System & Styling Rules +## 🎨 2. Design System & Styling Rules > [!CAUTION] > **Hardcoded Values:** Never use hardcoded colors, spacing, or typography values (`#FF0000`, `14px`). Always use established **Design Tokens** (e.g., CSS Variables or Tailwind classes like `text-primary`, `p-4`). -### Responsive & Adaptive Principles -1. **Mobile-First Approach:** Always write base CSS for mobile screens first, then progressively enhance the design for larger screens using `min-width` media queries. -2. **Fluid Layouts:** Prefer relative units (`rem`, `em`, `vh`, `vw`, `%`) over absolute units (`px`) for layout structures and typography to allow proper scaling. +### ❌ Bad Practice +```css +.card { + margin: 20px; + background-color: #ffffff; + color: #333333; +} +``` + +### ⚠️ Problem +Using hardcoded absolute values (`20px`, hex codes) creates inconsistencies across the application. It prevents dynamic theming (e.g., Dark Mode) and breaks structural rhythm when responsive layouts scale. -### Accessibility (A11y) Standards -1. **Semantic HTML:** Use native, meaningful HTML5 tags (` +``` + +### 🚀 Solution +Enforce **Semantic HTML**. Use native HTML5 tags (` +``` + +### 🚀 Solution +Enforce Semantic HTML. Native elements provide built-in accessibility. Ensure interactive components possess visual focus states (`:focus-visible`), maintain WCAG AA contrast (4.5:1), and appropriately utilize ARIA attributes only when native semantics are insufficient. + +--- +## 🏗️ 5. UI Component Architecture ```mermaid graph TD @@ -64,8 +128,9 @@ graph TD class Components component; class Layouts component; ``` + --- -## 3. Checklist for Jules Agent +## ✅ 6. Checklist for Jules Agent When generating UI components or modifying styles: - [ ] Verify that the component works properly on mobile (`320px`), tablet, and desktop viewports. diff --git a/frontend/readme.md b/frontend/readme.md index 5004cbf..d8107e6 100644 --- a/frontend/readme.md +++ b/frontend/readme.md @@ -43,3 +43,8 @@ This folder acts as a container for documentation around the following technolog - [React](./react/readme.md) - [SolidJS](./solidjs/readme.md) - [Qwik](./qwik/readme.md) + +## 🎨 UI/UX Design & Styling + +- [UI/UX Design Production-Ready Best Practices](../.jules/rules/ui-ux-design.md) +- [UI/UX Design & Styling Rules for Jules](../.jules/rules/design.md)