ngx-loading-bar icon indicating copy to clipboard operation
ngx-loading-bar copied to clipboard

Add ability to pass in css class to spinner and bar

Open richarddavenport opened this issue 4 years ago • 5 comments

Closes #141 Not sure what you'd like to call the inputs, feel free to change them.

richarddavenport avatar Oct 24 '20 00:10 richarddavenport

I realized that the background was overwriting some styles in my css class, namely background-color. I'm guessing that most people are wanting to style it based on a class, so the loader probably shouldn't set background in that case. Also, my [ngClass] code was old and wrong, updated to work.

richarddavenport avatar Oct 24 '20 00:10 richarddavenport

could you please update readme https://github.com/aitboudad/ngx-loading-bar#customize-ngx-loading-bar

aitboudad avatar Oct 24 '20 07:10 aitboudad

I'm not sure if we do really need such inputs 🤔, to use scss variables just target the used classes ngx-spinner and ngx-bar. let me know WDYT?

aitboudad avatar Oct 24 '20 07:10 aitboudad

@aitboudad Thx for the hint.

Styling the loading bar with

.ngx-bar {
  background-color: mat-color($accent) !important;
}

works great and I can use Angular Material Theming that way.

It did not work without the !important though as the fallback color is always set to element style.

moberwasserlechner avatar Oct 06 '21 13:10 moberwasserlechner

I have to revoke my previous comment. With proper Angluar 12 theming it does not work. This PR would be really great.

moberwasserlechner avatar Oct 14 '21 12:10 moberwasserlechner