Angular2 Material Dialog css, dialog size

前端 未结 11 945
甜味超标
甜味超标 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:30

    You can inspect the dialog element with dev tools and see what classes are applied on mdDialog.

    For example, .md-dialog-container is the main classe of the MDDialog and has padding: 24px

    you can create a custom CSS to overwrite whatever you want

    .md-dialog-container {
          background-color: #000;
          width: 250px;
          height: 250px
    }
    

    In my opinion this is not a good option and probably goes against Material guide but since it doesn't have all features it has in it's previous version, you should do what you think is best for you.

提交回复
热议问题