返回 Skill 列表
extension
分类: 开发与工程无需 API Key

ellies-frontend-standards

Ellie项目的前端开发标准。在构建前端界面、组件、页面或应用程序时使用。强制执行技术栈偏好(Leptos > HTMX/SolidJS > React,现代纯CSS,不使用Tailwind)以及以可访问性为先的开发方式。除非这些标准与现有项目已建立的模式冲突,否则应始终应用这些标准。

person作者: jakexiaohubgithub

Ellie's Frontend Standards

Core Principles

Consistency trumps these guidelines. If working in an existing project with established patterns, follow those patterns even if they contradict the preferences below.

Tech Stack

Frameworks (in order of preference)

  1. Leptos (Rust) - Preferred when Rust is an option
  2. HTMX or SolidJS - Preferred for JS-based projects
  3. React - Only when required by existing project or explicit request

CSS

Use modern vanilla CSS. Take advantage of:

  • CSS custom properties (variables)
  • Native CSS nesting
  • Container queries
  • :has(), :is(), :where() selectors
  • CSS Grid and Flexbox
  • clamp() for fluid typography and spacing

Never use Tailwind. No exceptions.

Aesthetics

Defer to the frontend-design skill for visual design guidance (typography, color, motion, layout aesthetics).

Accessibility

Accessibility is a priority, not an afterthought:

  • Semantic HTML first - Use the right element for the job (<button>, <nav>, <main>, <article>, etc.)
  • Keyboard navigation - All interactive elements must be keyboard accessible
  • Focus management - Visible focus indicators, logical focus order, focus trapping in modals
  • ARIA when needed - Only when semantic HTML isn't sufficient; prefer native elements
  • Color contrast - Meet WCAG AA minimum (4.5:1 for text, 3:1 for large text/UI)
  • Motion - Respect prefers-reduced-motion
  • Screen reader testing - Consider how content reads linearly