Bug inline styles flex value
See original GitHub issueSteps to Reproduce: https://jsfiddle.net/reactjs/69z2wepo/
class Hello extends React.Component {
render() {
return <div style={{ flex: '1 0 0' }}>Hello</div>;
}
}
ReactDOM.render(
<Hello />,
document.getElementById('container')
);
Expected Result:
<div style="flex: 1 0 0;">Hello</div>
Actual Result:
<div style="flex: 1 0 0px;">Hello</div>
Notes:
Why change 0 to 0px ?? I’m not sure IE11 works with 0 the same way as 0px… Also why not change the second digit then also? 0px and 0 is the same also, so the suffixing of px there is just a waste and can cause potential bugs.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
css - What's the difference between display:inline-flex and ...
The difference between display: flex and display: inline-flex is the outer display type, the first's outer display type is block , and the...
Read more >flex-basis - CSS: Cascading Style Sheets - MDN Web Docs
The flex-basis CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise...
Read more >What is the difference between inline-flex and inline-block in ...
The display property specifies how an element should be displayed in a webpage. There can be many values, related to this property in...
Read more >Class and Style Bindings | Vue.js
This will only render the last value in the array which the browser supports. In this example, it will render display: flex for...
Read more >CSS Flexbox Container - W3Schools
The column value stacks the flex items vertically (from top to bottom): · flex-direction: column; ; The column-reverse value stacks the flex items...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I verified all React does is set
node.style.flex = '1 0 0'. React doesn’t append anypxsuffix so you’re dealing with some browser issue here.@gaearon it should put
node.style.flex = '1'because that is what I wrote… why does it need to mess up IE11??I have to use a stylesheet to get
flex: 1;because inline is modified from what I actually wrote!!!