Skip to content

Conversation

braebo
Copy link
Member

@braebo braebo commented Oct 19, 2024

  • changed filter: drop-shadow to box-shadow
  • added a subtly larger shadow to the hover transition
  • moved the shadow from the a to the img and removed overflow: hidden from a
  • changed filter: none to filter: grayscale(0) to fix the transition on safari

overflow: hidden caused safari to clip the shadows regardless of whether they were defined on the a or img tag for both drop and box shadows.

- changed `filter: drop-shadow` to `box-shadow`
- added a subtly larger shadow to the hover transition
- moved the shadow from the `a` to the `img` and removed `overflow: hidden` from `a`
- changed `filter: none` to `filter: grayscale(0)` to fix the transition on safari

`overflow: hidden` caused safari to clip the shadows regardless of whether they were defined on the `a` or `img` tag for both `drop` and `box` shadows.
Copy link

vercel bot commented Oct 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2024 0:57am

@braebo
Copy link
Member Author

braebo commented Oct 19, 2024

Screenshot 2024-10-19 at 4 01 17 PM

Screen Recording 2024-10-19 at 4 07 01 PM

@braebo braebo changed the base branch from antialiasing to main October 19, 2024 20:17
@braebo
Copy link
Member Author

braebo commented Oct 19, 2024

Looks like the linter is mad about enhanced:img tags being selected in css as img... it's claiming it doesn't exist.

@braebo
Copy link
Member Author

braebo commented Oct 19, 2024

Should I just wrap them in :global?

@Rich-Harris
Copy link
Member

I've been ignoring those linter warnings until we figure out a more general solution! AFK so can't investigate but I wonder if adding transform3d(0,0,0) would help? That fixed a similar safari issue recently without having to use box-shadow (which looks and performs worse IME), don't know if it's relevant here

@braebo
Copy link
Member Author

braebo commented Oct 19, 2024

I tried translate3d(0,0,0) early on but I don't think I tried putting it on everything, could have just been on the wrong element.

Edit: Turns out I'd already added translate3d(0,0,0) to the img, but moving it to the a tag did the trick!

Turns out `transfrom: translate3d(0,0,0)` was already there, but moving it from the `img` to the `a` tag did the trick!
@Rich-Harris Rich-Harris merged commit df96995 into main Oct 20, 2024
3 checks passed
@Rich-Harris Rich-Harris deleted the safari-fix branch October 20, 2024 00:57
@Rich-Harris
Copy link
Member

amazing, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants