Created
April 9, 2013 19:06
-
-
Save benknight/5348457 to your computer and use it in GitHub Desktop.
Old flexbox will stretch to contain floats, while new flexbox won't (proper behavior).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Old flexbox will stretch to contain floats, while new flexbox won't (proper behavior). | |
*/ | |
.flex-container { | |
display: -webkit-flex; | |
background: paleGreen; | |
} | |
.flex-container.old { | |
display: -webkit-box; | |
} | |
.flex-item { | |
-webkit-flex: 1; | |
} | |
.old .flex-item { | |
-webkit-box-flex: 1; | |
} | |
img { | |
float: left; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="flex-container"> | |
<div class="flex-item"> | |
<img src="http://placehold.it/100x100"> | |
Blah blah blah blah blah blah blah. | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment