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

How can we change the color of slider ? #22

Open
rohanc202 opened this issue May 2, 2020 · 1 comment
Open

How can we change the color of slider ? #22

rohanc202 opened this issue May 2, 2020 · 1 comment

Comments

@rohanc202
Copy link

rohanc202 commented May 2, 2020

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

*Additional context
.scss file -
.custom-slider{
&.npn-slider{
.slider{
.bar{
height: 30px;
}
}
}
}

.html file -
<npn-slider class="custom-slider" [min]="18" [max]="90" [hide-values]="true" (onChange)="onSliderChange($event)" showStepIndicator=true
[minSelected]=25 [maxSelected]=60 [step]="1" [showStepIndicator]="true">

@jdcreative
Copy link

my solutions is:

:host >>> .npn-slider .slider.bar {
height: Npx !important;
}
:host >>> .npn-slider .slider .bar > span.left-handle{
background: N !important;
border: Npx solid N !important;
}
:host >>> .npn-slider .slider .bar > span.right-handle{
background: N !important;
border: Npx solid N !important;
}
:host >>> .npn-slider .slider .bar div.filler{
border: Npx solid #N !important;
}
:host >>> .npn-slider .slider .bar div.filler > span{
background: N !important;
}
:host >>> .npn-slider .slider .bar > span.left-handle .handle-tooltip{
background: N !important;
border: N px solid N !important;
color: N !important;
<<< you can add new styles >>>
letter-spacing: 1.3px !important;
}
:host >>> .npn-slider .slider .bar > span.right-handle .handle-tooltip{
background: N !important;
border: N px solid N !important;
color: N !important;
}
:host >>> .npn-slider .slider .bar > span.left-handle .handle-tooltip::after{
border-top-color:N !important;
}
:host >>> .npn-slider .slider .bar > span.right-handle .handle-tooltip::after{
border-top-color:N !important;
}

As for me it is better to use : :host for ng.deep

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

2 participants