Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/renderers/dom/shared/CSSProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var isUnitlessNumber = {
boxFlexGroup: true,
boxOrdinalGroup: true,
columnCount: true,
content: true,
flex: true,
flexGrow: true,
flexPositive: true,
Expand Down
12 changes: 12 additions & 0 deletions src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ describe('ReactDOMComponent', function() {
expect(console.error.calls.count()).toBe(0);
});

it('should not warn for "content" style values', function() {
spyOn(console, 'error');
var Component = React.createClass({
render: function() {
return <div style={{content: ' '}}><span style={{content: '1'}}></span></div>;
},
});

ReactTestUtils.renderIntoDocument(<Component />);
expect(console.error.calls.count()).toBe(0);
});

it('should warn nicely about NaN in style', function() {
spyOn(console, 'error');

Expand Down