Severity: error | Blocks morph build: yes
Status: documented rule —
morph checkdoes not report this code yet. The underlying problem still breaks your build or your UI; the cause and fix below apply when you hit it.
An inline style object uses a property Morph does not support:
error : mx-style-prop : Unsupported style property `float` on <div>
hint: See the supported CSS list — use Flexbox (`display: flex`) for layout
Learn more: https://morph.levizr.com/docs/errors/mx-style-propInline styles compile to fields on the native style struct consumed by the
layout engine. An unsupported property has no field — there is nowhere to
store it. Ignoring it would silently produce a different layout than the one
you coded (the classic float-shaped hole). Morph fails loudly and points at
the supported alternative. See
which CSS properties Morph supports.
// ❌ float does not exist in Morph layout — mx-style-prop
export default function App() {
return <div style={{ float: "left", width: 200 }}>Hello</div>;
}// ✅ Flexbox layout with supported properties
export default function App() {
return (
<div style={{ display: "flex", flexDirection: "row" }}>
<div style={{ width: 200 }}>Hello</div>
</div>
);
}Strategies when your property is unsupported:
float, position: absolute tricks) → Flexbox
(guide).box-shadow, outline) → check the
future CSS plans; restyle with borders/backgrounds.backgroudColor) → fix the spelling; property names are
camelCase in style={{...}} (backgroundColor, not background-color).Steps:
morph check.Do not disable this rule. Unsupported style properties cannot affect native rendering — silencing the error only hides dead declarations.