DEV Community

Discussion on: Help me make this code worse.

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!