Reputation: 81
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>
Upvotes: 7
Views: 157
Reputation: 122042
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>
Upvotes: 4