Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling does not go throguh Angular6 #182

Open
sapmaik opened this issue Jul 3, 2018 · 3 comments
Open

Styling does not go throguh Angular6 #182

sapmaik opened this issue Jul 3, 2018 · 3 comments

Comments

@sapmaik
Copy link

sapmaik commented Jul 3, 2018

Im using Angluar 6.
in the html file of a component im using the nouislider tag.
And it works fine, i can even change width margin etc. via the scss.

But when it comes to changing the color of the connect bar via

.noUi-connect {
  background: #000000;
}

it doesnt work.
Even though that is the same approach like in your demo.
And documentation in the nouislider option about cssPrefix and cssClasses is very irretating without an example:)

The difference to the demo is that im importing the style like this:

@Component({
  selector: 'x',
  templateUrl: './x.component.html',
  styleUrls: ['./x.component.scss'],
})

is it an angular version issue?

@shivanisaz
Copy link

shivanisaz commented Jul 9, 2018

Facing the same issue. No solution on Github or Stack overflow is working.

For now, as a work-around I have added the overriding CSS like

.noUi-connect {
  background: #000000;
} 

in the global styles file. I'm using Angular-CLI so for me, that's src/styles.css
But of course this is valid only if you want the same style for every slider in the entire application.

@fpfcarvalho
Copy link

you need to put /deep/ like this:

/deep/ .noUi-connect {
background: #000000;
}

because this class does not belong to your component but the other component.

@rubenheymans
Copy link

can't you use ViewEncapsulation.None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants