Skip to content

Instantly share code, notes, and snippets.

@samselikoff
Last active November 30, 2016 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samselikoff/1453705a32dfc01608dce70d39d2e95b to your computer and use it in GitHub Desktop.
Save samselikoff/1453705a32dfc01608dce70d39d2e95b to your computer and use it in GitHub Desktop.
flexbox-layout-test
html, body, p {
margin: 0;
padding: 0;
font-family: sans-serif;
}
.padding {
padding: 20px;
}
.Application {
height: 100vh;
display: flex;
flex-direction: column;
color: white;
&__header {
flex: 1 0 60px;
background: #222;
}
&__main {
background: #e4e4e4;
display: flex;
flex: 1 1 auto;
}
&__left-panel {
flex: 0 0 30%;
background: #444;
}
&__center-panel {
flex: 0 0 70%;
background: #666;
display: flex;
flex-direction: column;
}
&__center-panel-header {
height: 60px;
background: #999;
}
&__center-panel-body {
background: #bbb;
flex: 1;
overflow: scroll;
}
&__center-panel-footer {
height: 60px;
background: #999;
}
}
import Ember from 'ember';
export default Ember.Controller.extend({
data: [...Array(100)].map((el, i) => `Lorem ${i}`)
});
html, body, p {
margin: 0;
padding: 0;
font-family: sans-serif; }
.padding {
padding: 20px; }
.Application {
height: 100vh;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
color: white; }
.Application__header {
-webkit-box-flex: 1;
-ms-flex: 1 0 60px;
flex: 1 0 60px;
background: #222; }
.Application__main {
background: #e4e4e4;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-flex: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto; }
.Application__left-panel {
-webkit-box-flex: 0;
-ms-flex: 0 0 30%;
flex: 0 0 30%;
background: #444; }
.Application__center-panel {
-webkit-box-flex: 0;
-ms-flex: 0 0 70%;
flex: 0 0 70%;
background: #666;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column; }
.Application__center-panel-header {
height: 60px;
background: #999; }
.Application__center-panel-body {
background: #bbb;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
overflow: scroll; }
.Application__center-panel-footer {
height: 60px;
background: #999; }
<div class="Application">
<header class="Application__header">
<div class="padding">
header
</div>
</header>
<div class="Application__main">
<div class="Application__left-panel">
<div class="padding">
left-panel
</div>
</div>
<div class="Application__center-panel">
<div class="Application__center-panel-header">
<div class="padding">
center-panel-header
</div>
</div>
<div class="Application__center-panel-body">
<div class="padding">
center-panel-body
{{#each data as |item|}}
<li>{{item}}</li>
{{/each}}
</div>
</div>
<div class="Application__center-panel-footer">
<div class="padding">
center-panel-footer
</div>
</div>
</div>
</div>
</div>
{
"version": "0.10.6",
"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.9.0",
"ember-data": "2.9.0",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment