Skip to content

Instantly share code, notes, and snippets.

@grapho
Last active June 21, 2016 20:28
Show Gist options
  • Save grapho/6c57b272d26af0436b33a2fb0d0345fd to your computer and use it in GitHub Desktop.
Save grapho/6c57b272d26af0436b33a2fb0d0345fd to your computer and use it in GitHub Desktop.
Flexbox wonky
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
* {
box-sizing: border-box;
height: 100%;
}
p {
height: auto;
}
iframe {
height: 100%;
min-height: 100%;
}
html {
height: 100%;
min-height: 100%;
margin: 0;
}
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
height: 100%;
min-height: 100%;
margin: 0;
background-color: rgba(0, 0, 0, .05);
padding: 16px
}
.callscreen-main {
padding: 8px;
display: flex;
display: -moz-box;
-moz-flex-flow: column nowrap;
flex-flow: column nowrap;
border: 1px solid;
height: 100%;
}
.header-bar {
height: auto;
padding: 8px;
-moz-box-flex: none;
flex: none;
border: 1px solid;
margin-bottom: 8px;
}
.static-content {
height: auto;
padding: 8px;
-moz-box-flex: none;
flex: none;
border: 1px solid;
margin-bottom: 8px;
}
.flex-content {
height: auto;
padding: 8px;
display: flex;
display: -moz-box;
-moz-flex-flow: column nowrap;
flex-flow: column nowrap;
-moz-box-flex: 1;
flex: 1;
border: 1px solid;
}
.flex-content-header {
height: auto;
padding: 8px;
-moz-box-flex: none;
flex: none;
border: 1px solid;
}
.flex-content-content {
height: auto;
padding: 8px;
-moz-box-flex: 1;
flex: 1;
border: 1px solid;
overflow-y: auto;
}
<div class="callscreen-main">
<div class="header-bar">
Welcome to Flexbox
</div>
<div class="static-content">
<p>Static Content</p>
<p>Static Content</p>
<p>Static Content</p>
<p>Static Content</p>
<p>Static Content</p>
</div>
<div class="flex-content">
<div class="flex-content-header">
Hi
</div>
<div class="flex-content-content">
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
<p>Flex/Scroll Content</p>
</div>
</div>
</div>
{
"version": "0.9.3",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.6.0",
"ember-data": "2.6.1",
"ember-template-compiler": "2.6.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment