# Working with Size Fits

Size Fits form the basis of Codelessly's auto-layout system. It's a fundamental concept that helps you achieve that pixel-perfect responsiveness.

To summarize, Size Fits let you define how a node **fits** inside a frame, row, or column. Whether it takes up all the available space or wraps around its children, taking the minimum space possible. Or, you can even provide it a fixed size manually.

Size Fits can be defined per axis, **horizontal** and **vertical**. Simply select the desired Size Fit from the dropdown, or, use the *Size Fit Selector*.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FJo9QGZTakEZPexRsxoGt%2FSelecting%20Size%20Fits.gif?alt=media&#x26;token=359c8396-9356-4f78-83a0-2086184389da" alt=""><figcaption></figcaption></figure>

## Fixed Size

By default, nodes are **fixed in size**. This means that they do not adjust their size according to the parent layout.

So, if a node is fixed size on the horizontal axis, it retains its width.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FEN3dSVUxKOGGt5vydLDN%2FFixed%20in%20row.gif?alt=media&#x26;token=af0a1643-fec0-4b44-bfe1-45090a6e1847" alt=""><figcaption></figcaption></figure>

If a node is fixed size on the vertical axis, it retains its height.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FKBjou9VyAuuEuhpt4KN9%2FFixed%20in%20column.gif?alt=media&#x26;token=809278c4-d080-4628-9828-90f7bd661d13" alt=""><figcaption></figcaption></figure>

## Fill Parent

This fit expands the node to the size of its direct parent.

So, if a node is set to fill parent on the horizontal axis, it expands its width to that of its parent.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FkJcPdjtdljhrsgVc37fc%2FFill%20in%20row.gif?alt=media&#x26;token=3274decc-52e6-4d2d-905b-bd6ec12411a9" alt=""><figcaption></figcaption></figure>

If a node is set to fill parent on the vertical axis, it expands its height to that of its parent.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FewOO7FUOpwR6T4CbKzsn%2FFill%20in%20column.gif?alt=media&#x26;token=f139f7f8-2bb0-42f5-a3d5-74cf12fcb5ad" alt=""><figcaption></figcaption></figure>

## Wrap Content

Contrary to ***fill parent***, this fit depends on a node's children rather than its parent. If a node has children, ***wrap content*** sets the node's dimensions to that of its children.

So, if a node wraps content horizontally, its width shrinks to that of its children.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FTTKLS9b2zA4fPupRShNP%2FWrap%20row.gif?alt=media&#x26;token=acda7783-0e54-46e9-9426-eb6a8b10c922" alt=""><figcaption></figcaption></figure>

If a node wraps content vertically, its height shrinks to that of its children.

<figure><img src="https://3474078512-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx4NeiXalJWaOaV6tsK5f%2Fuploads%2FDACtXvsWpAttQA21dF6S%2FWrap%20column.gif?alt=media&#x26;token=4aca5785-1636-4671-ba42-b58bc4007fbc" alt=""><figcaption></figcaption></figure>
