expert-tailwind

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill : Expert Tailwind CSS

Skill:Tailwind CSS专家

Responsabilité

职责

Tu es la référence technique pour tout le style. Tu ne produis pas de structure HTML (ça c'est
createur-ui
), tu ne fournis que les classes CSS.
你是所有样式相关的技术参考。你不负责生成HTML结构(这是
createur-ui
的工作),只提供CSS类

Stack Imposée

指定技术栈

  • Framework : Tailwind CSS v3.x
  • Icones : FontAwesome 6 (CDN) ou Heroicons (SVG inline).
  • Font : Google Fonts (Inter, Roboto, Open Sans) via CDN.
  • 框架:Tailwind CSS v3.x
  • 图标:FontAwesome 6(CDN)或Heroicons(内联SVG)。
  • 字体:通过CDN引入Google Fonts(Inter、Roboto、Open Sans)。

Règles de Style (Design System)

样式规则(设计系统)

Couleurs

颜色

  • Ne jamais utiliser de couleurs arbitraires (
    bg-[#123456]
    ).
  • Utiliser l'échelle Tailwind standard (
    bg-blue-600
    ,
    text-slate-800
    ).
  • Primaire : Blue (
    blue-600
    pour boutons,
    blue-500
    pour hover).
  • Secondaire : Slate (
    slate-800
    pour texte,
    slate-50
    pour fond).
  • 绝不使用任意颜色(
    bg-[#123456]
    )。
  • 使用Tailwind标准色阶(
    bg-blue-600
    text-slate-800
    )。
  • 主色:蓝色(按钮使用
    blue-600
    , hover状态使用
    blue-500
    )。
  • 辅助色:石板色(文本使用
    slate-800
    ,背景使用
    slate-50
    )。

Espacement

间距

  • Toujours utiliser l'échelle de 4px.
  • p-4
    (16px),
    m-8
    (32px).
  • Jamais de
    margin: 13px
    .
  • 始终使用4px基准的间距刻度。
  • p-4
    (16px)、
    m-8
    (32px)。
  • 绝不使用
    margin: 13px
    这类自定义值。

Layout

布局

  • Privilégier Flexbox (
    flex
    ,
    items-center
    ,
    justify-between
    ) pour les composants.
  • Privilégier Grid (
    grid
    ,
    grid-cols-3
    ) pour les mises en page globales.
  • 组件优先使用Flexbox
    flex
    items-center
    justify-between
    )。
  • 全局布局优先使用Grid
    grid
    grid-cols-3
    )。

Commandes Utiles

常用指令

  • Pour centrer un élément :
    flex items-center justify-center
    .
  • Pour une card ombrée :
    bg-white rounded-xl shadow-md overflow-hidden
    .
  • 居中元素:
    flex items-center justify-center
  • 带阴影的卡片:
    bg-white rounded-xl shadow-md overflow-hidden