I am trying to make a circular icon, and I noticed that the border radius
doesn’t work properly in Safari. Here is what the icon looks like:
As you can see, the icon edge in Safari is getting rounded for some reason. I tried the other solution mentioned on StackOverflow
but it still doesn’t work.
Is border-radius the only way to make a circular figure? Can you make a circle without the border-radius
?
.fa-file-lines{
display: block;
width: 88px;
height: 88px;
border-radius: 50%;
padding: 26px;
margin-left: 69px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="sampleIcon">
<i class="fa-solid fa-file-lines"></i>
</div>
2
Answers
Unfortunately I don’t have Safari, so I can’t test this, but looking at your code it seems like you are applying the
border-radius
to the icon instead of the black frame/container. Maybe that’s the reason Safari is chopping its edges (I have no clue why it works in Firefox).Try applying the border style to the container like this:
you’re experiencing with the border radius not working properly in Safari could be related to the padding property that you’ve applied to the icon.