Angular2 Material Dialog css, dialog size

前端 未结 11 950
甜味超标
甜味超标 2020-12-25 10:52

Angular2 material team recently released the MDDialog https://github.com/angular/material2/blob/master/src/lib/dialog/README.md

I\'d like to change the looking and f

11条回答
  •  春和景丽
    2020-12-25 11:37

    I think you need to use /deep/, because your CSS may not see your modal class. For example, if you want to customize .modal-dialog

    /deep/.modal-dialog {
      width: 75% !important;
    }
    

    But this code will modify all your modal-windows, better solution will be

    :host {
      /deep/.modal-dialog {
      width: 75% !important;
      }
    }
    

提交回复
热议问题