RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/crunl/Xingyu-Frontend

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 blocks

Repository

0

— · pushed 377 days ago

Last changed

3 days ago

First indexed 3 days ago.
crunl/Xingyu-Frontend/.cursor/rules/styling.mdcRawGitHub
1---
2description:
3globs:
4alwaysApply: false
5---
6 
7# 样式开发规范
8 
9## 1. UnoCSS 使用规范
10- 优先使用 UnoCSS 原子类
11- 复杂布局使用 CSS Modules
12- 响应式设计使用断点前缀
13```typescript
14// 基础样式
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>
19 
20// 响应式样式
21<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
22 {/* 内容 */}
23</div>
24```
25 
26## 2. CSS Modules 规范
27- 文件命名:`Component.module.scss`
28- 类名使用 camelCase
29```scss
30// UserCard.module.scss
31.userCard {
32 @apply bg-white rounded-lg shadow-md p-4;
33 
34 .header {
35 @apply flex items-center justify-between mb-4;
36 
37 .title {
38 @apply text-lg font-bold text-gray-800;
39 }
40 }
41 
42 .content {
43 @apply text-gray-600;
44 }
45}
46```
47 
48## 3. 主题系统
49- 使用 CSS 变量定义主题色
50- 支持暗色模式切换
51```scss
52:root {
53 --primary-color: #1890ff;
54 --success-color: #52c41a;
55 --warning-color: #faad14;
56 --error-color: #ff4d4f;
57}
58 
59[data-theme='dark'] {
60 --primary-color: #177ddc;
61 --bg-color: #141414;
62 --text-color: #ffffff;
63}
64```
65 
66 
67## 暗色模式
68 
69- 所有组件必须支持暗色模式
70- 暗色模式应通过 Token 系统实现,不应硬编码
71- 测试暗色模式下的颜色对比度,确保可访问性
72- 在设计暗色模式时考虑降低亮度和饱和度
73- 确保文本在暗色背景上有足够的对比度
74- 图片和图标应提供适合暗色模式的版本
75 
76## 可访问性样式
77 
78- 遵循 WCAG 2.1 AA 级别标准
79- 确保焦点状态有明显的视觉提示
80- 提供足够的色彩对比度
81- 不依赖颜色来传达信息
82- 支持用户放大页面至 200% 时的正常布局
83- 避免使用会导致闪烁的动画
84 

Sections

  • 样式开发规范
  • 1. UnoCSS 使用规范
  • 2. CSS Modules 规范
  • 3. 主题系统
  • 暗色模式
  • 可访问性样式

What it covers

architectureui

Stack — with the evidence

typescript

(1.00)

vite

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

github-actions

(0.60)

vercel

(0.60)

Glob targeting

  • [object Object]

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
crunl
Language
—
License
—
Archived
no

All configs in this repo

Also in crunl/Xingyu-Frontend

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
crunl/Xingyu-Frontend.cursor/rules/api.mdc · 0Cursor rulestypescriptvite+8api45/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/comments.mdc · 0Cursor rulestypescriptvite+8securityapidocs46/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/componenting.mdc · 0Cursor rulestypescriptvite+8no sections45/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/naming.mdc · 0Cursor rulestypescriptvite+8archtypesapiui58/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/project.mdc · 0Cursor rulestypescriptvite+8no sections50/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/reduxing.mdc · 0Cursor rulestypescriptvite+8no sections45/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/routing.mdc · 0Cursor rulestypescriptvite+8no sections53/1003 days ago
crunl/Xingyu-Frontend.cursor/rules/typescript.mdc · 0Cursor rulestypescriptvite+8typesdocs42/1003 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.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack