netiCRM Frontend Development
Overview
This skill provides project-specific frontend development standards for netiCRM/CiviCRM. It ensures AI-generated code follows established patterns, naming conventions, and best practices specific to this codebase.
Key principle: Knowing syntax ≠ Writing high-quality code. This skill bridges the gap between general CSS/JS/HTML knowledge and project-specific quality standards.
Quick Reference
CSS
- •Standards: See css-standards.md
- •Browser Support: See browser-support-policy.md
JavaScript
- •Patterns: See javascript-patterns.md
Smarty Templates
- •Guide: See smarty-templates.md
HTML Structure
- •Conventions: See html-conventions.md
Code Quality Principles
- •Maintainability First: Code should be easy to understand and modify
- •Consistency: Follow existing patterns in the codebase
- •Performance: Consider CSS specificity, selector performance, and asset loading
- •Accessibility: Use semantic HTML and proper ARIA attributes
- •Localization: Always use translation functions for user-facing text
Development Workflow
- •Check References First: Before writing code, review the relevant reference file
- •Check Browser Support (MANDATORY for CSS): Before using any new or uncommon CSS technology, you MUST consult browser-support-policy.md to verify compatibility with the company's browser support policy. This includes:
- •Any CSS technology that appears "new," "experimental," or "uncommon"
- •Any technique using
::pseudo-elements or@rules (except basic @media) - •Technologies containing keywords like
scroll-,container-,@layer,@property, etc. - •You MUST perform a WebSearch or WebFetch to check current browser support - do NOT rely solely on your knowledge cutoff
- •Follow Patterns: Look for similar existing code in the project
- •Use CSS Variables: Always use defined CSS variables for colors and dimensions
- •Test Responsively: Verify code works across breakpoints (
ncg-*grid) - •Validate Translations: Ensure all user-facing text uses
{ts}orts()
Getting Started
For detailed information on any topic:
- •Identify which area you're working on (CSS/JS/Smarty/HTML)
- •Read the corresponding reference file
- •Follow the patterns and examples provided
- •Avoid the documented anti-patterns