--- name: html-css-guide description: | HTML and CSS guardrails, patterns, and best practices for AI-assisted development. Use when working with HTML/CSS files (.html, .css, .scss, .less), or when the user mentions HTML/CSS. Provides semantic HTML guidelines, accessibility standards, modern CSS patterns, and responsive design conventions specific to this project's coding standards. license: MIT metadata: author: samuel version: "1.0" category: language language: html-css extensions: ".html,.htm,.css,.scss,.less,.sass" --- # HTML/CSS Guide > Applies to: HTML5, CSS3, SCSS/LESS, Responsive Design, WCAG 2.1 AA ## Core Principles 1. **Semantic First**: Use HTML elements for their meaning, not their appearance; style with CSS 2. **Accessible by Default**: Every page must be navigable by keyboard, screen reader, and assistive technology 3. **Progressive Enhancement**: Build a solid HTML foundation, then layer on CSS and JavaScript 4. **Mobile First**: Design for the smallest viewport, then enhance with `min-width` media queries 5. **Performance Budget**: Minimize render-blocking resources; prefer system fonts, modern image formats, and critical CSS inlining ## Guardrails ### Semantic HTML - Use `
` once per page; `
`, `