CSS flexbox max column number?

You can set the flex-basis property of .twit which tells flexbox what base width to give each .twit element, before splitting up the remaining space to all elements. try adding the following CSS to .twit (I used 30% not 33% to account for margins and padding, but you can play with this number.) flex-basis: 30%;

Flexbox alternative for IE9

Use modernizr to detect whether flex capabilities are present, and provide fallback styles where necessary. Modernizr will add classes like flexbox, no-flexbox, and flexbox-legacy to the html element, so in your styles you can use: .container { display: flex; } .no-flexbox .container { display: table-cell; } I highly recommend reading through Zoe Gillenwater’s (@zomigi) presentations … Read more

In what circumstances is flex-shrink applied to flex elements and how does it work?

In order to see flex-shrink in action, you need to be able to make its container smaller. HTML: <div class=”container”> <div class=”child one”> Child One </div> <div class=”child two”> Child Two </div> </div> CSS: div { border: 1px solid; } .container { display: flex; } .child.one { flex: 1 1 10em; color: green; } .child.two … Read more

React-Native: Avoid Text Wrapping

The solution ended up being fairly simple. Not entirely intuitive but here’s how to solve this. It appears that the text that needs ellipsis requires flex: 1. <View style={{ flexDirection: “row” }}> <Text numberOfLines={1} style={{ flex: 1, textAlign: “left” }}> {title} </Text> <Text style={{ textAlign: “right” }}>{duration}</Text> </View>;

Instead of using prefixes I want to ask site visitors to upgrade their browser

Revised answer after question edit Here is a CSS only way to achieve that. As the CSS @supports won’t work on your targeted (unwanted) browsers: Safari 7-8, IE <= 10, Android Browser < 4.4, UC Browser for Android and Opera Mini < 8, your “browserupgrade” message will be visible on those using this rule. @supports … Read more