Adjusted the default height from 44px to 40px to match the height of buttons.
Added a medium variant at 32px in height.
Cleaned up styles to minimize overrides for variants.
Replaced "On" icon transition from translate to left. This allows it to animate flush right regardless of the width of the button container. With left, percentage values are relative to its container. With translate, percentage values are relative to itself.
This has been visually tested in Chrome, Firefox, and Safari.
Notes:
44px
to40px
to match the height of buttons.medium
variant at32px
in height.translate
toleft
. This allows it to animate flush right regardless of the width of the button container. Withleft
, percentage values are relative to its container. Withtranslate
, percentage values are relative to itself.