Lance Hardwood Lance Hardwood - 4 months ago 67
CSS Question

Applying style to Material2 component does not work

I have an

<md-input>
element:

<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

No you are doing right have a look at this plunker

working example

<md-input #startDate
          required
          name="startDate"
          placeholder="startDate">
</md-input>
</p> 

<style>
  md-input{height:1000px; background:red;}
</style>

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.

Comments