CSS Latte Art: Module 6

← Dashboard
Module 6: The Modern Garnish

New CSS Features

Aspect ratio for perfect media shapes, clamp() and calc() for fluid typography, and custom cursors for unique interactions.

/* Aspect ratio - keep media in shape */
aspect-ratio: 16 / 9;

/* Fluid typography - scales with viewport */
font-size: clamp(1rem, 2vw + 1rem, 2rem);

/* Math in CSS */
width: calc(100% - 2rem);

/* Custom cursor */
cursor: url('cup.svg'), pointer;

clamp() in Action

This text scales between 1rem and 1.5rem based on viewport width.

Pro Tip

clamp(min, preferred, max) — preferred often uses vw for fluid scaling.

Aspect Ratio

Replaces padding-bottom hack for 16:9 video containers.