Prevents lengend from expanding page#8351
Conversation
|
@cjcenizal, not sure if you knew of a more preferred way of accomplishing this with flexbox instead of using absolute/relative positioning. |
There was a problem hiding this comment.
I'm not a fan of mixing absolute positioning and flex-box, but this does work.
|
I noticed that this works on Chrome and Safari, but not on Firefox (OS X). Digging into it some more right now... |
|
Got it... in visualize {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
overflow: auto;
position: relative;
.k4tip {
white-space: pre-line;
}
.vis-container {
display: flex;
flex-direction: row;
flex: 1 0;to: visualize {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
overflow: auto;
position: relative;
.k4tip {
white-space: pre-line;
}
.vis-container {
display: flex;
flex-direction: row;
flex: 1 1 0;The last line is the only one that changed. This fixes it for me in Firefox. Still works in Chrome and Safari. Has anyone tested IE? |
cf2c33e to
4c7eb06
Compare
|
@cjcenizal @tylersmalley I can test this in IE (annoyign dual boot, right now I'm on linux.... :P) |
There was a problem hiding this comment.
@cjcenizal IE11 behaves exactly the other way around here.
flex: 1 0;works on IE11flex: 1 1 0;does not work on IE11
There was a problem hiding this comment.
OK, so I think i have an understanding of this problem. To break it down:
- It's a known bug that IE11 ignores unitless flex-basis values in flex shorthand declarations (reference on flexbugs).
- The recommended solution to this bug is to use 0%, e.g.
flex: 1 1 0%. - However, Firefox has a bug where it doesn't respect 0% as it's supposed to (reference on flexbugs).
So, I think the first thing we should do is double-check the latest version of Firefox and make sure that the bug in point 3 still exists. It's possible I reproduced this bug using an older version of Firefox.
If the bug has been fixed, then we're fine using the 0% solution.
If not, then let's explore using an IE11 CSS Hack to introduce the 0% property after the regular property.
There was a problem hiding this comment.
This was still an issue in FF 49. The resolution ended up being flex: 1 1 0 for all browsers except IE 11, which I used flex: 1 0
There was a problem hiding this comment.
(3) continues to be an issue on FF48
4c7eb06 to
5626b3b
Compare
|
@tylersmalley FYI we're not supporting IE10 afaik |
There was a problem hiding this comment.
I know this is kind of stupidly over-the-top, but because this hack is needed to fix a Firefox bug, I think we should elaborate, e.g.:
// Normally we would just set flex: 1 1 0%, which works as expected in IE11.
// Unfortunately, a recent bug in Firefox causes this rule to be ignored, so we
// have to use an IE-specific hack instead.* Legends will overflow along the y-axis, maintaining a 100% height of the page * With these changes, space-between would at times place the text out of view Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
5626b3b to
bb6632f
Compare
|
LGTM |
|
LGTM2 |
--------- **Commit 1:** Prevents lengend from expanding page * Legends will overflow along the y-axis, maintaining a 100% height of the page * With these changes, space-between would at times place the text out of view Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Original sha: bb6632f * Authored by Tyler Smalley <tyler.smalley@elastic.co> on 2016-09-19T21:29:06Z
--------- **Commit 1:** Prevents lengend from expanding page * Legends will overflow along the y-axis, maintaining a 100% height of the page * With these changes, space-between would at times place the text out of view Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Original sha: bb6632f * Authored by Tyler Smalley <tyler.smalley@elastic.co> on 2016-09-19T21:29:06Z
--------- **Commit 1:** Prevents lengend from expanding page * Legends will overflow along the y-axis, maintaining a 100% height of the page * With these changes, space-between would at times place the text out of view Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Original sha: bb6632f * Authored by Tyler Smalley <tyler.smalley@elastic.co> on 2016-09-19T21:29:06Z
[backport] PR #8351 to 5.0 - Prevents lengend from expanding page
[backport] PR #8351 to 5.x - Prevents lengend from expanding page
--------- **Commit 1:** Prevents lengend from expanding page * Legends will overflow along the y-axis, maintaining a 100% height of the page * With these changes, space-between would at times place the text out of view Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co> * Original sha: 943381bf8e3a523844d27c88f8d6f43b19e5cd52 [formerly bb6632f] * Authored by Tyler Smalley <tyler.smalley@elastic.co> on 2016-09-19T21:29:06Z Former-commit-id: fbf3048
[backport] PR elastic#8351 to 5.x - Prevents lengend from expanding page Former-commit-id: 9876c88







Legends will overflow along the y-axis, maintaining a 100% height of the page
Fixes #6771
Fixes #6772