GitLab Docs DESIGN.md 設計系統與風格指南
Developer ToolsProv1.0.0 (最新)Documentation for the GitLab DevOps platform: white reading pages under a charcoal hero panel lit by soft violet and tanuki auras, with hairline borders instead of shadows.
你可以免費閱讀 GitLab Docs 的完整設計敘述與最多 8 色主色票。升級 Pro 即可取得全部 147 個設計 Token、完整 DESIGN.md 原始檔下載與 1 個歷史版本。
升級 DesignMD Pro,將所有色彩複製為 :root CSS variables、檢視元件 Token 引用關係,並下載完整原始檔。
設計指南
Overview
GitLab Docs is the documentation front end for GitLab, built on the company's own Pajamas design system. It reads as a technical library, not a marketing site: a single search hero at the top, then an endless, calm column of white reading pages broken up by card grids and code blocks. The personality is precise, unshowy and generous with whitespace — a system that wants to be scanned and trusted rather than admired.
The one moment of theatre is the hero panel. It is a charcoal (#171321) rounded slab,
1376px wide with a 32px radius, floating above the white page on a soft violet shadow
(0 8px 40px rgba(54,35,102,0.1), 0 20px 20px -20px rgba(54,35,102,0.3)). Inside it, four
large radial auras — two violet #2f2a6b, one orchid #bb7cb3, one GitLab tanuki orange
#fca326 — bleed out from the corners at 50–80% opacity, so the panel shifts from indigo
at the top-left to warm amber at the bottom-right. "Find GitLab answers fast" sits in
64px weight-600 white over it.
Below the hero the palette collapses to almost nothing: white pages, ink #3a383d body
copy, #18171d headings, blue #2f5ca0 links, #f7f7f5 code and callout panels, and
#dcdbd9 hairlines. Colour returns only as small accents — the purple release banner,
the pastel reference-architecture cards, and the five rotating icon tiles that open each
"Get started" card. Density is moderate and deliberately even: 16px body text at a 1.6
line-height inside an 832px measure, with a 272px sidebar and a right-hand table of
contents bracketing it.
The audience is GitLab users and administrators — developers, SREs, and people evaluating a self-managed install — so the design optimises for findability and long-session reading comfort over brand expression.
Colors
The system is Pajamas, and it is almost entirely neutral. One charcoal, one brand purple, one tanuki orange, and a long neutral ramp do everything.
- Primary — Charcoal
#171321(--gl-color-brand-charcoal): the hero panel fill and the primary button fill. It is also the text colour of the CTA label's hover state. On white it measures 18.2:1, which is why it can carry 14px button text comfortably. - On-primary —
#ffffff(--gl-color-brand-white): CTA labels, footer links, the hero headline, and the icon inside every icon tile. - Primary-container — Deep Violet
#493c83: the release banner across the very top of the page ("GitLab 19.6 has landed. See what's new"). White text on it reads at 9.3:1. - Secondary — Brand Purple
#7759c2: the icon tile behind the "Use GitLab" card, an 8px-radius square with 8px of padding. It also appears as one of the hero's aura colours in a lighter#a989f5. - Secondary-container — Lilac
#dcd1fc: the default fill of the reference-architecture cards (1,000 / 2,000 / 3,000 users). Ink text on it measures 8.0:1. - Tertiary — Tanuki Orange
#fca326: GitLab's signature orange. It is one of the hero auras, and it is the underline that animates under the hero's quick links ("Get started", "CI/CD reference", "SSH keys", "Personal access tokens", "Common Git commands"). Charcoal on it reads at 9.0:1. - Tertiary-container —
#f6f3fe: the selected state of a reference-architecture card, swapping in for the lilac default. - Accent tiles — Orchid
#bb7cb3, Apricot#e1986d, Dusty Rose#cd8d8d: the remaining three of the five rotating icon-tile colours, cycling through the eight "Get started" cards. - Surface —
#ffffffand Surface-dim —#f7f7f5: the page background, and the fill of code blocks, callouts, the "Tier / Offering" availability strip, and hovered cards. - Surface-strong —
#ecebea: the hover and active background of sidebar navigation items. - Surface-inverse —
#28272d: the footer band. White links on it read at 14.8:1. - On-surface — Ink
#3a383d: all body copy, list items and default button labels. - On-surface-variant — Grey
#646163: breadcrumbs and secondary metadata. - On-surface-heading —
#18171d: every heading from h1 to h5, one step darker than body text. - Outline —
#dcdbd9and Outline-variant —#c1bfbe: card and code-block hairlines, and the 1px borders on default buttons and inputs respectively. - Link —
#2f5ca0: inline links inside prose, and inlinecodespans. - Error —
#c02f12: the system's danger colour for alerts and validation.
There is no dark theme on these pages: the stylesheet ships a syntax-dark.css and a full
set of dark token values, but nothing was activated during capture, so no dark tokens are
recorded here.
Typography
One family carries the whole product: GitLab Sans, self-hosted as a variable woff2
covering weights 100–900, with a -apple-system / Segoe UI / Roboto fallback chain.
GitLab Mono (also variable) carries all code. There is no display face and no second
sans.
Hierarchy comes from size and a single weight. Every heading — h1 through h5 — is
weight 600, and they step down cleanly: 40px (page title), 32px, 24px, 18px, 16px, at
line-heights of 1.15 / 1.25 / 1.25 / 1.25 / 1.4. The hero headline is the one outlier at
64px, still weight 600, still white. Body copy is 16px/400 at a 1.6 line-height; the
homepage lead paragraphs step up to 24px; small print, breadcrumbs and footer links drop
to 14px and 12px. Nothing is italicised in the interface, and letter-spacing is left at
normal everywhere — the type does its work through size contrast alone.
Code is where the second family shows up. Inline code is GitLab Mono at 12.25px on a
#ecebea chip with a 4px radius; fenced blocks are GitLab Mono at 14px on #f7f7f5.
Syntax highlighting uses the bundled Chroma palette: keywords in green, strings in
#ba2121, comments in italic #408080, numbers and operators in #666666, class and
function names in #0000ff.
Layout
A three-column reading shell. The content column is capped at 52rem (832px) with a 22rem minimum; a 17rem (272px) sidebar sits to its left and a table of contents to its right. The page container is 86rem (1376px), centred, and the header is 4rem tall on mobile and 7rem on desktop. The footer is a fixed 21rem band. Section rhythm is 60px, and the hero's inner container is capped at 55rem (880px) so the search field never stretches to the panel's full width.
Vertical spacing runs on a 4px-based scale — 4, 8, 12, 16, 24, 32, 48 — with 20px as the standard card padding and 40px as the gutter. Cards are laid out in responsive grids of one, two, three or four columns; the "Get started" grid is three-across on desktop.
The homepage is the exception to the reading shell: it is a landing page with the hero panel, a five-link quick-link row, an eight-card icon grid, a reference-architecture strip, and an install-methods grid, all stacked full-bleed. The documentation pages drop straight into sidebar / breadcrumb / content / TOC.
Elevation & Depth
Depth is almost entirely absent, and that is deliberate — this is a reading surface.
- One real shadow in the system: the hero panel's
0 8px 40px rgba(54,35,102,0.1), 0 20px 20px -20px rgba(54,35,102,0.3). It is violet-tinted rather than black, which is what keeps the charcoal slab from looking like a heavy block on a white page. - Everywhere else, separation is a 1px hairline —
#dcdbd9on cards and code blocks,#c1bfbeon buttons and inputs. Inputs and some buttons use an inset 1px ring (0 0 0 1px) instead of a border so the control never changes size on focus. - Focus is a 2px outline with a 4px offset, never a glow and never a ring that eats layout. Inside the hero the ring is brand white; outside it, the system focus colour.
- Cards lift by changing fill, not by casting shadow: hovering a card swaps
#fffffffor#f7f7f5and slides the arrow glyph in its title from-50%to0.
Shapes
Uniformly soft. 8px is the system radius and it is used for buttons, inputs, cards,
code blocks, callouts and the icon tiles. 4px is the smaller sibling, used for inline
code chips, the sidebar's active indicator and the footer's focus ring. 32px is
reserved for the hero panel — the only large architectural radius in the product. Pills
use 9999px (the hero search field), and circular avatars use 50%. Nothing is fully
square, and no component uses a radius larger than the hero.
Motion & Micro-interaction
Motion is short, eased and functional. There is exactly one curve and one duration.
- State change — 200ms
cubic-bezier(0.22, 0.61, 0.36, 1): every colour transition in the system —color,background-color,border-color,box-shadow,text-decoration-color— runs on this single easing, which is a fast-out, slow-in curve. It makes hover feedback feel immediate without being snappy. - Control feedback — 150ms
ease-in-out: the slightly quicker border/shadow transition on form controls. - Underline swap — 400ms
ease: the hero's quick links carry two stacked underlines, a tanuki one and a red→purple→blue gradient one. On hover the tanuki underline'sbackground-sizeanimates to0 1pxwhile the gradient's animates to100% 1px, so one line slides out as the other slides in. - Card affordance — 200ms: the arrow glyph after a card title translates in and
darkens on hover, and the card fill shifts to
#f7f7f5. - Focus rings appear instantly — no transition, no fade.
Nothing scrolls, nothing parallaxes, and no keyframe animation runs on the marketing or documentation surfaces without a user action behind it.
Voice & Content Strategy
- Tone of voice: plain, declarative and technical. The copy states what a thing is and what it does, in as few words as possible — "Get to know the GitLab end-to-end workflow." — and never oversells. Where a little warmth appears it is dry and British: "You've got options. See them all".
- Capitalization: sentence case everywhere, including headings ("Get started with GitLab", "Reference architectures", "Install GitLab Self-Managed"). Buttons are sentence case too, never uppercase and never Title Case.
- Terminology: the product is "GitLab", the docs are "GitLab Docs", the configuration
file is always the literal
.gitlab-ci.ymlset in monospace, and tiers are named "Free, Premium, Ultimate". Installation methods are "Linux package", "Helm chart", "the Operator", "Docker", "Self-compile", "cloud provider". - Button and action labels: verb-first and specific — "Get free trial", "Edit this page", "Copy for LLM", "Allow all", "Confirm my choices". No generic "Submit" or "Click here".
- Search and empty states: the hero search placeholder doubles as documentation of scope: "Search topics, API and CI/CD reference". Loading and error states are handled by the underlying Pajamas components rather than bespoke copy.
- Numbers, dates, and units: reference architectures are labelled by user count with thin-space grouping ("1,000 users", "25,000 users"); releases are versioned "19.7", "19.6"; file names and code identifiers are always monospaced and never translated.
Components
Primary button (.btn-confirm)
32px tall, 8px radius, charcoal #171321 fill, white 14px/400 label, 12px horizontal
padding, and a 1px inset charcoal ring so the silhouette never shifts on focus. Hover
darkens the fill to #28272d over 200ms; nothing else changes — no shadow, no scale, no
border swap. This is the "Get free trial" button in the header.
Default button
The same 32px × 8px geometry on a white fill with a 1px #c1bfbe border and #3a383d
label. Used for "What's new?", "English", the version selector, "Edit this page" and
"Copy for LLM". Hover fills #f7f7f5. When several sit together they merge into a segmented
control — "Copy for LLM" and its dropdown chevron share one 8px-radius shell with only the
outer corners rounded.
Icon tile
A 40px square, 8px radius, holding a white line glyph. Five colours rotate through the
eight "Get started" cards — brand purple #7759c2, tanuki #fca326, orchid #bb7cb3,
apricot #e1986d and dusty rose #cd8d8d — with 8px of padding inside the tile. The tile
is the only place the interface uses saturated colour at any size.
Card
White fill, 1px #dcdbd9 border, 8px radius, 20px padding. A 16px/600 #18171d title
with 4px below it, then 16px/400 #3a383d body copy. On hover the fill becomes #f7f7f5,
the title's trailing arrow glyph translates from -50% to 0 and darkens to full ink, all
over 200ms. Focus-visible draws a 2px outline at 4px offset.
Reference-architecture card
A wider, shorter card that leads with a number: "1,000 users" in 16px/600 over an 8px
label, with a right-pointing arrow. Default fill is lilac #dcd1fc; the selected or
current card swaps to #f6f3fe. Six of them sit in a single row on desktop.
Search input
Two sizes. The header search is 32px tall with an 8px radius, a 1px inset ring and 8px
padding. The hero search is 52px tall, fully pill-shaped at 9999px, 800px wide, with
16px padding and a 16px label — the largest input in the system and the visual anchor of
the hero panel.
Sidebar navigation item
16px/400 #3a383d links with 8px vertical padding in a 272px rail. Hover and the active
item both fill #ecebea; the active item additionally grows a 3px × 20px charcoal bar at
its left edge, inset 6px, vertically centred. Section headers ("Tutorials", "Release
notes") are 12px grey with a chevron.
Code block
A #f7f7f5 panel with a 1px #dcdbd9 border, 8px radius, 20px horizontal and 16px
vertical padding. Body is GitLab Mono at 14px in #3a383d. A copy button sits in the
top-right corner; its tooltip is a 4px-radius dark chip that fades in on hover and focus.
Inline code
GitLab Mono at 12.25px on a #ecebea chip with a 4px radius and 2px padding, coloured
#2f5ca0 when it appears inside a link and #3a383d otherwise.
Callout / availability strip
A #f7f7f5 panel, 8px radius, 1px #dcdbd9 border, 16px padding, carrying "Tier: Free,
Premium, Ultimate" and "Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated" in
14px/400. Consecutive callouts stack with the shared border collapsed and only the outer
corners rounded.
Release banner
A full-bleed #493c83 bar above the header, 12px vertical padding, white 14px text, with
the link underlined and an X dismiss button at the right.
Footer
A full-bleed #28272d band, 60px vertical padding, four columns — Company, Feedback,
Help & Community, Resources. Column titles are 16px white; links are 14px white; social
glyphs are 16px masked icons. The GitLab tanuki logo and the "GitLab Docs" wordmark sit
above the columns, and a "Cookie Preferences" link closes the list.
Do's and Don'ts
- Do use charcoal
#171321for exactly one primary action per view, and keep#28272das its only hover state. - Don't introduce a second brand colour. Purple
#7759c2and tanuki#fca326are accents for tiles, banners and underlines — never for body text or large fills. - Do set every corner to 8px. Reserve 32px for the hero panel and 9999px for pills; don't invent a new radius.
- Don't reach for shadows. One violet-tinted shadow exists (the hero); everything else
separates with a 1px
#dcdbd9hairline or a fill change to#f7f7f5. - Do keep every heading at weight 600 and let size alone carry hierarchy — 40 / 32 / 24 / 18 / 16px. Don't add weight contrast or letter-spacing to headings.
- Do animate colour changes on
200ms cubic-bezier(0.22, 0.61, 0.36, 1)and nothing else; don't animate layout properties or introduce a second easing. - Do write headings, body and buttons in sentence case; don't uppercase or title-case interface labels.
- Do keep body copy at 16px with a 1.6 line-height inside an 832px measure, and set file names and identifiers in GitLab Mono.
- Don't restyle the third-party consent dialog — its palette and controls belong to the consent platform, not to Pajamas.
- Do use the 2px outline at 4px offset for focus, and switch the ring to brand white when the focused control sits inside the charcoal hero.
如何在 AI Agent 中使用 GitLab Docs 的 DESIGN.md
取得 GitLab Docs 的 DESIGN.md
存取 https://www.designmdpro.app/websites/gitlab-docs.md 或透過 DesignMD Pro MCP 伺服器以 slug "gitlab-docs" 呼叫 get_design_md 工具以取得公開版本。完整 token 集合需訂閱 Pro。
將其儲存為專案根目錄中的 DESIGN.md
將檔案放在 AGENTS.md 或 CLAUDE.md 旁,讓 Claude Code、Cursor、Codex 與其他程式開發 Agent 能夠讀取。
請你的 Agent 遵循該規範
例如:「請依照 DESIGN.md 中的 GitLab Docs 設計系統建構設定頁面,使用其中的色彩、字型與間距 tokens。」
GitLab Docs 風格 AI 提示詞
請依照 GitLab Docs(docs.gitlab.com) 的 DESIGN.md 設計系統,以相同的視覺風格建構一個響應式到達頁。
## 色彩
- link: #2F5CA0
- error: #C02F12
- outline: #DCDBD9
- primary: #171321
- surface: #FFFFFF
- on-error: #FFFFFF
- tertiary: #FCA326
- secondary: #7759C2
## 字型
- body-lg: "GitLab Sans", 24px, weight 400, line-height 1.6
- code-md: "GitLab Mono", 14px, weight 400, line-height 1.6
## 圓角
- md: 8px
- sm: 4px
- xl: 32px
## 規則
- 背景、文字、邊框與強調色僅使用上述色彩,請勿自行發明新顏色。
- 所有文字皆套用上述字型樣式,並維持其字級與字重層級。
- 圓角與間距請取自上述比例尺,確保各元件外觀一致。
完整 DESIGN.md:https://www.designmdpro.app/websites/gitlab-docs.md在 v0 提示詞產生器中自訂 →常見問題
GitLab Docs 的主色是什麼?
GitLab Docs 的品牌主色為 黑色(#171321),其 DESIGN.md 共定義了 26 個色彩 tokens。
GitLab Docs 使用什麼字型?
GitLab Docs 的主要字型為 GitLab Sans 與 GitLab Mono。
如何在 Tailwind CSS 或 shadcn/ui 中使用 GitLab Docs 的 design tokens?
本頁已公開 GitLab Docs 的主色(#171321)。產生完整的 Tailwind 或 shadcn 主題需要完整的 DESIGN.md,可透過 DesignMD Pro 取得。
這份 GitLab Docs DESIGN.md 是官方發布的嗎?
不是。此檔案由 DesignMD Pro 擷取自公開的 docs.gitlab.com 網站,與 GitLab Docs 無任何關聯亦未獲其背書。
GitLab Docs 的 DESIGN.md 最後一次更新是什麼時候?
版本 1.0.0 擷取於 2026年12月2日。
GitLab Docs 及其商標均歸各自所有者所有。DesignMD Pro 為獨立專案,與 GitLab Docs 無任何關聯亦未獲其背書;此 DESIGN.md 擷取自公開網站,僅供參考。