Follow

RT jhey 🔨🐻✨
This week's @CodePen challenge is all about CSS :has() 😎
But you'll also notice this demo has a pure CSS timer 👀 That's using CSS "@ property" which is currently only in Chromium but there's intent for webkit 🙌
p.s Cheat code for this game is "cmd + opt + C" (DevTools 😅)
jhey 🔨🐻✨: CSS Tip! ✨
Use CSS :has() on the :root to check for a condition on the page 🧐
For example, this pure CSS Minesweeper game 🤯
:root:has([id*="bomb"]:checked) body {
--show-fail: 1;
}
If a bomb gets :checked, game over! 😭
@CodePen link below! 👇

:sys_twitter: twitter.com/jh3yy/status/16107

· · Twitter · 0 · 0 · 0
Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。