little transitioning grid highlight effect by using a fixed pseudoelement on the body & focus-within

Опубликовано: 25 Март 2026
на канале: 3SD Code
29
1

:root { --grid--accent: transparent; }
:root:focus-within { --grid-accent: white; }

Use focus-within like state and update the custom property that defines the color of that square 🤙

It's like using :has() creating a neat little highlight effect when anything is focussed ✨

(Uploaded the video again to see if the compression on this one doesn't butcher it 🤞)

#ytshorts #html #css #javascript #programming #trendingshorts #trend #youtubeshort #ytshort #yt #ytshortsindia #shortsvideo #shorts #shortsfeed #shortfeed #viral #ui

🎯 SUBSCRIBE to get more amazing AI Videos!

► https://www.youtube.com/@3sdcode?sub_...

Video Credit By:   / jh3yy