Cursor rule
.cursor/rules/ux-ui-daynight.mdcGuidelines for implementing Day/Night (Light/Dark) mode and UI/UX design.
Cursor rules
Quality
54/100
Scores the file, not the repository.Length
339 words
6 headings · 3 code blocksRepository
34
— · pushed 25 days agoLast changed
3 days ago
First indexed 3 days ago.123456# UX/UI Day/Night Mode Guidelines78This project supports both Day (Light) and Night (Dark) modes. All new UI components and pages must be designed to adapt seamlessly to both modes.910## Core Principles11121. **Mandatory Dual-Mode Support**13 - Never assume the app will only be viewed in dark mode or light mode.14 - Every new component, page, or feature must look good and function correctly in both modes.15 - Test your UI changes by toggling the theme in the header.16172. **Strict Use of Semantic Colors**18 - **DO NOT** hardcode absolute color values in your Tailwind classes or CSS unless absolutely necessary (e.g., `bg-white`, `text-black`, `bg-gray-900`, `#ffffff`, `#000000`).19 - **DO** use the semantic CSS variables defined in `src/style.css` via Tailwind utility classes.20 - Backgrounds: `bg-background`, `bg-card`, `bg-popover`, `bg-muted`21 - Text: `text-foreground`, `text-muted-foreground`, `text-primary-foreground`22 - Borders: `border-border`, `border-input`23 - Action/States: `bg-primary`, `bg-secondary`, `bg-destructive`, `bg-accent`24253. **Component Adaptation**26 - **Shadows and Borders**: Dark mode often relies more on subtle borders (`border-border`) rather than shadows (`shadow-sm`, `shadow-md`) to distinguish elevation, whereas light mode often uses shadows. Ensure elements have clear boundaries in both modes.27 - **Third-Party Components**: When integrating charts, code editors, terminal emulators, or other complex components, ensure their themes are linked to the current app theme (using `isDark` from `@vueuse/core` or CSS variables).28294. **Opacity and Alpha Channels**30 - Use Tailwind's opacity modifiers with semantic colors when you need a lighter version of a color (e.g., `bg-primary/10`, `text-muted-foreground/80`). This ensures the alpha blending looks correct on both light and dark backgrounds.3132## Implementation Example3334### ❌ Bad (Hardcoded Colors)35```vue36<div class="bg-white border border-gray-200 text-gray-900 shadow-sm">37 <h2 class="text-black">Title</h2>38 <p class="text-gray-500">Description</p>39</div>40```4142### ✅ Good (Semantic Colors)43```vue44<div class="bg-card border border-border text-card-foreground">45 <h2 class="text-foreground">Title</h2>46 <p class="text-muted-foreground">Description</p>47</div>48```4950## Using Theme State in Logic51If you need to programmatically access the current theme (e.g., to pass a "theme" prop to a chart library), use `@vueuse/core`:5253```typescript54import { useDark } from '@vueuse/core'5556const isDark = useDark()5758// isDark.value will be true in Night mode, false in Day mode59```
Also in NoDeskAI/browser-pilot
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 |
|---|---|---|---|---|---|
| NoDeskAI/browser-pilot.cursor/rules/build-from-user-perspective.mdc · 34 | Cursor rules | buildsecurity | 51/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/debug-container.mdc · 34 | Cursor rules | api | 65/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/deploy.mdc · 34 | Cursor rules | no sections | 38/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/env-vars.mdc · 34 | Cursor rules | setup | 63/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/fingerprint-popover-sync.mdc · 34 | Cursor rules | no sections | 25/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/keyboard-shortcuts-ux.mdc · 34 | Cursor rules | ui | 31/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/plan-ui-summary.mdc · 34 | Cursor rules | ui | 54/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/tailwind-css-color-mix.mdc · 34 | Cursor rules | ui | 50/100 | 3 days ago | |
| NoDeskAI/browser-pilot.cursor/rules/verify-before-claim.mdc · 34 | Cursor rules | no sections | 50/100 | 3 days ago |
Diff against .cursor/rules/build-from-user-perspective.mdc Diff against .cursor/rules/debug-container.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/env-vars.mdc Diff against .cursor/rules/fingerprint-popover-sync.mdc Diff against .cursor/rules/keyboard-shortcuts-ux.mdc Diff against .cursor/rules/plan-ui-summary.mdc Diff against .cursor/rules/tailwind-css-color-mix.mdc Diff against .cursor/rules/verify-before-claim.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.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 | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | 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 |
