{# canonical_base is the OWNING tenant's origin: all 16 Peasy domains serve the same catalogue, so a page rendered by a non-owner points its canonical at the owner instead of competing with it. Falls back to this site for static/self-owned pages. #}
🍋
Menu
CSS

Viewport Unit

CSS Viewport Unit

Length units relative to the browser viewport dimensions: vw, vh, vmin, vmax, dvh, svh.

Teknik Detay

The Viewport Unit layout algorithm distributes space along a main axis and aligns items along the cross axis. Key properties: flex-grow (expansion ratio), flex-shrink (shrinking ratio), and flex-basis (initial size before distribution). The shorthand 'flex: 1' expands to 'flex: 1 1 0%'. Gap property replaces margin hacks for spacing. Flexbox excels at navigation bars, card rows, centering content, and any layout where items share a single axis.

Ornek

```css
/* Example: Viewport Unit */
.element {
  /* Apply viewport unit to this element */
  display: block;
  margin: 0 auto;
}
```

Ilgili Araclar

Ilgili Terimler