Lance Hardwood Lance Hardwood - 1 year ago 231
CSS Question

Applying style to Material2 component does not work

I have an


<md-input class="filter-name-input" [(ngModel)]="name" placeholder="Name"></md-input>

And am trying to apply styling to it via a CSS:

md-input {
height: 2000000px;

I'm not seeing the style being applied in the browser debugger. Am I doing this improperly?

Answer Source

No you are doing right have a look at this plunker

working example

<md-input #startDate

  md-input{height:1000px; background:red;}

actually css height is being applied to your component but may not be visible due to white background, see in the attached plunker its working fine for me.