Best For
GitHub style / GitHub design system / Primer design system
GitHub 风格
GitHub design language style with clean interface hierarchy, a refined grayscale system, blue interactive color, monospace code fonts, and developer-friendly information architecture.
Best For
GitHub style / GitHub design system / Primer design system
Primary Move
Use GitHub blue #0969da as the primary interaction color
Watch Out
Do not use gradient backgrounds or colorful decorations
AI Implementation
Use the Hard Prompt by default to generate UI. Use the Design Spec to understand, modify, and review the style. Use the Creative Brief for early exploration.
Use this by default: copy it, append the concrete requirement, and let AI generate consistent production UI.
When to use
How to use
STYLEKIT_STYLE_REFERENCE
style_name: GitHub Style
style_slug: github-style
style_source: /styles/github-style
# Hard Prompt
## When To Use
Use this when you want AI to generate code with strict style consistency. It is the safest default for production UI.
## How To Use
- Copy the full prompt into ChatGPT, Claude, Cursor, or another coding assistant.
- Append the concrete product/page requirement after the prompt.
- After generation, check the forbidden rules and interaction states before accepting the output.
Strictly follow the style rules below and maintain consistency. No style drift allowed.
## Requirements
- Prioritize style consistency first, then creative extension.
- When conflicts arise, treat prohibitions as the highest priority.
- Self-check before output: verify colors, typography, spacing, and interactions still match this style.
## Style Rules
You are a GitHub Style design frontend development expert. All generated code must strictly follow these constraints:
## Absolutely Forbidden
- Gradient backgrounds bg-gradient-*
- Large rounded corners rounded-2xl, rounded-3xl (except avatars)
- Heavy shadows shadow-lg, shadow-xl
- Non-semantic decorative colors
- Serif fonts
- Oversized fonts or overly wide spacing
- Dynamic flashy animations
## Must Follow
- Blue #0969da as the primary interaction color
- Backgrounds: #ffffff, #f6f8fa
- Text: #1f2328 (primary), #656d76 (secondary)
- Borders: border-[#d0d7de]
- Rounded corners: rounded-md (6px)
- Code: font-mono bg-[#f6f8fa]
## Semantic Functional Colors
- Success/merge: #1f883d (green)
- Warning/pending: #9a6700 (yellow)
- Danger/delete: #cf222e (red)
- Interaction/link: #0969da (blue)
## Color Palette
Grayscale system:
- Text: #1f2328
- Secondary text: #656d76
- Light text: #8b949e
- Border: #d0d7de
- Light background: #f6f8fa
- Background: #ffffff
- Dark navigation: #24292f
## Animation & Interaction Rules
- Extreme Utility: Interactions prioritize state expression, avoiding eye-catching displacement/scaling effects. Duration kept at 75 to 150.
- Micro-Tactility: Button press provides only slight confirmation (e.g., active:scale-[0.98] + background darkening), not overly skeuomorphic.
- A11y Focus Rings: Focus state must provide clear ring (focus:ring-4 + brand blue/green transparency), not just border color change.
- Subtle Borders: Card hover primarily adjusts background and border shade, not using obvious shadows.
## Self-Check
After each code generation, verify:
1. No gradients used
2. Rounded corners consistently rounded-md
3. Shadows extremely light or none
4. Colors used with correct semantics
5. Overall feel is clean and professional
## Absolute Bans (Match and Refuse)
If any of the following patterns appear, it is a style violation — rewrite without exception.
- use gradient backgrounds or colorful decorations
- use large rounded corners rounded-2xl, rounded-full (except for avatars)
- use heavy shadows shadow-lg, shadow-xl
- use non-semantic decorative colors
- use serif fonts
- use oversized fonts or overly wide spacing
- use dynamic, flashy animation effects
## Self-Check (Verify Before Shipping)
If any item fails, the style has drifted — fix before shipping.
- [ ] No purple-to-blue gradients
- [ ] No overused fonts (Inter, Roboto, Geist, Fraunces, Plus Jakarta Sans)
- [ ] No nested cards (cards inside cards)
- [ ] No gray text on colored backgrounds
- [ ] Body text contrast meets WCAG AA (>= 4.5:1)
- [ ] No bounce or elastic easing curves
- [ ] Animations have a prefers-reduced-motion fallback
- [ ] Body text line length capped at 65-75 characters
- [ ] No side-stripe accent borders (border-left/right > 1px)
- [ ] No gradient text (background-clip: text)
- [ ] No glassmorphism used as the default surface treatment
- [ ] No tiny uppercase tracked eyebrow labels above every section heading
- [ ] do not use gradient backgrounds or colorful decorations
- [ ] do not use large rounded corners rounded-2xl, rounded-full (except for avatars)
- [ ] do not use heavy shadows shadow-lg, shadow-xl
- [ ] do not use non-semantic decorative colors
- [ ] do not use serif fontsComponent Templates
GitHub 风格按钮,强调克制反馈与可访问聚焦
Frontend Readiness
This layer tracks whether the style is ready for real websites: theme modes, state feedback, keyboard access, and performance constraints.
Overall
51%
Fallback
Dark Mode
0%
MissingUI States
79%
PartialMotion
70%
PartialA11y
70%
PartialPerformance
35%
FallbackButton
Default / Hover / Focus Visible / Active / Disabled
Input
Default / Hover / Focus Visible / Disabled / Error
Card
Default / Hover / Focus Visible / Loading / Skeleton
Form
Default / Focus Visible / Disabled / Loading / Error
FAQ
/* GitHub Style 全局样式 */
:root {
--gh-blue: #0969da;
--gh-green: #1f883d;
--gh-yellow: #9a6700;
--gh-red: #cf222e;
--gh-fg: #1f2328;
--gh-fg-muted: #656d76;
--gh-bg: #ffffff;
--gh-bg-subtle: #f6f8fa;
--gh-border: #d0d7de;
--gh-nav-bg: #24292f;
}
/* 基础文字样式 */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
color: var(--gh-fg);
line-height: 1.5;
font-size: 14px;
}
/* 代码块 */
.gh-code {
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 85%;
background: var(--gh-bg-subtle);
border-radius: 6px;
padding: 0.2em 0.4em;
}
/* 仓库名称链接 */
.gh-repo-link {
color: var(--gh-blue);
font-weight: 600;
text-decoration: none;
}
.gh-repo-link:hover {
text-decoration: underline;
}
/* 标签/徽章 */
.gh-label {
display: inline-block;
padding: 0 7px;
font-size: 12px;
font-weight: 500;
line-height: 18px;
border: 1px solid transparent;
border-radius: 2em;
}
/* 分隔线 */
.gh-divider {
border: none;
border-top: 1px solid var(--gh-border);
margin: 1rem 0;
}
@keyframes github-style-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes github-style-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.7; }
}
.github-style-card {
position: relative;
overflow: hidden;
}
.github-style-card::before {
content: "";
position: absolute;
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
background: linear-gradient(135deg, rgba(9, 105, 218, 0.05), transparent);
pointer-events: none;
}
.github-style-card:hover::before {
opacity: 1;
}
.github-style-gradient {
background: linear-gradient(135deg, #0969da, #1f883d);
}
.github-style-gradient-text {
background: linear-gradient(135deg, #0969da, #1f883d);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.github-style-frosted {
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
background: rgba(9, 105, 218, 0.08);
}
.github-style-accent-corner {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), calc(100% - 2rem) 100%, 0 100%);
}
.github-style-animate-in {
animation: github-style-fade-in 0.5s ease-out both;
}IDE Integration
Download configuration files for AI coding assistants to generate code in this style.
Style Pack
Get complete machine-readable style assets including design tokens, Tailwind presets, CSS variables, and shadcn/ui themes.
Metadata
Style metadata including version information
Design Tokens
Compatible with Figma / Style Dictionary / Tokens Studio
Tailwind Preset
Tailwind CSS theme preset, import directly in config
Global CSS
CSS variables and base styles
shadcn Theme
shadcn/ui theme configuration
CSS Variables
Pure CSS variables, works with any project
SKILL.md
Loadable skill pack for Cursor / Claude Code / VS Code
GitHub Style is a design language originating from the GitHub platform, providing clear, efficient, and distraction-free working interfaces for tens of millions of developers worldwide. Its design philosophy is "let the content speak."
WCAG 2.1 compliance analysis based on color contrast and typography readability.
Overall Score
Grade: D - Poor
Contrast Ratios
| Context | Colors | Ratio | AA | AAA |
|---|---|---|---|---|
| Text on background | /#1f2328 / #ffffff | 15.8:1 | ||
| Secondary text on background | /#656d76 / #ffffff | 5.25:1 | ||
| Muted text on background | /#8b949e / #ffffff | 3.08:1 | ||
| Text on secondary background | /#1f2328 / #f6f8fa | 14.84:1 | ||
| Secondary text on secondary | /#656d76 / #f6f8fa | 4.93:1 | ||
| Button primary | /#ffffff / #1f883d | 4.52:1 | ||
| Text on accent 1 | /#1f2328 / #0969da | 3.04:1 | ||
| Alt text on accent 1 | /#656d76 / #0969da | 1.01:1 | ||
| Text on accent 2 | /#1f2328 / #1f883d | 3.5:1 | ||
| Alt text on accent 2 | /#656d76 / #1f883d | 1.16:1 | ||
| Text on accent 3 | /#1f2328 / #cf222e | 2.95:1 | ||
| Alt text on accent 3 | /#656d76 / #cf222e | 1.02:1 |
Readability
Score
63/100
Font Size
text-sm
Font Weight
font-semibold text-[#1f2328]
Line Height
default
Scoring is based on WCAG 2.1 standards. AA requires 4.5:1 contrast for normal text, 3:1 for large text; AAA requires 7:1 for normal text, 4.5:1 for large text.
Design Recipes
These curated recipes combine this style with layouts and animations, optimized for specific use cases.