| version | alpha | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | GitHub @ CSI Primer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description | A focused, content-first GitHub resource hub built with Primer. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| colors |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typography |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rounded |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| spacing |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| components |
|
GitHub @ CSI is a focused documentation and resource experience, not a marketing microsite. It should feel immediately familiar to people who use GitHub: restrained, information-dense, readable, and predictable.
Primer is the design authority. Use Primer React for supported interactive components, Primer Primitives for semantic design tokens, and Octicons for interface iconography. Project CSS exists only to compose the README-driven page shell and content patterns that Primer does not provide.
The YAML values above are light-mode references for tools that consume the DESIGN.md format. Runtime code must use Primer's functional CSS variables so the same roles adapt correctly across light and dark themes.
Use functional color roles such as --bgColor-default,
--bgColor-muted, --fgColor-default, --fgColor-muted,
--fgColor-accent, --borderColor-default, and
--focus-outlineColor. Never use Primer base color scales directly.
- Default and muted neutrals carry almost all surfaces and text.
- Accent blue is reserved for links, focus, selected navigation, and primary informational actions. It is not decorative.
- Success, attention, danger, and done colors communicate state. Pair color with text or an Octicon; never communicate status with color alone.
- Emphasis backgrounds must use the matching
--fgColor-onEmphasistext role. - All patterns must work in both the
lightanddarkPrimer themes. - The dark GitHub mark circle is the only fixed brand-color exception.
Follow Primer's color usage guidance when a new semantic role is needed.
Use Primer's system font stacks and functional typography variables. Markdown body copy uses the large body style; controls use medium body; metadata and helper text use small body sparingly.
- Keep paragraphs left aligned and ragged right.
- Keep prose around 80 characters per line. Do not let the main reading column expand simply because the viewport is wide.
- Use weight and spacing for hierarchy before color.
- Page titles use Primer title-large on regular/wide viewports and title-medium on narrow viewports.
- Section titles use Primer title-medium. UI labels use semibold medium or small body styles.
- Centering is limited to the Microsoft/GitHub logo lockup. Resource prose, page headings, tables, and navigation remain left aligned.
Follow Primer's typography guidance.
Use a calm full-page layout capped at Primer's 1280px xlarge breakpoint. Content padding is 16px below xlarge and 24px at xlarge and above.
- Regular and wide viewports use three regions: local navigation, the main reading column, and an auxiliary on-page table of contents.
- When all three regions do not fit, remove the auxiliary TOC first.
- Narrow viewports use one content column. Primary page navigation becomes a horizontally scrollable local-navigation row and the TOC becomes a disclosure above the article.
- The reading column, not side regions, receives remaining width.
- Use Primer breakpoints: 768px for narrow/regular behavior, 1012px for multi-column adjustments, 1280px for xlarge content padding, and 1400px only when a wide-only refinement is necessary.
- Preserve functionality at every viewport. Do not hide the only path to an action or resource.
Follow Primer's layout guidance.
The interface is border-first and nearly flat.
- Use
--borderColor-defaultor--borderColor-mutedto separate regions. - Use
--bgColor-mutedfor subtle grouping. - Use Primer resting shadows only for media or a genuinely raised surface.
- Do not add shadows to routine navigation, tables, callouts, or page sections.
- Avoid decorative gradients and glass effects. Hierarchy should remain clear without them.
- Use Primer's 6px medium radius for controls, active navigation, callouts, and compact containers.
- Use the 12px large radius only for prominent media or feature surfaces.
- Use the full radius only for pills, labels, status badges, the active navigation indicator, and the circular GitHub brand mark.
- Use 1px borders by default. Thicker borders are reserved for focus or a meaningful callout edge.
- Do not invent a new radius for an isolated component.
- Prefer a Primer React component whenever it matches the interaction. Preserve its documented variants, sizing, focus behavior, and semantics.
- Use Octicons through
@primer/octicons-react. Do not draw custom interface SVGs or use emoji as control icons. - Navigation has clear current-page state via
aria-current, accent text, a muted accent background, and an additional non-color indicator. - Buttons and links retain Primer hover, active, focus-visible, disabled, and loading states. External links include an external-link Octicon.
- Tables remain semantic tables, use borders rather than card shadows, and scroll horizontally when they cannot fit a narrow viewport.
- Markdown callouts use a muted semantic background, matching border, and a strong leading edge. They are not interchangeable decorative cards.
- Images retain their natural aspect ratio, never upscale beyond the content region, and use a large radius only when presented as feature media.
- Motion is functional and brief. Honor
prefers-reduced-motion.
Use Primer's component catalog and accessibility guidance before creating custom interaction patterns.
Do
- Read this file before changing UI, CSS, layout, responsive behavior, or visual components.
- Reuse semantic Primer variables and existing project patterns.
- Review every UI change in light and dark modes at narrow, regular, and wide widths.
- Preserve visible focus, keyboard navigation, semantic headings, descriptive links, and reduced-motion support.
- Keep README content readable on GitHub as well as on GitHub Pages.
Don't
- Introduce another component library, icon set, utility-CSS framework, or parallel token system.
- Hard-code light-mode colors where a Primer functional token exists.
- Use base color scales directly or depend on color alone for meaning.
- Put every section in a card, add decorative gradients, or use shadows as the primary hierarchy mechanism.
- center body copy, exceed the readable line length, stretch images, or remove functionality at narrow widths.
- Override Primer component internals when a documented prop or variant can express the intended result.
This file follows the DESIGN.md format: tokens are machine-readable constraints and the prose explains how those roles apply to this repository.