rami-sf
rami-sf

Reputation: 401

Angular ::ng-deep not working in global style

I created a component with its style I inserted

::ng-deep .input-blue.mat-focused .mat-form-field-label {
  color: #6200EE !important;
}

works perfectly. However when I add this code to the global style to use it in all components not working.

Upvotes: 6

Views: 5813

Answers (1)

mbojko
mbojko

Reputation: 14679

The global style.css is just a plain, non-Angular, or at least non-encapsulated (that is its whole point) style sheet. Remove the ::ng-deep and just leave

.input-blue.mat-focused .mat-form-field-label {
  color: #6200EE !important;
}

Upvotes: 12

Related Questions