Skip to content

Commit

Permalink
added min-height, min-width to flex items, fixes elastic#1873
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Thomassie committed Jan 7, 2015
1 parent b2d8172 commit 5564cbb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
28 changes: 27 additions & 1 deletion src/kibana/components/vislib/styles/_layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,33 @@
.visualize-chart {
.display(flex);
.flex(1 1 100%);
min-height: 0;
min-width: 0;
}

.vis-wrapper {
.display(flex);
.flex(1 1 100%);
.flex-direction(row);
margin: 10px 0 0 6px;
// margin: 10px 0 0 6px;
min-height: 0;
min-width: 0;
}

/* YAxis logic */
.y-axis-col-wrapper {
.display(flex);
.flex-direction(column);
min-height: 0;
min-width: 0;
}

.y-axis-col {
.display(flex);
.flex-direction(row);
.flex(1 0 36px);
min-height: 0;
min-width: 0;
}

.y-axis-spacer-block {
Expand All @@ -33,6 +41,7 @@
.flex-direction(column);
width: 38px;
min-height: 20px;
min-width: 0;
}

.y-axis-div {
Expand All @@ -50,6 +59,7 @@
.display(flex);
.flex-direction(column);
min-height: 14px;
min-width: 0;
width: 14px;
}

Expand All @@ -72,29 +82,39 @@
.display(flex);
.flex(1 0 20px);
.flex-direction(column);
min-height: 0;
min-width: 0;
}

.chart-wrapper {
.display(flex);
.flex(1 0 20px);
overflow: visible;
margin: 0 5px 0 0;
min-height: 0;
min-width: 0;
}

.chart-wrapper-column {
.display(flex);
.flex(1 0 20px);
.flex-direction(row);
min-height: 0;
min-width: 0;
}

.chart-wrapper-row {
.display(flex);
.flex-direction(column);
.flex(1 0 100%);
min-height: 0;
min-width: 0;
}

.chart {
.flex(1 1 100%);
min-height: 0;
min-width: 0;

> svg {
display: block;
Expand All @@ -105,23 +125,29 @@

.chart-row {
.flex(1 1 auto);
min-height: 0;
min-width: 0;
}

.chart-column {
.flex(1 1 auto);
min-height: 0;
min-width: 0;
}

.x-axis-wrapper {
.display(flex);
.flex-direction(column);
min-height: 45px;
min-width: 0;
overflow: visible;
}

.x-axis-div-wrapper {
.display(flex);
.flex-direction(row);
min-height: 15px;
min-width: 0;
}

.x-axis-chart-title {
Expand Down
3 changes: 3 additions & 0 deletions src/kibana/components/vislib/styles/_legend.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
overflow-x: hidden;
overflow-y: auto;
min-width: 40px;
min-height: 0;

.header {
width: 100%;
Expand All @@ -21,6 +22,8 @@
visibility: visible;
.display(flex);
.flex-direction(column);
min-height: 0;
min-width: 0;

li.color {
min-height: 22px;
Expand Down
4 changes: 4 additions & 0 deletions src/kibana/plugins/visualize/editor/styles/editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@
.display(flex);
.flex-direction(column);
overflow: auto;
min-height: 0;
min-width: 0;

&.embedded {
.flex-shrink(1);
Expand All @@ -270,6 +272,8 @@
.visualize-chart {
.flex(1, 0, 100%);
position: relative;
min-height: 0;
min-width: 0;
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/kibana/styles/_mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
.flex(@grow, @shrink, @basis);
.display(flex);
.flex-direction(column);

min-height: 0;
min-width: 0;
> * {
.flex-shrink(0);
min-height: 0;
min-width: 0;
}
}

Expand Down

0 comments on commit 5564cbb

Please sign in to comment.