Skip to content

Commit

Permalink
upgrade flex-grow defs to use the flex shorthand and define their fle…
Browse files Browse the repository at this point in the history
…x-basis
  • Loading branch information
Spencer Alger committed Jun 4, 2014
1 parent 9f032ce commit f618a6b
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 11 deletions.
20 changes: 20 additions & 0 deletions src/kibana/apps/dashboard/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,18 @@ dashboard-grid {
justify-content: flex-start;
}
.gridster dashboard-panel .panel .panel-heading {
-webkit-flex-grow: 0;
-moz-flex-grow: 0;
-ms-flex-grow: 0;
flex-grow: 0;
-webkit-flex-shrink: 0;
-moz-flex-shrink: 0;
-ms-flex-shrink: 0;
flex-shrink: 0;
-webkit-flex-basis: auto;
-moz-flex-basis: auto;
-ms-flex-basis: auto;
flex-basis: auto;
min-height: 45px;
}
.gridster dashboard-panel .panel .panel-heading a {
Expand All @@ -135,6 +147,14 @@ dashboard-grid {
-moz-flex-grow: 1;
-ms-flex-grow: 1;
flex-grow: 1;
-webkit-flex-shrink: 1;
-moz-flex-shrink: 1;
-ms-flex-shrink: 1;
flex-shrink: 1;
-webkit-flex-basis: 100%;
-moz-flex-basis: 100%;
-ms-flex-basis: 100%;
flex-basis: 100%;
height: auto;
}
.dashboard-load {
Expand Down
4 changes: 3 additions & 1 deletion src/kibana/apps/dashboard/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ dashboard-grid {
.justify-content(flex-start);

.panel-heading {
.flex();
min-height: 45px;

a {
Expand All @@ -62,8 +63,9 @@ dashboard-grid {
}
}
}

visualize {
.flex-grow(1);
.flex(1, 1, 100%);
height: auto;
}
}
Expand Down
21 changes: 20 additions & 1 deletion src/kibana/apps/visualize/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,32 @@
justify-content: flex-start;
}
.vis-editor-content .vis-sidebar {
width: 300px;
-webkit-flex-grow: 0;
-moz-flex-grow: 0;
-ms-flex-grow: 0;
flex-grow: 0;
-webkit-flex-shrink: 0;
-moz-flex-shrink: 0;
-ms-flex-shrink: 0;
flex-shrink: 0;
-webkit-flex-basis: 300px;
-moz-flex-basis: 300px;
-ms-flex-basis: 300px;
flex-basis: 300px;
}
.vis-editor-content .vis-canvas {
-webkit-flex-grow: 1;
-moz-flex-grow: 1;
-ms-flex-grow: 1;
flex-grow: 1;
-webkit-flex-shrink: 1;
-moz-flex-shrink: 1;
-ms-flex-shrink: 1;
flex-shrink: 1;
-webkit-flex-basis: 100%;
-moz-flex-basis: 100%;
-ms-flex-basis: 100%;
flex-basis: 100%;
}
}
.vis-editor-content vis-config-editor {
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/apps/visualize/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
.justify-content(flex-start);

.vis-sidebar {
width: 300px;
.flex(0, 0, 300px);
}

.vis-canvas {
.flex-grow(1);
.flex(1, 1, 100%);
}
}
}
Expand Down
25 changes: 24 additions & 1 deletion src/kibana/apps/visualize/styles/visualization.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,18 @@ visualize .k4tip {
white-space: pre-line;
}
visualize .visualize-show-table {
width: 100%;
-webkit-flex-grow: 0;
-moz-flex-grow: 0;
-ms-flex-grow: 0;
flex-grow: 0;
-webkit-flex-shrink: 0;
-moz-flex-shrink: 0;
-ms-flex-shrink: 0;
flex-shrink: 0;
-webkit-flex-basis: auto;
-moz-flex-basis: auto;
-ms-flex-basis: auto;
flex-basis: auto;
background-color: #ecf0f1;
text-align: center;
}
Expand Down Expand Up @@ -127,6 +138,18 @@ visualize .visualize-chart.only-table {
display: none;
}
visualize .visualize-table {
-webkit-flex-grow: 0;
-moz-flex-grow: 0;
-ms-flex-grow: 0;
flex-grow: 0;
-webkit-flex-shrink: 0;
-moz-flex-shrink: 0;
-ms-flex-shrink: 0;
flex-shrink: 0;
-webkit-flex-basis: auto;
-moz-flex-basis: auto;
-ms-flex-basis: auto;
flex-basis: auto;
display: none;
overflow: hidden;
}
Expand Down
8 changes: 4 additions & 4 deletions src/kibana/apps/visualize/styles/visualization.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ visualize {
}

.visualize-show-table {
width: 100%;
.flex();

background-color: @well-bg;
text-align: center;
&.active {
Expand All @@ -36,9 +37,7 @@ visualize {
}

.visualize-chart {
.flex-grow(1);
.flex-shrink(1);
.flex-basis(100%);
.flex(1, 1, 100%);
overflow: hidden;

&.table-visible {
Expand All @@ -51,6 +50,7 @@ visualize {
}

.visualize-table {
.flex();
display: none;
overflow: hidden;

Expand Down
5 changes: 5 additions & 0 deletions src/kibana/styles/_mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
-ms-flex-direction: @rule;
flex-direction: @rule;
}
.flex (@grow: 0, @shrink: 0, @basis: auto) {
.flex-grow(@grow);
.flex-shrink(@shrink);
.flex-basis(@basis);
}
.flex-grow (@rule) {
-webkit-flex-grow: @rule;
-moz-flex-grow: @rule;
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/styles/_pagination.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ paginate {
padding: 5px;

.paginate-other-pages {
.flex-grow(1);
.flex(1, 1, 100%);
text-align: center;

a {
Expand All @@ -30,6 +30,6 @@ paginate {
}

.paginate-content {
.flex-grow(1);
.flex(1, 1, auto);
}
}
16 changes: 16 additions & 0 deletions src/kibana/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -6983,6 +6983,14 @@ paginate paginate-controls .paginate-other-pages {
-moz-flex-grow: 1;
-ms-flex-grow: 1;
flex-grow: 1;
-webkit-flex-shrink: 1;
-moz-flex-shrink: 1;
-ms-flex-shrink: 1;
flex-shrink: 1;
-webkit-flex-basis: 100%;
-moz-flex-basis: 100%;
-ms-flex-basis: 100%;
flex-basis: 100%;
text-align: center;
}
paginate paginate-controls .paginate-other-pages a {
Expand All @@ -7003,6 +7011,14 @@ paginate .paginate-content {
-moz-flex-grow: 1;
-ms-flex-grow: 1;
flex-grow: 1;
-webkit-flex-shrink: 1;
-moz-flex-shrink: 1;
-ms-flex-shrink: 1;
flex-shrink: 1;
-webkit-flex-basis: auto;
-moz-flex-basis: auto;
-ms-flex-basis: auto;
flex-basis: auto;
}
html,
body {
Expand Down

0 comments on commit f618a6b

Please sign in to comment.