Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Material: Increase form size

I am searching for a possibility to control the size of input elements in angular material. I want to create a form as shown here https://i.sstatic.net/nnkup.png but the main problems (tested with the md-display-2 class) are caused by the animation of the labels as their position in the input field is defined absolutely in the css.

Is there a way to create a form as show in the image or do I have to find a workaround?

like image 667
MrMuh Avatar asked Oct 25 '25 06:10

MrMuh


1 Answers

Just add a class to the md-input-container and set the CSS font-size accordingly.

Example: http://jsbin.com/cadutojemo/1/edit?html,css,output

HTML

<md-input-container class="bigClass" flex>
    <label>Last Name</label>
    <input ng-model="user.lastName">
</md-input-container>

CSS

.md-input-has-value.bigClass > input {
    font-size: 30px;
}
like image 157
Ed Knowles Avatar answered Oct 27 '25 20:10

Ed Knowles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!