CSS Humor

248 points · 16 comments · view on lemmy.world

16 Comments

lurch@sh.itjust.works · 43 pts · 2y (6 replies)

I refuse to believe that's CSS. What is that colon at the end even?

bleistift2@feddit.de · 31 pts · 2y (4 replies)

It’s a typo. The colon should be a semicolon. But since it’s the last declaration, it’s optional.

hibsen@lemmy.world · 18 pts · 2y (3 replies)

I don't think bottom is a valid value for the position property either.

bleistift2@feddit.de · 26 pts · 2y (1 reply)

Yep, and align isn’t a real property, either.

hibsen@lemmy.world · 10 pts · 2y

How deep does this rabbit-hole go?!

xmunk@sh.itjust.works · 6 pts · 2y

And yet someone on the internet would unsarcastically comment that just adding flex-box would fix it.

micka190@lemmy.world · 10 pts · 2y

It'll just get ignored. I saw a fucking padding: 0.0.3rem at work today, and it just broke the one class.

desmosthenes@lemmy.world · 27 pts · 2y (2 replies)

came to hate on this code; it’s not valid lol

YoorWeb@lemmy.world · 2 pts · 2y (1 reply)

Probably on purpose.

desmosthenes@lemmy.world · 1 pts · 2y

oh 100%

captainjaneway@lemmy.world · 25 pts · 2y (1 reply)
#moustache {
  position: absolute;
  bottom: 10px;
  margin: 0 auto;
}

If that doesn't work:

#moustache {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

Relative positioning is preferred but not always available if the parent face is positioned absolutely.

Edit: adjusted bottom from 0 -> 10px since 0 would be at the bottom of the chin but there is obviously some padding to bring it nearer the lip

ensignrolaren@lemmy.world · 3 pts · 2y

I came here to post this and I wouldn’t have clogged up the thread with this useless comment except for your username. I salute you

CaptDust@sh.itjust.works · 20 pts · 2y

Moustache seems generic for an id, maybe you meant to apply as .moustache? Let's keep things consistent please

Edit: center also seems unnecessary, in the beta moustaches are already aligned as a child of .facial-hair

some_guy@lemmy.sdf.org · 4 pts · 2y

Hahaha. First true boisterous laugh of the day. Thanks!

hakunawazo@lemmy.world · 3 pts · 2y

Just use JS and get X Y position of nose and put it a few pixel below. So it would be still valid if the nose moves.

MilderRichter@feddit.de · 1 pts · 2y