Перейти к основному содержимому
← 🎨 CSS as a design system·Модуль B9 · Урок 9
ЗаданиеBuild .footer with display grid, grid-template-columns repeat(auto-fit, minmax(180px, 1fr)), gap var(--space-lg), padding var(--space-2xl) var(--space-lg), background var(--text), color oklch(0.85 0 0). .footer h4 has margin 0 0 var(--space-md), color white, font-size 13px, font-weight 600, text-transform uppercase, letter-spacing 0.05em. .footer ul has list-style none, padding 0, margin 0, display grid, gap 8px. .footer a has color inherit, text-decoration none, font-size 14px. .footer a:hover has color white. Four columns: Brand (with logo + tagline + social), Product (links), Company (links), Legal (links). .footer-bottom has display flex, justify-content space-between, padding var(--space-md) 0, border-top 1px solid white/10, grid-column 1 / -1, color oklch(0.65 0 0), font-size 13px.

Краеугольный камень 9: нижний колонтитул (адаптивный из 4 столбцов)

150 XP10 min
Теория

A site footer that scales

Four columns on desktop: Brand + Product + Company + Legal. On tablet it collapses to two columns; on phone, one column stacked. The same auto-fit grid trick from the pricing capstone handles the reflow — no media queries required.

The one-line responsive grid

grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)). As the viewport shrinks, the grid engine drops columns one-by-one whenever a card can't hold 180px. On a 375px phone that's one column. On a 1280px desktop, four. Zero conditional CSS.

The typography rules that make footers "look pro"

  • Column headers — text-transform: uppercase, letter-spacing: 0.05em, small (13px), colour white. This is the "footer header" visual convention across every SaaS site.
  • Link colour — muted (oklch(0.85 0 0)) by default, brightens to full white on hover. transition: color 0.15s for the polish.
  • Dark background + light muted text — the standard footer palette. Uses var(--text) (your normal dark text colour) as the background to auto-pick the site's darkest neutral.

The bottom bar

A one-liner separated from the columns by border-top: 1px solid oklch(1 0 0 / 0.1) (10% opaque white). Uses grid-column: 1 / -1 to span every column regardless of how many the grid decided to render.

🔒

Зарегистрируйся чтобы кодить

Теория открыта всем. Интерактивный редактор, живой превью и проверка открываются с 7-дневным бесплатным trial — нужна карта, отмена в любое время.

Регистрация — бесплатный trial →

Первые 10 уроков в каждом треке — бесплатные. Карта не нужна.

← НазадСледующий урок →

Получай один совет по Python или веб-разработке — каждый день в почте

Коротко, без воды, без спама. Отписаться — в один клик.