4343 }
4444
4545 .mx-scrollcontainer {
46- flex-shrink : 0 ;
47- flex-grow : 1 ;
48- flex-basis : 0 ;
49-
50- & :not (.mx-scrollcontainer-fixed ) {
51- // Make scroll container use full width and grow outside of it's parent
52- // this makes it fully scrollable without individual regions having scroll containers
53- min-height : auto ;
54- }
55-
56- & .mx-scrollcontainer-fixed {
57- // Make scroll container scrollable per region
58- // For this we fix height to stay withing the size of the parent,
59- // so that regions of the scroll container can't stretch the scroll container
60- // even if they are higher than the screen
61- max-height : 100% ;
62- min-height : 100% ;
63- }
46+ flex : 1 0 0 ;
47+ display : flex ;
6448 }
6549
6650 .mx-scrollcontainer-horizontal {
67- display : flex ;
6851 flex-direction : row ;
6952 }
7053
7154 .mx-scrollcontainer-vertical {
72- display : flex ;
7355 flex-direction : column ;
7456 }
7557
7658 .mx-scrollcontainer-fixed {
77- // for scroll per region, regions should overflow if they have long content
59+ // this class is added when scroll container has to scroll per region (fixed toolbar)
60+ // to make this happen scroll container regions have to be able to shrink smaller than their children
61+ // for this we set min-height: 0;
62+ // this allows regions to have overflow instead of always growing for their children
63+ min-height : 0 ;
64+
7865 .mx-scrollcontainer-left ,
7966 .mx-scrollcontainer-right ,
8067 .mx-scrollcontainer-center ,
81- d .mx-scrollcontainer-middle {
68+ .mx-scrollcontainer-middle {
69+ min-height : 0 ;
70+ // make those regions overflow, those are scrolling point
8271 overflow : auto ;
8372 }
73+
74+ .mx-scrollcontainer-nested {
75+ min-height : 0 ;
76+ }
8477 }
8578
8679 // left and right regions should maintain fixed size, no shrinking or expanding
8780 .mx-scrollcontainer-left ,
8881 .mx-scrollcontainer-right ,
8982 .mx-scrollcontainer-top ,
9083 .mx-scrollcontainer-bottom {
91- flex-grow : 0 ;
92- flex-shrink : 0 ;
84+ flex : 0 0 auto ;
9385 }
94- // center region should fill available space
86+
87+ // center regions should fill available space
9588 .mx-scrollcontainer-middle ,
9689 .mx-scrollcontainer-center {
97- flex-grow : 1 ;
90+ flex : 1 1 auto ;
91+
92+ // wrappers inside those elements are also positioned with flex
9893 display : flex ;
9994 flex-direction : column ;
10095 }
10196
102- // if there is a nested scroll container we always want
103- // outer scroll container to stay withing available height
104- // and don't allow inner scroll container to grow
97+ // wrappers inside regions should fill available space
98+ .mx-scrollcontainer-wrapper {
99+ flex : 1 1 auto ;
100+ }
101+
105102 .mx-scrollcontainer-nested {
106- height : 100% ;
107103 padding : 0 ;
104+ display : flex ;
108105 }
109106
110107 // SIDEBAR TOGGLE STYLES
122119 // Animate transitions for toggleable sidebars
123120 .mx-scrollcontainer-left.mx-scrollcontainer-toggleable ,
124121 .mx-scrollcontainer-right.mx-scrollcontainer-toggleable {
125- transition : flex-basis var (--navsidebar-animation-duration ) var (--navsidebar-animation-function ), margin-right var (--navsidebar-animation-duration ) var (--navsidebar-animation-function ),
122+ transition : flex-basis var (--navsidebar-animation-duration ) var (--navsidebar-animation-function ),
123+ margin-right var (--navsidebar-animation-duration ) var (--navsidebar-animation-function ),
126124 margin-left var (--navsidebar-animation-duration ) var (--navsidebar-animation-function );
127125 z-index : 1 ;
128126 }
218216 }
219217 }
220218
221-
222- // make the first child of the MAIN part of the scroll container to grow full height
219+ // make the first child of the MAIN part of the scroll container to grow full height and allow it to shrink
220+ // this is a custom case when a data view is the only child of the scroll region, it's footer must stick to the top
221+ // in order to achieve this we have to make the element and the wrapper shrinkable
223222 .region-content {
224- display : flex ;
225- flex-direction : column ;
226-
227- & > .mx-scrollcontainer-wrapper {
228- height : 100% ;
229- flex : 1 ;
223+ & > .mx-scrollcontainer-wrapper {
224+ flex : 1 1 auto ;
225+ min-height : 0 ;
230226 display : flex ;
231227 flex-direction : column ;
232228
233- & > .mx-placeholder {
234- height : 100 % ;
235- flex-grow : 1 ;
229+ & > .mx-placeholder {
230+ flex : 1 1 auto ;
231+ min-height : 0 ;
236232 display : flex ;
237233 flex-direction : column ;
238234
239- & > * :only-child {
240- height : 100% ;
241- flex-grow : 1 ;
235+ // this implies that this only child here is top level data view
236+ & > * :only-child {
237+ flex : 1 1 auto ;
238+ min-height : 0 ;
242239 }
243240 }
244241 }
245242 }
246- }
243+ }
0 commit comments