DEV Community

Adam Crockett 🌀
Adam Crockett 🌀

Posted on

Help me make this code worse.

Try to write bad code but it must be valid. What strange oddities do you know about in FE?

Top comments (6)

Collapse
 
theodesp profile image
Theofanis Despoudis

Emoji CSS classes I love it!

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

Braille unicode is also possible. Your team will thank you 😁

Collapse
 
kohloth profile image
kohloth

What does "background:background!important;" do? Apart from make the browser wonder what you are talking about whilst getting nervous about the fact that it was important? XD

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

I'm so glad you spotted that mostly everyone else just pretended they knew what that was. It is the most obscure CSS you can imagine. Consider your desktop walpaper, now remove the image, you will notice a colour. Black blue red yellow. background: background; uses the OS background colour as a CSS property. The important is.. just for fun.

Collapse
 
kohloth profile image
kohloth • Edited

You know, I did know that, but it was burred deep in my brain. Now that you explain it, I remember you explaining it to me in person last year! It is a really unusual thing...I'm guessing that it is a throwback to a really creaky old behaviour, as opposed to a new exciting feature!

Collapse
 
prusso profile image
Paul Russo

n / 0