Earlier quoted context omitted.
This should make white-boarding interviews a lot more fun. "Please implement Minesweeper, but only using HTML + CSS"
Why would you give "them" ideas?
Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
91–97 of 97 posts
Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#92Earlier quoted context omitted.
This is awesome - Could you please explain how you're holding state of each box individually without checkbox:checked? It's not immediately obvious to me how that's possible or where it's happening in your code!
Thanks! I use scroll position to keep the state. In effect, each square is in a div with overflow:hidden. (In the actual code I used , not , which might've been to save bytes because the server is so slow). It has a fixed visible height, the height of the square. Above the fold (before scrolling) is the un-clicked square, and below the fold (what you see after scrolling) is the clicked square. Since overflow is hidde…
Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#93Earlier quoted context omitted.
I saw that a few days before I started making this actually! https://news.ycombinator.com/item?id=23867569
I always wonder what kind of cool stuff HN inspires. There has to be tons. Is there a list?
Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#94Earlier quoted context omitted.
This is awesome - Could you please explain how you're holding state of each box individually without checkbox:checked? It's not immediately obvious to me how that's possible or where it's happening in your code!
Thanks! I use scroll position to keep the state. In effect, each square is in a div with overflow:hidden. (In the actual code I used , not , which might've been to save bytes because the server is so slow). It has a fixed visible height, the height of the square. Above the fold (before scrolling) is the un-clicked square, and below the fold (what you see after scrolling) is the clicked square. Since overflow is hidde…
Thank you!
Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#95Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#96Earlier quoted context omitted.
The "Play it here" link on the github page works. Seems like the "click click" message, which is shown only on op's direct link, causes some problems.
OHHH I wish the others would have been more specific other than "it doesn't work". Thank you! The way that random thing works is: 1) #randommenu:target shows the overlay (based on hash in the url) 2) the overlay has a link to "#" (fullscreen) that says "click-click" 3) Then rendered ontop of the link, all 16 level labels are full screen & transparent 4) Animations loop through them (hard-coded random scramble) to cha…
Sometimes it works though, needs some „clicking“ (touching), eventually it will (might) work.
Re: Show HN: MineSweeper implemented in 100% CSS and HTML – no JavaScript
#97The 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.