Skip to content

Commit 745535b

Browse files
committed
refactor(slider): adjust label positioniong so it's centered in IE11
1 parent e594dc8 commit 745535b

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

projects/igniteui-angular/src/lib/core/styles/components/slider/_slider-component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
}
4949

5050
@include e(label-#{$t}) {
51-
@extend %igx-thumb-display !optional;
51+
@extend %igx-label-display !optional;
5252

5353
.label {
5454
@extend %igx-thumb-label !optional;

projects/igniteui-angular/src/lib/core/styles/components/slider/_slider-theme.scss

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,26 @@
166166
}
167167
}
168168

169-
%igx-thumb-label {
169+
%igx-label-display {
170170
position: absolute;
171171
display: flex;
172+
justify-content: center;
173+
align-items: center;
174+
flex-direction: column;
175+
height: $slider-thumb-height;
176+
outline-style: none;
177+
top: -#{rem($slider-thumb-radius)};
178+
margin: 0 auto;
179+
}
180+
181+
%igx-thumb-label {
182+
position: relative;
183+
display: flex;
172184
align-items: center;
173185
justify-content: center;
174186
flex: 0 0 auto;
175-
top: -#{rem($slider-thumb-height - 6px)};
187+
top: -#{rem($slider-thumb-height - 4px)};
188+
left: -50%;
176189
pointer-events: none;
177190
min-width: rem($slider-label-width);
178191
height: rem($slider-label-height);
@@ -181,7 +194,7 @@
181194
margin: 0 auto;
182195
font-size: $slider-label-font-size;
183196
font-weight: $slider-label-font-weight;
184-
line-height: 1;
197+
line-height: rem(18px);
185198
color: --var($theme, 'label-text-color');
186199
background: --var($theme, 'label-background-color');
187200
opacity: 0;

0 commit comments

Comments
 (0)