How to set vertical alignment for mdRadioButton directive of Angular Material related to text?

落花浮王杯 提交于 2019-12-04 16:58:42
Kelbster

Angular Material actually generates a container for the radio button's on/off state and ripple.

<md-radio-button> is the parent and _md-container is the child element you want to modify.

Here's a fork of the plunker with the modified styles:

md-radio-button ._md-container {
    top: 0;
    transform: translateY(0);
}

Hope this helps!

For Angular it can be achieved by:

mat-radio-button .mat-radio-label-content {
    white-space: normal;
}

mat-radio-button .mat-radio-label {
    align-items: normal;
}

Live Example: https://stackblitz.com/edit/angular-qkjhrz?embed=1&file=styles.css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!