1

In my case, if one of the expansion panel is open, other panels on left and right shouldn't grow vertically. How should I proceed to do this?

Here's the behaviour with Mat components: StackBlitz (current)

Here's the behaviour I would like (with example divs): StackBlitz (expected)

Actolia
  • 125
  • 2
  • 7

2 Answers2

1

StackBlitz

To achieve this, additional css properties need to be added to the containing div element:

justify-content: flex-start;
align-items: flex-start;
align-content: flex-start;

Consider using the flex-layout module, as this provides an API for wrapping these classes.

p4r1
  • 2,490
  • 16
  • 18
0

Just saw a simple solution came from How to make a flex item not fill the height of the flex container?

It was solved using align-items: flex-start on parent

Actolia
  • 125
  • 2
  • 7