Skip to content

Commit 9c4c405

Browse files
tyler-daneclaude
andcommitted
docs: remove styled-components references from cursorrules
Describe Tailwind as the sole styling system and document the hybrid inline-utility + c-* recipe convention. Note that semantic attributes (role, aria-*) must be preserved when restyling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 59091ce commit 9c4c405

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

.cursorrules/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You are an expert full-stack developer working on Compass, a calendar applicatio
1111

1212
This is a monorepo using Bun workspaces with the following packages:
1313

14-
- `@compass/web` - React/TypeScript frontend with Redux, styled-components, webpack
14+
- `@compass/web` - React/TypeScript frontend with Redux, Tailwind CSS
1515
- `@compass/backend` - Express.js REST API with MongoDB, Google Calendar sync, WebSocket support
1616
- `@compass/core` - Shared utilities, types, and business logic
1717
- `@compass/scripts` - CLI tools for building, database operations, user management
@@ -42,7 +42,7 @@ This directory contains focused rules for different aspects of development:
4242
```
4343
packages/
4444
├── backend/src/ # Express.js API, MongoDB, Google Calendar sync
45-
├── web/src/ # React frontend, Redux state, styled-components
45+
├── web/src/ # React frontend, Redux state, Tailwind CSS
4646
├── core/src/ # Shared utilities, types, business logic
4747
└── scripts/src/ # CLI tools for builds and operations
4848
```

.cursorrules/styling.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,30 @@ The pattern is: CSS variable `--color-{category}-{name}` → Tailwind class `{ca
6060

6161
### Styling Approach
6262

63-
- Use Tailwind utility classes directly in JSX
64-
- For complex styles, use styled-components (already configured)
65-
- Follow existing patterns in `packages/web/src/components/`
63+
Tailwind is the **sole** styling system. Do not introduce any CSS-in-JS or
64+
runtime styling library; a guard test (`no-styled-components.test.ts`) enforces
65+
this.
66+
67+
Use a hybrid of inline utilities and `c-*` recipes:
68+
69+
- **Inline Tailwind utilities** for one-off layout and state, applied directly
70+
in JSX (e.g. `className="mb-2.5 items-center justify-end gap-[30px]"`).
71+
- **`c-*` utilities** for reusable component recipes and complex third-party
72+
selectors (datepicker internals, animations, calendar grid selectors). These
73+
are defined with Tailwind v4's `@utility c-...` directive in
74+
`packages/web/src/index.css` (e.g. `c-event-form`, `c-button`,
75+
`c-calendar-now-line`). Name reusable recipes with the `c-` prefix.
76+
- **Semantic CSS-variable tokens** for all theme-dependent colors (see above),
77+
so a future `[data-theme="light"]` rollout needs no component changes.
78+
- **Inline CSS custom properties** only for runtime values that cannot be known
79+
at build time — event colors, positions, and dynamic grid counts (e.g.
80+
`style={{ "--event-form-bg": color }}`).
81+
82+
Follow existing patterns in `packages/web/src/components/` and the recipes in
83+
`packages/web/src/index.css`.
84+
85+
Preserve semantic attributes (`role`, `aria-*`, `title`) when restyling — they
86+
are load-bearing for assistive tech and e2e selectors, not presentation.
6687

6788
## Module Imports
6889

0 commit comments

Comments
 (0)