FSM Full Stack Masterclass
Platform under construction
CSS course badge

Typography & Visual Style

Intermediate

Border Radius

Border radius changes the shape of corners. It affects tone, hierarchy and how components feel, from sharp and technical to soft and friendly.

:root {
  --radius-card: 24px;
  --radius-pill: 999px;
}

Typography & Visual Style

Border radius is shape language.

border-radius rounds the corners of an element. Small radius feels crisp and utilitarian. Large radius feels soft, friendly or app-like.

Radius should be consistent. A site with random corner values can feel messy even when colors and typography are strong.

Large radius may require overflow control when child images or backgrounds should follow the same shape.

Small radius

Useful for dense tools, inputs and work-focused UI.

Medium radius

Common for cards, panels and modern surfaces.

Full pill

999px creates capsule buttons and badges.

Clipping

overflow hidden can make child media follow the corner shape.

Visual model

Make visual decisions systematic instead of random.

Typography and visual style are where CSS starts to feel like design. These models turn subjective choices into reusable decisions you can explain, test and improve.

4px

Crisp, compact and utilitarian.

12px

Comfortable component shape.

24px

Soft card or hero surface.

999px

Pill controls and badges.

Examples

High-end visual CSS has a reason behind every value.

Consistent radius tokens

:root {
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;
}

Random corner values

.card { border-radius: 17px; }
.button { border-radius: 31px; }
.input { border-radius: 9px 22px 3px 14px; }

Rules that matter

Visual style becomes professional when it becomes repeatable.

A beautiful one-off style is not enough. The goal is a visual system that keeps working when the site grows, content changes and new pages are added.

Create a radius scale

A few reusable values make shapes feel connected.

Match product tone

Sharp corners feel different from soft rounded UI.

Use pills deliberately

Pill shapes work well for buttons, chips and badges.

Clip media carefully

Use overflow hidden when images need to respect card corners.

Avoid random values

Arbitrary radius values are hard to maintain.

Keep nested radius logical

Inner corners usually need less radius than outer containers.

Production thinking

Visual polish must survive real content, real users and real devices.

Why does this matter?

Radius changes the personality of an interface. It is subtle, but users feel the difference immediately.

Accessibility

Radius should not reduce recognizable controls or hide focus outlines. Keep interactive states clear.

Production note

Use radius tokens and document which components use each token.

SEO note

Visual polish does not rank directly, but polished interfaces build trust and reduce friction.

Live code lab

Change the CSS and watch the interface respond.

The preview runs in an isolated iframe. Links and forms stay inside the practice area, so you can experiment without leaving the lesson.

Mini assignment

Try this now.

  • Change --radius-card to 4px and describe the tone shift.
  • Set button radius to 6px and compare it with the badge.
  • Create --radius-md and use it on all three elements.

Practice assignment

Do this before moving to the next lesson.

  1. Define three radius tokens.
  2. Apply them to card, input and button examples.
  3. Explain why each component gets that radius.

Try it yourself

Design a radius scale

Live preview

Self-check

Before you continue, prove that you understand Border Radius.

Intermediate

Answer these questions before moving on. If your answer is vague, change the lab values and judge the visual result again.

  1. Can you explain how radius changes visual tone?
  2. Can you create a reusable radius scale?
  3. Can you use pill radius intentionally?
  4. Can you make child media follow card corners?
  5. Can you avoid random radius values?

Senior audit upgrade

Radius should be a design system value.

Random rounded corners make a product feel stitched together. Tokens keep cards, buttons and inputs related.

Primitive tokens

--radius-1, --radius-2 and --radius-pill define reusable raw values.

Component tokens

A button and a modal may use different radius roles even if values overlap.

Consistency

When radius changes by accident, the UI quickly feels lower quality.

Chapter project

Design a visual style system

Turn fonts, scale, color, backgrounds, gradients, shadows and radius into reusable design choices.

Build

a small visual language with tokens for text, surfaces, accents and depth

Deliverables

  • type scale
  • color tokens
  • surface and depth rules

Quality checks

  • contrast checked
  • radius and shadow tokens consistent
  • visual hierarchy obvious

Review question

Can you explain the product feeling created by your type, color and spacing choices?