Kalium Kalium -4 years ago 112
CSS Question

What is the CSS colour name: "background"?

background
is a valid colour in CSS. It differs per browser; it's a shade of purple in chromium. I can't find any information on it and was wondering why it exists and what it is.



.test {
height: 200px;
width: 200px;
background-color: background;
}

<div class="test"></div>




Answer Source

It refers to one of the CSS2 system colours, now deprecated.

Note that you get the same result with Background, as it's listed in that documentation; CSS is case insensitive, I think they're just listed in CamelCase to make the word boundaries clearer.

.test {
  height: 200px;
  width: 200px;
  background-color: Background;
}
<div class="test"></div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download