astro-scss-best-practices
OfficialScalable SCSS best practices for Astro projects.
Software Engineering#astro#scss#design-tokens#css-modules#component-styling#frontend-best-practices#namespaced-imports
Authorfirstsun-dev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This guide enforces scalable, maintainable styling in Astro projects by mandating component-scoped SCSS modules, namespaced imports, and design-token usage, reducing CSS collisions and confusion.
Core Features & Use Cases
- Use SCSS Modules for all components and co-locate ComponentName.module.scss alongside each component.
- Enforce namespaced imports with @use to import tokens and mixins, preventing namespace pollution.
- Promote design tokens via CSS variables (var(--...)) for colors, spacing, and typography to ensure consistency.
- Encourage component isolation by extracting repeated patterns into reusable components and limiting global styles.
Quick Start
Apply these practices when creating or refactoring Astro components by replacing global styles with component-scoped SCSS modules and using namespaced tokens.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: astro-scss-best-practices Download link: https://github.com/firstsun-dev/yao-agent-skills/archive/main.zip#astro-scss-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.