DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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 Author

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 Author

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 on

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

๐ŸŒš Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.