facebook / react-strict-dom

React Strict DOM (RSD) is a subset of React DOM, imperative DOM, and CSS that supports web and native targets
MIT License
3k stars 148 forks source link

Log error for shortform CSS properties with invalid values #116

Closed necolas closed 1 month ago

necolas commented 1 month ago

Using multiple values with shortform properties is invalid.

github-actions[bot] commented 1 month ago

compressed-size: runtime library

Size change: +0.12 kB Total size: 18.71 kB

Filename: gzip (minify) kB size kB change % change
./packages/react-strict-dom/dist/native/index.js 14.87 (46.93) +0.12 (+0.40) +0.8% (+0.9%) 🔴
View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./packages/react-strict-dom/dist/dom/index.js` | **2.89** (8.69) | **0.00** (0.00) | **0.0%** (0.0%) | | `./packages/react-strict-dom/dist/dom/runtime.js` | **0.95** (2.33) | **0.00** (0.00) | **0.0%** (0.0%) |
necolas commented 1 month ago

This should be good enough as a stop-gap, but better logging would be done in the create phase so it relates back to the authored styles instead of the post-processed styles that may be non-standard and different from the author properties. It would also mean we could error for multiple values on marginInline, inset, etc. Something for later.