Created
December 31, 2014 17:40
-
-
Save paceaux/814cd02669de48cf8cd2 to your computer and use it in GitHub Desktop.
Flexboxing lists
This file contains hidden or 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
/** | |
* Flexboxing lists | |
*/ | |
ul{ | |
display:flex; | |
flex-direction: column; | |
margin: 0; | |
padding: 0; | |
height: 100vh; | |
border: 1px solid red; | |
width:24em; | |
} | |
li{ | |
flex-grow:0; | |
flex-shrink: 0; | |
display:flex; | |
flex-direction: row; | |
justify-content:space-around; | |
align-items:center; | |
} | |
li > div { | |
flex-grow:1; | |
flex-shrink:1; | |
max-width: 50%; | |
display:flex; | |
flex-direction: column; | |
justify-content: center; | |
align-items: center; | |
} | |
li:nth-child(even){ | |
background: gray; | |
} | |
ul > li { | |
height: 20vh; | |
} |
This file contains hidden or 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
<ul> | |
<li>something</li> | |
<li>something else</li> | |
<li>something too</li> | |
<li>something more</li> | |
<li><div>one line</div><div>another line that goes longer and should wrap pretty soon</div></li> | |
<li>something</li> | |
</ul> |
This file contains hidden or 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 hidden or 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":"result"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment