portfolio-website icon indicating copy to clipboard operation
portfolio-website copied to clipboard

The background gradient color does not work on safari browser?

Open norelleliang opened this issue 2 years ago • 5 comments

The background gradient color does not work on safari, it just blank once open in safari, anyway on how to fix it?

norelleliang avatar Aug 24 '23 20:08 norelleliang

I solved this by adding style={{ transform: 'translate3d(0,0,0)' }} directly on the div.

<div style={{ transform: 'translate3d(0,0,0)' }} className="absolute top-[-6rem] -z-10 right-[11rem] h-[31.25rem] w-[31.25rem] rounded-full blur-[10rem] sm:w-[68.75rem] bg-[#946263]"></div>

Reference

aldotestino avatar Sep 24 '23 20:09 aldotestino

I added the same inline style to the div but there's some flickering that occurs and won't stop until it fully loads or if you scroll down then back up again. You can probably reproduce the behavior by repeatedly refreshing the affected page. I tried to additionally (and independently) add "transform-gpu" to the Tailwind CSS class name but that didn't fix it either. @aldotestino

vishal-parekh avatar Sep 24 '23 21:09 vishal-parekh

According to my knowledge u have to change the div style or className that needs to be positioned on the left edge (which chrome does by default). IT might work in that way. just using basics css concept.

akash6565 avatar Oct 27 '23 13:10 akash6565

I solved this by adding style={{ transform: 'translate3d(0,0,0)' }} directly on the div.

<div style={{ transform: 'translate3d(0,0,0)' }} className="absolute top-[-6rem] -z-10 right-[11rem] h-[31.25rem] w-[31.25rem] rounded-full blur-[10rem] sm:w-[68.75rem] bg-[#946263]"></div>

Reference

this breaks light and dark mode on safari desktop and mobile

flip-in avatar Dec 19 '23 04:12 flip-in

I solved this by adding style={{ transform: 'translate3d(0,0,0)' }} directly on the div.

<div style={{ transform: 'translate3d(0,0,0)' }} className="absolute top-[-6rem] -z-10 right-[11rem] h-[31.25rem] w-[31.25rem] rounded-full blur-[10rem] sm:w-[68.75rem] bg-[#946263]"></div>

Reference

this breaks light and dark mode on safari desktop and mobile

i also had the same issue you can use next-themes npm package to setup light and dark mode easily. It won't break on safari mobile desktop (with this style property added).

Poojan-20 avatar Dec 30 '23 12:12 Poojan-20