Cursor rule
.cursor/rules/styling.mdc[object Object]
Cursor rules
Quality
54/100
Scores the file, not the repository.Length
153 words
6 headings · 3 code blocksRepository
0
— · pushed 377 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# 样式开发规范89## 1. UnoCSS 使用规范10- 优先使用 UnoCSS 原子类11- 复杂布局使用 CSS Modules12- 响应式设计使用断点前缀13```typescript14// 基础样式15<div className="flex items-center justify-between p-4 bg-white">16 <h1 className="text-lg font-bold">标题</h1>17 <Button className="btn-primary">操作</Button>18</div>1920// 响应式样式21<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">22 {/* 内容 */}23</div>24```2526## 2. CSS Modules 规范27- 文件命名:`Component.module.scss`28- 类名使用 camelCase29```scss30// UserCard.module.scss31.userCard {32 @apply bg-white rounded-lg shadow-md p-4;3334 .header {35 @apply flex items-center justify-between mb-4;3637 .title {38 @apply text-lg font-bold text-gray-800;39 }40 }4142 .content {43 @apply text-gray-600;44 }45}46```4748## 3. 主题系统49- 使用 CSS 变量定义主题色50- 支持暗色模式切换51```scss52:root {53 --primary-color: #1890ff;54 --success-color: #52c41a;55 --warning-color: #faad14;56 --error-color: #ff4d4f;57}5859[data-theme='dark'] {60 --primary-color: #177ddc;61 --bg-color: #141414;62 --text-color: #ffffff;63}64```656667## 暗色模式6869- 所有组件必须支持暗色模式70- 暗色模式应通过 Token 系统实现,不应硬编码71- 测试暗色模式下的颜色对比度,确保可访问性72- 在设计暗色模式时考虑降低亮度和饱和度73- 确保文本在暗色背景上有足够的对比度74- 图片和图标应提供适合暗色模式的版本7576## 可访问性样式7778- 遵循 WCAG 2.1 AA 级别标准79- 确保焦点状态有明显的视觉提示80- 提供足够的色彩对比度81- 不依赖颜色来传达信息82- 支持用户放大页面至 200% 时的正常布局83- 避免使用会导致闪烁的动画84
Also in crunl/Xingyu-Frontend
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| crunl/Xingyu-Frontend.cursor/rules/api.mdc · 0 | Cursor rules | api | 45/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/comments.mdc · 0 | Cursor rules | securityapidocs | 46/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/componenting.mdc · 0 | Cursor rules | no sections | 45/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/naming.mdc · 0 | Cursor rules | archtypesapiui | 58/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/project.mdc · 0 | Cursor rules | no sections | 50/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/reduxing.mdc · 0 | Cursor rules | no sections | 45/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/routing.mdc · 0 | Cursor rules | no sections | 53/100 | 3 days ago | |
| crunl/Xingyu-Frontend.cursor/rules/typescript.mdc · 0 | Cursor rules | typesdocs | 42/100 | 3 days ago |
Diff against .cursor/rules/api.mdc Diff against .cursor/rules/comments.mdc Diff against .cursor/rules/componenting.mdc Diff against .cursor/rules/naming.mdc Diff against .cursor/rules/project.mdc Diff against .cursor/rules/reduxing.mdc Diff against .cursor/rules/routing.mdc Diff against .cursor/rules/typescript.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
