Skip to content

Commit e7fbb88

Browse files
zankevichyggg
authored andcommitted
fix(toggle): alignment of toggle switches (#2561)
(cherry picked from commit 09a7ba1)
1 parent 5bc3e14 commit e7fbb88

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/framework/theme/components/toggle/_toggle.component.theme.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@
1818
We need to set initial positions as Angular animations won't work in IE11 if positions have no initial value.
1919
Setting it in SCSS as we don't have access to theme variables from TS.
2020
*/
21-
22-
$switcher-vertical-offset: (nb-theme(toggle-height) - nb-theme(toggle-switcher-size)) / 2;
2321
@include nb-ltr() {
2422
&.checked .toggle-switcher {
2523
left: calc(100%
2624
- #{nb-theme(toggle-switcher-size)}
2725
- #{nb-theme(toggle-border-width)}
28-
- #{$switcher-vertical-offset});
26+
- #{nb-theme(toggle-border-width)});
2927
}
3028

3129
&:not(.checked) .toggle-switcher {
@@ -38,7 +36,7 @@
3836
right: calc(100%
3937
- #{nb-theme(toggle-switcher-size)}
4038
- #{nb-theme(toggle-border-width)}
41-
- #{$switcher-vertical-offset});
39+
- #{nb-theme(toggle-border-width)});
4240
}
4341

4442
&:not(.checked) .toggle-switcher {

0 commit comments

Comments
 (0)