paste this link into your ai. it will know what to do.
Alejandro Alvarez's house rules for building websites in plain HTML and CSS — mobile first, BEM classes, cascade layers, tokens, one column grid, CSS-first interaction, calm motion, accessibility. Use when building, refactoring or reviewing a static site, landing page or HTML/CSS component.
Techboi Web Rules
Read [references/WEB-RULES.md](references/WEB-RULES.md) in full before writing any code. The look changes per project; the way of building does not.
Non-negotiables
- Minimal code. Fewest lines that fully work.
- Classes on every block (short BEM). Never select by position (
:nth-child) or element chains (body > header > a) or ids. - Mobile first. Base CSS = phone;
min-widthat48remand64rem. Nomax-widthqueries. - Cascade layers:
reset, base, components, utilities. Every rule in a layer. No!important. - Tokens, not magic numbers. Same token names every project (
--bg,--fg,--accent,--cols,--gap,--text-*,--dur*,--curve*). - Grid is the layout. Every
.sectionsits onrepeat(var(--cols), minmax(0, 1fr)). - CSS first, JS when worth it. Radios +
:checked/:has(),<details>,:target, view transitions. JS = smalldeferfile inscripts/, no inline JS, page works without it. - Motion is fast, minimal and optional. Follow
techboi-motion: ≤ 300ms, one axis, hovers in@media (hover: hover), movement only inprefers-reduced-motion: no-preference. - Accessible by default. Visible
:focus-visible, contrast ≥ 4.5:1, labels on every input, unique ids. - Semantic HTML, no cards inside cards, comments explain why.
Before hand-in
Run the techboi-web-validation skill (automatic check.sh + W3C validators + manual browser checks).
keep it where your ai can reach it.
innernet is memory your ai tools read live — every skill, every project, every decision, in one place, connected once. save this skill to yours, or publish one of your own as a link like this.