Skip to content

Commit 360a551

Browse files
authored
Unify range slider styling sample between platforms. (#691)
1 parent 40c53f4 commit 360a551

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

samples/inputs/slider/styling/index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
<body>
1515
<div id="root">
1616
<div class="container sample center">
17-
<igc-slider value="40">
18-
</igc-slider>
17+
<div class="slider-container">
18+
<span class="slider-label">Slider</span>
19+
<igc-slider value="40"></igc-slider>
20+
</div>
21+
<div class="slider-container">
22+
<span class="slider-label">Range Slider</span>
23+
<igc-range-slider lower="20" upper="70"></igc-range-slider>
24+
</div>
1925
</div>
2026
</div>
2127
<!-- This script is needed only for parcel and it will be excluded for webpack -->

samples/inputs/slider/styling/src/SliderStyling.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ igc-slider {
22
padding: 30px 30px 0px 30px;
33
}
44

5+
igc-range-slider {
6+
padding: 30px 30px 0px 30px;
7+
}
8+
59
igc-slider::part(thumb) {
6-
background: #28a745;
10+
background: #28a745;
711
}
812

913
igc-slider::part(thumb):focus {
@@ -14,4 +18,22 @@ igc-slider::part(thumb):focus {
1418
igc-slider::part(fill) {
1519
display: block;
1620
background: #28a745;
21+
}
22+
23+
igc-range-slider::part(thumb) {
24+
background: orange;
25+
}
26+
27+
igc-range-slider::part(thumb):focus {
28+
background: navy;
29+
box-shadow: 0 0 0 2px orange;
30+
}
31+
32+
igc-range-slider::part(track) {
33+
display: block;
34+
background: navy;
35+
}
36+
37+
igc-range-slider::part(thumb-label-inner) {
38+
background: navy;
1739
}

samples/inputs/slider/styling/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { defineComponents, IgcSliderComponent } from 'igniteui-webcomponents';
1+
import { defineComponents, IgcSliderComponent, IgcRangeSliderComponent } from 'igniteui-webcomponents';
22
import 'igniteui-webcomponents/themes/light/bootstrap.css';
33
import './SliderStyling.css';
44

55
defineComponents(IgcSliderComponent);
6+
defineComponents(IgcRangeSliderComponent);
67

78
export class SliderTicks {
89
constructor() {

0 commit comments

Comments
 (0)