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 three categories. Single-purpose, immutable styles, that do one thing well. Abstracted patterns for frequently used visual styles. 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. The base-8 spacing scale is highly composable and works with the density of GitHub’s content. Margin and padding spacers bring consistency to vertical and horizontal rhythm.
Features
- Highly composable spacing scale
- Customizable typography
- Meaningful color
- Core styles (in core/) are common dependencies
- Use Primer CSS in your project
- Single purpose, immutable styles