Primer CSS is the stylesheet layer of GitHub's Primer design system, distributed as @primer/css. Source files use Sass SCSS syntax for utilities and component styling in web projects.
Overview
Primer CSS implements the visual foundation of GitHub's Primer design system as installable stylesheets. Consumers add @primer/css through npm and import Sass modules into their build, either the full bundle or individual Primer packages from the distribution.
The project is maintained in keep-the-lights-on mode: existing utility classes remain available where needed, while richer patterns that combine markup and styling are directed toward Primer React or Primer view components. Documentation on primer.style covers components, themes, principles, and usage guidance.
Sass include paths must reach node_modules so @import or @use can pull Primer partials. Teams already on GitHub's design language use this package to align spacing, typography, color, and component classes without reimplementing the system. Development and release processes are documented for maintainers but do not affect how downstream apps consume the published npm artifact.
Key features
- Primer design system CSS modules
- Sass SCSS source distribution
- Full or modular package imports
- npm @primer/css packaging
- Utility-oriented class vocabulary
- primer.style documentation site
- GitHub-aligned component styling
- KTLO maintenance mode
Use cases
- Styling apps with Primer utilities
- Aligning internal tools with GitHub UI
- Importing selective Primer Sass modules
- Migrating legacy Primer class usage
- Design system consistency in static sites