Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the cursor and remove underlying line

<div class="clientxxx-table-field">
    <div    id="client-table" 
            *ngIf="displayedColumnsOfClient != null && dataSourceOfClient != null" 
            class="table-container mat-elevation-z8 verticalScrollableParent" 
            [style.max-height.px]="'400'">
        <div class="FilterAndFilterUsed  client-header">
            <div class="table-name">Client</div>
            <mat-form-field class="filter">
                <input  class="filter-input" 
                        matInput (keyup)="leftTableFilter($event.target.value)">
                <mat-placeholder class="placeholder">Filter</mat-placeholder>
            </mat-form-field>
            <mat-slide-toggle   class="FilterUsed" 
                                (change)="leftFilterUsed($event)">
                Used
            </mat-slide-toggle>
        </div>
    </div>
</div>

I have a mat-form-field identified by the class filter. I am trying to make the font cursor "white" and the blue line that appears when the element is on focus disappear. The changes should apply only for to the input field in the elements with class "filter".

I have found some references (example) but things in material change often so I am a little lost.

enter image description here


  .filter 
    input 
      caret-color: white;
    .mat-focused .mat-form-field-underline 
      display: none;

The cursor (caret) is not white but the .mat-form-field-underline / .mat-form-field-ripple is still there.

like image 414
NoIdeaHowToFixThis Avatar asked Dec 27 '25 23:12

NoIdeaHowToFixThis


1 Answers

Here you go - StackBlitz

::ng-deep .filter  {
  background: green;
}

::ng-deep .filter.mat-focused .mat-form-field-underline {
  display: none;
}

::ng-deep .filter input {
  caret-color: white;
}
like image 175
camden_kid Avatar answered Dec 30 '25 15:12

camden_kid