resolve_size
Convert design px values into cia's 4px grid steps and return the matching SCSS function, rem equivalent, and guidance for expressing dimensions in cia code.
Instructions
Snap a design px value to cia's 4px geometric grid. Returns the step number, the SCSS call to emit (cia.grid(n) when exactly on grid; cia.px(value) when off-grid), the equivalent rem, and a human-readable note. AI agents: call this whenever you get a px value from a design tool (Figma, mockup, screenshot) and need to express it in cia code. NEVER write raw rem/px literals when a cia function applies. See /docs/composition for the full decision tree.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| px | Yes | The px value from the design (e.g. 24 for a 24px button height). | |
| base | No | Grid base in px (default 4, matching cia's 4px grid). |