Recently, while using Firefox version 49, I accidentally discovered that it parses 4-digit hex colors as rgba. After referring to the CSS specification and searching through MDN, I couldn't find any documentation about this feature. Can anyone provide an explanation for this behavior?
.content {
background-color: #fff;
padding: 20px;
border: 1px solid #999;
text-align: center;
position: relative;
}
.overlay {
position: absolute;
background-color: #f5f5;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
<div class="content">
<img src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png?v=c78bd457575a" />
<div class="overlay"></div>
</div>