Skip to content

Instantly share code, notes, and snippets.

@tyaslab
Created September 21, 2016 07:58
Show Gist options
  • Save tyaslab/42ce50deb533712dec46416e116472de to your computer and use it in GitHub Desktop.
Save tyaslab/42ce50deb533712dec46416e116472de to your computer and use it in GitHub Desktop.
Old Flex implemented in Android JellyBean
.flex_display {
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
// When Twitter Bootstrap's hidden is applied to the same element, make sure
// display is set to none.
&.hidden {
display: none;
}
}
.flex_direction_column {
-webkit-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.flex (@grow: 0, @shrink: 1, @basis: auto) {
-webkit-box-flex: @grow;
-webkit-flex: @grow @shrink @basis;
-ms-flex: @grow @shrink @basis;
flex: @grow @shrink @basis;
// BB10 tweak.
height: @basis;
}
.flex_main {
.flex_display;
.flex_direction_column;
height: 100%;
}
.content {
// TODO: Add your own styles.
.flex(1, 1, 0px);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment