Codelessly Documentation
  • 👋Getting Started
    • ▶️Welcome Setup Guide
    • 🎉Thank you for your purchase!
    • 🔀Import Figma designs into Codelessly
    • 🖨️Publish your design as a website
  • ⚡Editor Basics
    • Start a New Project
    • Editor Tools
    • Creating Your First Layout
    • Using Components
    • Working with Size Fits
  • ⚡Advanced Editor Usage
    • Working with Variants
    • Using External Components
    • Size Fits Settings
  • ☁️Codelessly CloudUI™
    • 3-Minute Quick Start
    • Connecting Data
    • Calling Functions
  • Setting Up Custom Domains
    • Linking with Github Repository
    • Deploy on Netlify
    • Deploy on Vercel
Powered by GitBook
On this page
  • Fixed Size
  • Fill Parent
  • Wrap Content

Was this helpful?

  1. Editor Basics

Working with Size Fits

Learn the concept of Size Fits and its role in responsiveness.

PreviousUsing ComponentsNextWorking with Variants

Last updated 10 months ago

Was this helpful?

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.

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.

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

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.

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

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.

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

⚡