Problem
The README's CSS-support table at README.md (line 203) documents the default value for flexWrap as wrap:
<tr><td><code>flexWrap</code></td><td><code>wrap</code>, <code>nowrap</code>, <code>wrap-reverse</code>, default to <code>wrap</code></td><td></td></tr>
However, the actual implementation in src/handler/compute.ts (lines 264-274) passes Yoga.WRAP_NO_WRAP as the fallback when style.flexWrap is not set:
node.setFlexWrap(
v(
style.flexWrap,
{
wrap: Yoga.WRAP_WRAP,
nowrap: Yoga.WRAP_NO_WRAP,
'wrap-reverse': Yoga.WRAP_WRAP_REVERSE,
},
Yoga.WRAP_NO_WRAP, // <-- default
'flexWrap'
)
)
So a child element with no flexWrap specified actually defaults to nowrap, not wrap. (The root node is explicitly set to WRAP_WRAP in src/satori.ts, but that doesn't apply to user-authored child nodes — and it's the table of supported CSS properties that's misleading here.)
This also matches the standard CSS spec default (nowrap), so the code is correct and the docs are wrong.
Expected
The README should state the default as nowrap, consistent with both the implementation and the CSS spec.
Suggested fix
Change README.md line 203 from default to wrap to default to nowrap:
-<tr><td><code>flexWrap</code></td><td><code>wrap</code>, <code>nowrap</code>, <code>wrap-reverse</code>, default to <code>wrap</code></td><td></td></tr>
+<tr><td><code>flexWrap</code></td><td><code>wrap</code>, <code>nowrap</code>, <code>wrap-reverse</code>, default to <code>nowrap</code></td><td></td></tr>
Problem
The README's CSS-support table at
README.md(line 203) documents the default value forflexWrapaswrap:However, the actual implementation in
src/handler/compute.ts(lines 264-274) passesYoga.WRAP_NO_WRAPas the fallback whenstyle.flexWrapis not set:So a child element with no
flexWrapspecified actually defaults tonowrap, notwrap. (The root node is explicitly set toWRAP_WRAPinsrc/satori.ts, but that doesn't apply to user-authored child nodes — and it's the table of supported CSS properties that's misleading here.)This also matches the standard CSS spec default (
nowrap), so the code is correct and the docs are wrong.Expected
The README should state the default as
nowrap, consistent with both the implementation and the CSS spec.Suggested fix
Change
README.mdline 203 fromdefault to wraptodefault to nowrap: