rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

Move auto-px to compat sub-package

Open andrewiggins opened this issue 4 years ago • 1 comments

Summary

Currently, Preact supports numerical values to style properties where the DOM expects strings with units, for example <div style={{ marginLeft: 20}}></div>. This RFC proposes moving this behavior to the preact/compat sub-package, such that Preact core (the behavior when just importing preact) will no longer support this. A developer will need to write <div style={{ marginLeft: "20px" }}></div> instead.

Links

andrewiggins avatar Dec 27 '20 02:12 andrewiggins

Idea: we could have compat only turn on autopx the first time it sees a numeric value.

developit avatar Dec 27 '20 16:12 developit