Material Angular Accordion header/title height

后端 未结 4 1586
难免孤独
难免孤独 2021-02-03 18:52

So I\'ve been trying to adopt Materials Accordion in my Web Application development.

However having some troubles getting the header to expand in size as the content gro

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-03 19:21

    As of today with Material 7.0.2, If you want to have the header follow some generic height:auto rule, this fix height might not be your solution. (for instance to follow the size of the text in the header in responsive situations)

    in these situations, it's much better to have an auto height defined in css:

      mat-expansion-panel {
        mat-expansion-panel-header {
          height: auto!important; 
        }
      }
    

    and define

      
    

    as explained in https://github.com/angular/material2/pull/9313

提交回复
热议问题