Skip to content

Ring in combination with radius and offsets renders wrong in Safari #17959

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

Open
roydigerhund opened this issue May 9, 2025 · 5 comments
Open

Comments

@roydigerhund
Copy link

What version of Tailwind CSS are you using?

For example: v4.1.6

What browser are you using?

Safari 18.4 (20621.1.15.11.10)

What operating system are you using?

macOS 15.4.1 (24E263)

Reproduction URL

https://play.tailwindcss.com/Xbgvqjl0sg

Describe your issue

In Safari (Chrome and FF rendered correctly) when using the ring utility with ring-offset on an element with rounded corners, the rounded corners of the resulting box-shadow are rendered with a "dent".

It does not happen when using the offset utility, this way it can be used as a comparison.
The following screenshot shows the render bug on the left element.

Image

Possible solutions

  1. If the reason to use box-shadow instead of outline for the ring utility was the missing support for rounded elements, Tailwind could go back to outline because rounded elements are now supported.

  2. File a bug report for Safari. I haven't had a lot of success in the past with this, maybe it's quicker when someone from the Tailwind Labs team does it.

@philipp-spiess
Copy link
Member

Hey! We can't change ring to use outline over box-shadow since that would be a breaking change when used in combination with outline I'm afraid. So I recommend we do 2) and create a Safari issue for this and you can use outline for now that it follows the curvature of the element bounding box.

maybe it's quicker when someone from the Tailwind Labs team does it

Unfortunately (well, or fortunately, you don't want favoritism I suppose) not.

@roydigerhund
Copy link
Author

… since that would be a breaking change when used in combination with outline I'm afraid.

Yes, makes sense.

Do you wanna file the bug report on WebKit or shall I?

@rozsazoltan
Copy link

@roydigerhund
Copy link
Author

On a second thought, it probably makes sense to not use ring-* anymore in new projects since outline-* now works in all major browsers and you don't have to use the back with a shadow in background-color to get an offset. Outline offsets are transparent and therefore a better way.

The box-shadow issue should nevertheless be fixed by WebKit.

@sumansuhag

This comment has been minimized.

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

4 participants