Is it possible to make an md-button smaller?

前端 未结 8 1457
逝去的感伤
逝去的感伤 2021-01-03 18:18

I want my buttons showing left- and right arrow and NOW text to be as small as possible. How do I do that?

8条回答
  •  南笙
    南笙 (楼主)
    2021-01-03 19:19

    If you are using md-icon-button, then material sets a width, height and padding for the icon:

    .md-button.md-icon-button {
        margin: 0 6px;
        height: 40px;
        min-width: 0;
        line-height: 24px;
        padding: 8px;
        width: 40px;
        border-radius: 50%;
    }
    

    so you need to override it ("auto" works well if you want the button to fit the parent)

    .md-button.md-small {
        padding: 0px;
        margin: 0px;
        height: auto;
        width: auto;
    min-height: 20px;
    }
    

提交回复
热议问题