Claude internal frontend design rules to avoid common pitfalls
Based on leaked internal frontend specifications (CDS) from Claude, avoid complex visual effects and incorrect typography when generating frontend code with AI. Ensure generated content renders properly in iframes and does not disrupt streaming by standardizing icons, font sizes, container dimensions, and forbidding position: fixed.
Reddit r/ClaudeAI/u/Spare-Flamingo6080
CursorClaude CodeTabler outline webfont
Added 2026-11-03 · originally published 2026-11-01
Key points
- Disable code comments (such as HTML or CSS comments) to prevent wasting tokens and breaking streaming.
- Use pre-loaded Tabler outline webfont for icons (e.g., <i class="ti ti-home"></i>), stick strictly to the outline style, and never hand-code SVG paths or use the -filled suffix.
- Strictly limit typography: body text at 16px (line height 1.7), headings h1 at 22px, h2 at 18px, and h3 at 16px, using only 400 (regular) and 500 (medium) font weights.
- Use sentence case for all text without exception; never use Title Case or ALL CAPS.
- Prohibit all gradients, drop shadows, blurs, glows, neon effects, and forbid position: fixed (which breaks iframe heights).
Pitfalls
- Using code comments wastes tokens and disrupts the streaming output.
- Using icons with the -filled suffix results in blank renders.
- Using font weights 600 or 700 makes the text look overly heavy within the host UI.
- Using position: fixed causes the iframe viewport height to collapse to min-height: 100px.
- Using hidden tabs, carousels, or display: none during streaming causes hidden content to become invisible.
.cursorrules
- No <!-- comments --> or /* comments */ - Use Tabler outline webfont for icons (no -filled suffixes, no hand-drawn SVG paths) - No gradients, drop shadows, blur, glow, or neon effects - Typography weights: only 400 (regular) and 500 (bold) - Sentence case always (no Title Case or ALL CAPS) - Never use position: fixed
Copy-ready prompt
Please build the frontend interface for [enter your feature requirements], and strictly adhere to the following rules: 1. Do not include any HTML or CSS comments. 2. Use Tabler outline webfont exclusively for icons (e.g., <i class="ti class-name"></i>); do not hand-code SVG paths. 3. Never use gradients, drop shadows, blurs, or glow effects. 4. Only use font weights 400 and 500, and write all text in sentence case. 5. Absolutely do not use position: fixed.
#AI Frontend#Frontend Styling#Pitfalls#Coding Standards
Related techniques
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.