dillon1000/react
Commit
Browse files style prop improvements
Some improvements to how style={{x:y}} is handled in React:
* ignores null styles, rather than setting them.
Codez:
var highlighted = false;
<div style={{color: highlighted ? 'red' : null}} />
Before:
<div style="color:;"></div>
After:
<div></div>
Respects that 0 has no units.Changed paths4 files
First-parent comparisonsrc/domUtils/CSSProperty.js ModifiedM src/domUtils/CSSPropertyOperations.js ModifiedM src/domUtils/__tests__/CSSPropertyOperations-test.js ModifiedM src/domUtils/dangerousStyleValue.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…