Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamschwartz/6de9a191526ddd48a238002815fd64ec to your computer and use it in GitHub Desktop.
Save adamschwartz/6de9a191526ddd48a238002815fd64ec to your computer and use it in GitHub Desktop.
<title>iOS Safari bug: incorrect rendering of box-shadow on 19.2px square element with 50% border-radius</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width">
<style>
html {
font-size: 16px;
}
.circle-bug {
height: 1.2em;
width: 1.2em;
box-shadow: inset 0 0 0 1px red;
border-radius: 50%;
}
.circle-ok {
height: 19px;
width: 19px;
box-shadow: inset 0 0 0 1px green;
border-radius: 50%;
}
</style>
<p>This should render as a red circle, but in iOS Safari, it doesn’t (as of June 1, 2020):</p>
<div class="circle-bug"></div>
<br>
<p>This renders correctly as a green circle in all modern browsers (as of June 1, 2020):</p>
<div class="circle-ok"></div>
@adamschwartz
Copy link
Author

@adamschwartz
Copy link
Author

adamschwartz commented Jun 2, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment