mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 14:19:39 +02:00
13 lines
1.2 KiB
Text
13 lines
1.2 KiB
Text
|
---
|
||
|
description: This file describes Maybe's design system and how views should be styled
|
||
|
globs: app/views/**,app/helpers/**,app/javascript/controllers/**
|
||
|
---
|
||
|
Use this rule whenever you are writing html, css, or even styles in Stimulus controllers that use D3.js.
|
||
|
|
||
|
The codebase uses TailwindCSS v4.x (the newest version) with a custom design system defined in [maybe-design-system.css](mdc:app/assets/tailwind/maybe-design-system.css)
|
||
|
|
||
|
- Always start by referencing [maybe-design-system.css](mdc:app/assets/tailwind/maybe-design-system.css) to see the base primitives and tokens we use in the codebase
|
||
|
- Always generate semantic HTML
|
||
|
- Never create new styles in [maybe-design-system.css](mdc:app/assets/tailwind/maybe-design-system.css) or [application.css](mdc:app/assets/tailwind/application.css) without explicitly receiving permission to do so
|
||
|
- Always favor the "utility first" Tailwind approach. Reusable style classes should not be created often. Code should be reused primarily through ERB partials.
|
||
|
- Always prefer using the utility "tokens" defined in [maybe-design-system.css](mdc:app/assets/tailwind/maybe-design-system.css) when possible. For example, use `text-primary` rather than `text-gray-900`.
|