Layout ยท console.warn
layout: {setting} was set to {value}, which is not a length this module understands (a number of pixels, or a string like '200px', '25%', '1fr', '2rem'). Using {fallback}.
Printed by Layout, prefixed [lattice], since 1.53.0.
Warnings reference › layout.length:*
- Identifier
layout.length:*- Raised by
- Layout
- Since
- 1.53.0
What happened
A spacing or sizing setting could not be read as a length. The module accepts a finite non-negative number of pixels or a CSS length string in the forms listed; anything else - a negative number, NaN, 'medium', an object - is refused so that it cannot be written into the style attribute and silently break the grid geometry. The named default was used instead and the layout is otherwise unaffected.
The fix
Use a number for pixels, or one of the string forms shown. The key names the exact setting, so layout.length:gap is the gap you configured.
The smallest fix
createLayout(el, { gap: 8, padding: '0.5rem' });
Reference
Covered in full at the API reference.