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

Radio buttons appearing as squares on iOS 9.1 #20214

Closed
tekoyaki opened this issue Jun 30, 2016 · 5 comments
Closed

Radio buttons appearing as squares on iOS 9.1 #20214

tekoyaki opened this issue Jun 30, 2016 · 5 comments

Comments

@tekoyaki
Copy link

Is this an intentional styling of bootstrap?

screen shot 2016-06-30 at 1 39 21 pm

Screenshot taken directly from BS4 docs page without alterations. Tested on iPhone 6s and iPhone simulator from xcode.

@cvrebert cvrebert changed the title [BS4a2] Radio buttons appearing as squares on iPhone Radio buttons appearing as squares on iOS 9.1 iPhone 6 Jul 1, 2016
@cvrebert
Copy link
Collaborator

cvrebert commented Jul 1, 2016

No, not intentional.

@tekoyaki
Copy link
Author

tekoyaki commented Jul 4, 2016

It seems to be caused by input { border-radius: 0; }

Mobile safari uses border-radius: 8px by default.

@cvrebert cvrebert changed the title Radio buttons appearing as squares on iOS 9.1 iPhone 6 Radio buttons appearing as squares on iOS 9.1 Jul 4, 2016
@tekoyaki
Copy link
Author

tekoyaki commented Jul 4, 2016

Pretty odd behavior of mobile Safari.

simulator screen shot jul 4 2016 11 18 57 am

http://codepen.io/radiuskuntoro/pen/rLwzpE

@cvrebert
Copy link
Collaborator

cvrebert commented Jul 4, 2016

Indeed. Using the style inspector shows that iOS Safari's UA stylesheet includes:

input[type="radio"] {
  -webkit-appearance: radio;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;
  width: 16px;
  height: 16px;
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  background-color: rgba(255, 255, 255, 0.00784314);
}

And as your CodePen demonstrates, our code is also affecting iOS Safari's default checkbox styles, which are:

input[type="checkbox"] {
  -webkit-appearance: checkbox;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  width: 16px;
  height: 16px;
  padding-top: 0px;
  padding-right: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  background-color: rgba(255, 255, 255, 0.00784314);
}

@mdo mdo modified the milestone: v4.0.0-alpha.4 Jul 28, 2016
@mdo
Copy link
Member

mdo commented Oct 3, 2016

Fixed by #20695.

@mdo mdo closed this as completed Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants