Skip to content

Commit

Permalink
fix(toggle): alignment of toggle switches (#2561)
Browse files Browse the repository at this point in the history
  • Loading branch information
zankevich committed Oct 28, 2020
1 parent 23e59ba commit 09a7ba1
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 09a7ba1

Please sign in to comment.