by JaneOri on 7/22/20, 8:03 PM with 92 comments
by JaneOri on 7/22/20, 8:04 PM
I linked to the README since any web devs that see this will probably want to know how buuut here's a link to the game if you want to go hands on:
https://propjockey.github.io/css-sweeper/#randommenu
It's all open source, and I discuss some details of how to do it in that readme, but I am more than happy to answer any questions!
Thanks for checking it out!
by uxamanda on 7/22/20, 10:49 PM
With this post, I think I am starting to grok the (Space Toggle) trick. The Tweet you linked in your library was really helpful [2].
My current understanding is – in CSS, you can set a variable to nothing (a space). When a property contains that "blank" variable, it is replaced by nothing and so the second, "fallback" value is the default. Because you can update CSS variables within more specific or later CSS, you can update the "blank" variable and give it a new value of "initial", this causes it to switch from the default to the defined override.
I realized, you can even combine this with the CSS checkbox hack. I made a (super hacky) version of CSS-only dark mode toggle based on your JSBin (gotta love an absolute positioned bg, lol) [3]
[0] https://propjockey.github.io/css-media-vars/ [1] https://news.ycombinator.com/item?id=23865900 [2] https://twitter.com/James0x57/status/1283596399196680192/pho... [3] https://jsbin.com/xelufoyoka/1/edit
by kanobo on 7/22/20, 8:35 PM
by jedberg on 7/22/20, 10:21 PM
by onion2k on 7/22/20, 9:26 PM
by krspykrm on 7/22/20, 10:19 PM
by krapp on 7/23/20, 1:53 AM
by jagger27 on 7/23/20, 1:12 AM
What hope does one have to implement the entire CSS spec from scratch now?
by osrec on 7/22/20, 8:57 PM
And also, what causes the lack of responsiveness?
by mitchtbaum on 7/22/20, 9:38 PM
by divbzero on 7/22/20, 10:09 PM
by kristopolous on 7/23/20, 12:49 AM
by aaroninsf on 7/22/20, 9:56 PM
is CSS/HTML turing complete?
If so I look forward to a Show HN of a CSS/HTML emulator of JSMESS emulating a 386 running Windows 98.
by MrSourz on 7/22/20, 9:46 PM
by roryokane on 7/25/20, 7:21 AM
The other thing you need to know to play is that right-clicking won’t flag a square. Instead, you need to left-click on the flag in the top left to toggle flag mode, then left-click on a square to flag it.
by Sniffnoy on 7/23/20, 12:08 AM
Edit: Nevermind, figured it out. You click on the flag up top to switch between flagging and clearing.
by hughw on 7/22/20, 10:36 PM
by TedDoesntTalk on 7/22/20, 9:21 PM
by soulofmischief on 7/22/20, 11:14 PM
by buryat on 7/22/20, 10:50 PM
by lostgame on 7/22/20, 10:45 PM
by edem on 7/23/20, 8:45 AM
by draw_down on 7/22/20, 9:18 PM