Merge pull request #3719 from awesomerobot/master

flexbox for the post header
This commit is contained in:
Sam 2015-09-02 10:27:27 +10:00
commit ecfc075391
5 changed files with 73 additions and 9 deletions

View File

@ -6,6 +6,14 @@
background-color: $header_background; background-color: $header_background;
box-shadow: 0 2px 4px -1px rgba(0,0,0, .25); box-shadow: 0 2px 4px -1px rgba(0,0,0, .25);
.ember-view {
min-width: 0; //flexbox fix
}
.title {
@include flex(0,0,auto);
}
.docked & { .docked & {
position: fixed; position: fixed;
backface-visibility: hidden; /** do magic for scrolling performance **/ backface-visibility: hidden; /** do magic for scrolling performance **/
@ -13,6 +21,8 @@
.contents { .contents {
margin: 8px 0; margin: 8px 0;
@include flexbox();
@include align-items(center);
} }
.title { .title {
@ -34,8 +44,10 @@
} }
.panel { .panel {
float: right;
position: relative; position: relative;
margin-left: auto;
min-width: 125px;
@include order(3)
} }
.login-button, button.sign-up-button { .login-button, button.sign-up-button {

View File

@ -270,6 +270,3 @@ div.menu-links-header {
margin-right: 0.2em; margin-right: 0.2em;
} }
} }

View File

@ -27,11 +27,12 @@
} }
.extra-info-wrapper { .extra-info-wrapper {
@include order(2);
line-height: 1.5;
.badge-wrapper { .badge-wrapper {
float: left; float: left;
&.bullet { margin-left: 2px;
margin-top: 5px; line-height: 1.2;
}
} }
} }

View File

@ -52,8 +52,8 @@
&.bullet { //bullet category style &.bullet { //bullet category style
display: inline-flex; @include inline-flex;
align-items: baseline; @include align-items(baseline);
margin-right: 10px; margin-right: 10px;
span.badge-category { span.badge-category {

View File

@ -113,3 +113,57 @@
-webkit-transform: $transforms; -webkit-transform: $transforms;
transform: $transforms; transform: $transforms;
} }
// ---------------------------------------------------
//Flexbox
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin inline-flex() {
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -moz-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
}
@mixin align-items($alignment) {
-webkit-box-align: $alignment;
-webkit-align-items: $alignment;
-ms-flex-align: $alignment;
-ms-align-items: $alignment;
align-items:$alignment;
}
@mixin order($val) {
-webkit-box-ordinal-group: $val;
-moz-box-ordinal-group: $val;
-ms-flex-order: $val;
-webkit-order: $val;
order: $val;
}
@mixin flex($fg: 1, $fs: null, $fb: null) {
$fg-boxflex: $fg;
// Box-Flex only supports a flex-grow value
@if type-of($fg) == 'list' {
$fg-boxflex: nth($fg, 1);
}
-webkit-box-flex: $fg-boxflex;
-webkit-flex: $fg $fs $fb;
-moz-box-flex: $fg-boxflex;
-moz-flex: $fg $fs $fb;
-ms-flex: $fg $fs $fb;
flex: $fg $fs $fb;
}