Skip to content

Commit 26183f9

Browse files
authored
Merge pull request #20 from ModusCreateOrg/ADE-63
[ADE-63] - Add password recovery features
2 parents 11a18ae + a650841 commit 26183f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+822
-3
lines changed

.cursor/rules/general.mdc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,55 @@ Technologies:
7171

7272

7373
AWS architecture: [aws architecture.pdf](mdc:docs/assets/aws architecture.pdf)
74+
75+
# CSS Units Standards
76+
77+
## Relative Units Requirement
78+
79+
- **ALWAYS use relative units** instead of absolute pixel values (px) in CSS/SCSS
80+
- **Preferred relative units**:
81+
- `rem` for most measurements (margins, paddings, font sizes)
82+
- `em` for spacing related to the current element's font size
83+
- `%` for responsive layouts and containers
84+
- `vh/vw` for viewport-relative sizing
85+
- `ch` for width measurements related to character width
86+
87+
## Conversion Reference
88+
89+
- `1rem` = base font size (typically 16px)
90+
- To convert px to rem: `[px value] / 16 = [rem value]`
91+
- Example: `16px` = `1rem`, `24px` = `1.5rem`, `8px` = `0.5rem`
92+
93+
## Why Relative Units?
94+
95+
- **Accessibility**: Scales with user font size preferences
96+
- **Responsiveness**: Adapts to different viewport sizes
97+
- **Maintainability**: Easier to scale entire UI by changing root font size
98+
- **Consistency**: Creates a more harmonious design system
99+
100+
## Limited Exceptions
101+
102+
- Media queries may use px units (`@media (min-width: 768px)`)
103+
- 1px borders when a single-pixel line is required
104+
- Box shadows where precise control is needed
105+
106+
## Examples
107+
108+
```scss
109+
// ❌ AVOID
110+
.element {
111+
margin: 16px;
112+
padding: 8px 12px;
113+
font-size: 14px;
114+
}
115+
116+
// ✅ PREFERRED
117+
.element {
118+
margin: 1rem;
119+
padding: 0.5rem 0.75rem;
120+
font-size: 0.875rem;
121+
}
122+
```
123+
```
124+
125+
This rule provides clear guidelines on what units to use, how to convert between units, and why it's important for your project. You can add this to your general rules to ensure consistency across the codebase.
2.43 KB
Loading
2.1 KB
Loading
2.28 KB
Loading
4.55 KB
Loading
3.79 KB
Loading
3.86 KB
Loading
3.87 KB
Loading
3.23 KB
Loading
3.35 KB
Loading

0 commit comments

Comments
 (0)