{/* TODO: Fix old docs deploy & get working link
Looking for the old docs site? Find it here.
Our goal is to create a system that enables us to build consistent user experiences with ease, yet with enough flexibility to support the broad spectrum of GitHub websites. This goal is embedded in our design and code decisions. Our approach to CSS is influenced by Object Oriented CSS principles, functional CSS, and BEM architecture.
Styles can be mixed and matched to achieve many different layouts, independent of their location. These styles fall into two categories:
Primer CSS is built upon systems that form the foundation of our styles such as spacing, typography, and color. This systematic approach helps ensure our styles are consistent and interoperable with each other.

Font size and line-height options work together to result in more sensible numbers. Font styles come in a range of weights and sizes so that we can style appropriately for content and readability. Type utilities allow us to change the visual styles while keeping markup semantic.
Primer CSS is published to npm as @primer/css
. Each of Primer CSS's "modules" lives in a subfolder under src/
with an index.scss
in it. Generally speaking, the styles are divided into three primary themes:
- Core styles (in
core/
) are common dependencies, which include support variables, native element and typography styles, buttons, navigation, tooltips, etc. - Product styles (in
product/
) are specific to github.com, and include components such as avatars, labels, markdown styles, popovers, and progress indicators. - Marketing styles (in
marketing/
) are specific to GitHub marketing efforts, including international and event-focused sites as well as the more design-heavy feature pages on github.com. Marketing styles include new colors and button styles, and extend the core typography and whitespace scales.