Created
September 1, 2015 13:43
-
-
Save anonymous/23ee31775c183b64fa3f to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/beluce
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
ol, li { | |
margin: 0; | |
padding: 0; | |
} | |
.item { | |
overflow: hidden; | |
display: flex; | |
align-items: center; | |
background-color: green; | |
} | |
.item * { | |
flex-grow: 1; | |
} | |
.item .horizontal { | |
display: flex; | |
overflow: hidden; | |
background-color: yellow; | |
} | |
.item .horizontal > :first-child { | |
background-color: red; | |
width: 180px; | |
max-width: 180px; | |
} | |
.item .horizontal > :last-child { | |
background-color: blue; | |
flex-grow: 1; | |
} | |
.ellipsis { | |
min-width: 0; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
.item.has-left > :first-child { | |
flex-grow: 0; | |
} | |
.item.has-right > :last-child { | |
flex-grow: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<ol> | |
<li class="item borderless has-left has-right"> | |
<i class="icon material-icons positive">location_on</i> | |
<div class="horizontal"> | |
<h2 class="primary-text">location</h2> | |
<h2 class="secondary-text ellipsis"> operator</h2> | |
</div> | |
<i class="icon material-icons icon-right">chevron_right</i> | |
</li> | |
</ol> | |
<script id="jsbin-source-css" type="text/css"> | |
ol, li { | |
margin: 0; | |
padding: 0; | |
} | |
.item { | |
overflow: hidden; | |
display:flex; | |
align-items: center; | |
background-color: green; | |
} | |
.item * { | |
flex-grow: 1; | |
} | |
.item .horizontal { | |
display: flex; | |
overflow: hidden; | |
background-color: yellow; | |
> :first-child { | |
background-color: red; | |
width: 180px; | |
max-width: 180px; | |
} | |
> :last-child { | |
background-color: blue; | |
flex-grow: 1; | |
} | |
} | |
.ellipsis { | |
min-width: 0; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
.item.has-left > :first-child { | |
flex-grow: 0; | |
} | |
.item.has-right > :last-child { | |
flex-grow: 0; | |
} | |
</script> | |
</body> | |
</html> |
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
ol, li { | |
margin: 0; | |
padding: 0; | |
} | |
.item { | |
overflow: hidden; | |
display: flex; | |
align-items: center; | |
background-color: green; | |
} | |
.item * { | |
flex-grow: 1; | |
} | |
.item .horizontal { | |
display: flex; | |
overflow: hidden; | |
background-color: yellow; | |
} | |
.item .horizontal > :first-child { | |
background-color: red; | |
width: 180px; | |
max-width: 180px; | |
} | |
.item .horizontal > :last-child { | |
background-color: blue; | |
flex-grow: 1; | |
} | |
.ellipsis { | |
min-width: 0; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
.item.has-left > :first-child { | |
flex-grow: 0; | |
} | |
.item.has-right > :last-child { | |
flex-grow: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment