Skip to content

Commit

Permalink
fix(toggle): alignment of toggle switches (#2561)
Browse files Browse the repository at this point in the history
(cherry picked from commit 09a7ba1)
  • Loading branch information
zankevich authored and yggg committed Jan 19, 2021
1 parent 5bc3e14 commit e7fbb88
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
We need to set initial positions as Angular animations won't work in IE11 if positions have no initial value.
Setting it in SCSS as we don't have access to theme variables from TS.
*/

$switcher-vertical-offset: (nb-theme(toggle-height) - nb-theme(toggle-switcher-size)) / 2;
@include nb-ltr() {
&.checked .toggle-switcher {
left: calc(100%
- #{nb-theme(toggle-switcher-size)}
- #{nb-theme(toggle-border-width)}
- #{$switcher-vertical-offset});
- #{nb-theme(toggle-border-width)});
}

&:not(.checked) .toggle-switcher {
Expand All @@ -38,7 +36,7 @@
right: calc(100%
- #{nb-theme(toggle-switcher-size)}
- #{nb-theme(toggle-border-width)}
- #{$switcher-vertical-offset});
- #{nb-theme(toggle-border-width)});
}

&:not(.checked) .toggle-switcher {
Expand Down

0 comments on commit e7fbb88

Please sign in to comment.