News for hackers. Stuff that matters.
Re:Show HN: CSS Speedrun – A small game to test and improve ... by TomAnthony on Monday January 17, 2022 @06:14AM (#29965415)
This was fun. :)

I feel like there should be another scoring axis rather than just time. I think selector length would be wrong, but something like selector complexity, or how robust the selector is to updates.

I scored 3m 50s, but felt like some of my selectors were a bit 'dirty'.

Re:Show HN: CSS Speedrun – A small game to test and improve ... by _Microft on Monday January 17, 2022 @09:35AM (#29966893)
The timer encourages quick and dirty solutions. It took me a while to think of :is(input, button):not([disabled]) instead of a longer solution that I used at first. Another example was span[data-item] which is enough to mark exactly the required items at that level but I had found a longer, more specific selector for that first.
Re:Show HN: CSS Speedrun – A small game to test and improve ... by chrismorgan on Monday January 17, 2022 @09:46AM (#29966998)
> It took me a while to think of :is(input, button):not([disabled]) instead of a longer solution that I used at first.

The intended solution is just :enabled. This is where I think this project has failed badly in its stated goal to “improve your CSS knowledge”, because all it offers in that direction is a little hint link; to actually teach, it needs a set of proposed solutions, and at the end show you any where you differed.

Such a thing might also help suggesting just [data-item] instead of the needlessly-more-specific span[data-item]. And also whether :nth-child(2n+3) was the intended solution on one of them.

Re:Show HN: CSS Speedrun – A small game to test and improve ... by Vincenius on Tuesday January 18, 2022 @03:32AM (#29976569)
Thanks for your feedback! Just pushed an update to the project to show the solution which I thought of when creating the puzzle.
Re:Show HN: CSS Speedrun – A small game to test and improve ... by jamiethompson on Monday January 17, 2022 @07:29AM (#29965880)
I definitely "cheated" some of these by throwing in something horribly verbose rather than whatever a more correct solution would be
Re:Show HN: CSS Speedrun – A small game to test and improve ... by Vinnl on Monday January 17, 2022 @08:37AM (#29966398)
I felt dirty when I did something like

    #one, #three, #five, #six, #nine
(Or whatever the elements we had to select were.)
Re:Show HN: CSS Speedrun – A small game to test and improve ... by maaaaattttt on Monday January 17, 2022 @08:43AM (#29966456)
Same here, and to be honest I'm still not sure what the clean solution would be for this level. With that particular html structure and class/id usage there maybe isn't any…
Re:Show HN: CSS Speedrun – A small game to test and improve ... by dagurp on Monday January 17, 2022 @09:13AM (#29966706)
The hint suggests doing it this way. This solution is clean but it isn't very elegant.
Re:Show HN: CSS Speedrun – A small game to test and improve ... by dotancohen on Monday January 17, 2022 @12:28PM (#29968995)
Exactly. All the previous questions had real, elegant answers. This one felt like whacking the mole was _possible_, but not the right way.