金色时刻 · 15:48
让好资源,触手可及
AGENT SKILL

styling

styling 是面向软件开发的 Agent Skill,来自 HoangNguyen0403/agent-skills-standard。查看技能说明、操作步骤与使用约定,并通过原项目了解详细用法。

Zero-runtime CSS strategies (Tailwind) and RSC compatibility.

SKILL.md

下载 MD ↓
nameNext.js Styling & UI Performance
descriptionZero-runtime CSS strategies (Tailwind) and RSC compatibility.
metadata{"labels": ["nextjs", "styling", "tailwind", "css"], "triggers": {"files": ["**/*.css", "tailwind.config.ts", "**/components/ui/*.tsx"], "keywords": ["tailwind", "css modules", "styled-components", "clsx", "cn"]}}

Styling & UI Performance

Priority: P1 (HIGH)

Prioritize Zero-Runtime CSS for Server Components.

Library Selection

Library Verdict Reason
Tailwind / shadcn Preferred (P1) Zero-runtime, RSC compatible. Best for App Router.
CSS Modules Recommended Scoped, zero-runtime.
MUI / Chakra (Runtime) Avoid Forces use client widely. Degrades performance.

Patterns

  1. Dynamic Classes: Use clsx + tailwind-merge (cn utility). - Reference: Dynamic Classes & Button Example
  2. Font Optimization: Use next/font to prevent Cumulative Layout Shift (CLS). - Reference: Font Setup
  3. CLS Prevention: Always specify width/height on images.

来源:HoangNguyen0403/agent-skills-standard · MIT 许可 · 许可原文 · MD 为来源页保存的历史版本