Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom-toggle broken on Safari #8

Closed
iamDecode opened this issue Dec 1, 2017 · 1 comment
Closed

Custom-toggle broken on Safari #8

iamDecode opened this issue Dec 1, 2017 · 1 comment
Assignees
Labels

Comments

@iamDecode
Copy link

iamDecode commented Dec 1, 2017

When using the custom-toggle class in Safari, the toggle knob animates out of bounds.

screen recording 2017-12-01 at 01 04 pm

Expected Behavior

The toggle knob animates left (off) to right (on).

Current Behavior

On Safari the knob animates left out of the bounds of the control.

Possible Solution

This problem is in the difference in parsing left in the following snippet:

.custom-toggle .custom-control-input:checked + .custom-control-indicator:after {
  left: calc(100% - 3px);
  -webkit-transform: translateX(-100%);
          transform: translateX(-100%);
}

Using left: 95%; is a dirty way fix approximating the 3px margin, and seems to work in all browsers.

Steps to Reproduce

  1. Use Safari.
  2. Click toggle.

Context (Environment)

Tested on both Safari 10.0.2 (webkit 12604.4.7.1.3), and Safari Technology Preview 11.1 (release 44, webkit 12605.1.13.2). Ran on on MacOS Sierra 10.12.6.

@hisk
Copy link
Contributor

hisk commented Dec 1, 2017

This is great, thanks for your detailed submission! 😄 I'm on it!

@hisk hisk self-assigned this Dec 1, 2017
@hisk hisk added the bug label Dec 1, 2017
hisk added a commit that referenced this issue Dec 4, 2017
@hisk hisk closed this as completed Dec 4, 2017
jevel9 referenced this issue in zygotecnologia/shards-ui Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants