logoalt Hacker News

CSS Hell

209 pointsby gawsyesterday at 9:58 PM87 commentsview on HN

Comments

riggsdktoday at 12:16 AM

I spent waaay too long trying to figure out why my CSS rule didn't work. It doesn't accept me to overwrite an already existing one. The rules did not specify this at all. It is not clear that the game wants me to find another rule that fixes the problem instead of adding a single perfectly valid line of CSS that does it. There is a huge difference between those two. CSS being cascading meaning that any CSS property coming after an initial rule will overwrite the previous one (in part or fully). It would be really nice if the game would tell me if the rule I added wasn't allowed instead of just silently failing to do anything with no feedback.

show 7 replies
croemertoday at 4:38 PM

The peg is bigger than the hole in #1 making me think I need to scale the peg down. Turns out you don't actually need to get the peg inside the hole, you only need them to touch!

Fun once one figures it out. Text editing is a little annoying as one can't highlight with the cursor and delete.

egonschieletoday at 4:58 PM

I'd love to plug Josh Comeau's excellent CSS course https://css-for-js.dev/ Expensive but worth every penny.

<I'm not affiliated with Josh in any way>

unangsttoday at 10:37 AM

Normalize adding a screenshot of what we are missing when you decide for us that a site isn’t mobile friendly.

show 1 reply
meew0today at 12:55 PM

This was a great challenge, thanks for sharing! I do agree that the messaging could be improved a bit about what is possible and what is not.

Here are my solutions, for anyone who is interested: https://gist.github.com/meew0/98cca86cd3f64ee71fe39bf747aa01...

show 1 reply
KolyaKorneliustoday at 8:57 AM

It doesn't allow margin-right, you have to use margin to set the right margin. This may be someone's personal hell, not mine.

simonwtoday at 12:43 AM

I got this message on my phone:

"I mean, would you write code on your phone? Actually, don't answer, because I don't want to know."

Yes I would - I do that pretty often these days (partly because LLMs called from my phone do the frustrating typing part for me.)

show 5 replies
croemertoday at 4:27 PM

typo of blasphemized in: "you blashpemized Cascading Style Sheets", actually should be blasphemed even

butztoday at 4:26 PM

!important does not work? This is really hell.

SadWebDevelopertoday at 5:15 AM

I didn't understand what is the point of the first challenge? anyone care to explain me what is the objective/task because there are just two circles and basically no instructions, kinda feels like a real job (lol)

show 2 replies
kevinsynctoday at 1:02 AM

I'm very, very good at CSS and this is absolutely maddening. I grudgingly respect it a lot more because it's really fuckin tough LOL. No overwrites, no transforms, locked elements you can't manipulate, limited amount of CSS property "slots" you're allowed per puzzle. In the age of AI where answers are immediate, hats off to something this absolutely infuriating hahaha

show 1 reply
djoldmantoday at 1:23 PM

Is it possible to construct a meta-system or constraint-system under which it's impossible or very difficult to construct 2 functions that effectively result in the same outcome? Does this exist?

It seems to me that CSS suffers from the "1 billion ways to do the same thing but very slightly differently" problem.

kirjavascripttoday at 1:43 AM

transform is forbidden but -webkit-transform seems to work :^)

show 1 reply
skeptruneyesterday at 11:16 PM

It would be fun to use this as a motivational punishment lol. Something like "team member who does the least amount of code review has to go through CSS hell" :).

show 1 reply
overhead4075today at 1:01 AM

Guess I'll go back to coding on my phone :'(

rightbytetoday at 10:29 AM

Nice. Feels abit like TAS-100, "the assembler game nobody asked for", but a bit more realistic.

hapidjustoday at 10:29 AM

On the first level margin-left:660px got accepted as a solution even though the peg barely overlaps.

odo1242today at 5:54 AM

By the way: the website restricts use of properties like transform() and animation, but the same restriction doesn’t apply to the transition property. Might be worth noting.

90s_devtoday at 1:51 AM

I like how I can click-drag one of the CSS text fields and still move the box.

show 1 reply
manuhabitelatoday at 8:10 AM

cool stuff :)

I got some warnings like "this is not a best practice and I don't like bad practices". Like hey, who are you to judge me like that? I'm offended.

jeffgrecotoday at 1:25 AM

I got stuck on #2 and had to look up the solution, which still doesn't seem to make sense?

show 2 replies
h1fratoday at 9:04 AM

First puzzle was hard, margin-right was not working. But you can't double click or use ctrl-arrow or ctrl-backspace which is infuriating.

Also typo in "Unfortuantely" message when you use the forbidden transform

zcrortoday at 8:45 AM

an extension to run with my phone would be nice

gaoryrttoday at 5:53 AM

#9 really got me.

yakshaving_jgttoday at 6:43 AM

I'm confused. I completed the first two puzzles just applying a simple

    transform: translate(x, y)
I thought I wasn't allowed to?

It seems like I can trivially complete the third puzzle with the same approach.

show 1 reply
Kamillaovatoday at 3:36 AM

> Web site created using create-react-app bro...

UltraSanetoday at 11:31 AM

I never understood why anyone would want to learn CSS

eek2121today at 12:48 AM

“Your viewport concerns me. Hey! You're seeing this message because of your screen- specifically, the width of it. I'm hyped you're here, but this game wasn't designed for small screens, and you will not enjoy attempting it. I mean, would you write code on your phone? Actually, don't answer, because I don't want to know. Anyway, hope to see you soon on a desktop. -Marcos”

Hopefully “Marcos” doesn’t need a job any time soon! :D

Unsure if the site is supposed to be satire or something because that is the message I received, however, CSS, including responsive design, is actually simple to pick up.

Note that I’m not a designer at all (because THAT requires actual skill), just a dev.

show 2 replies