<div class="parent">
<div class="child"></div>
</div>
.child {
background: red;
}
I have 5 parent divs with their child inside and each child has a different background color.
How I can get the child background color and reuse it as parent border color?
Note: Unfortunately, the childs background color is set and I cannot change it so I need some way to get it and reuse it for the parent.
Note: I am aware that with CSS only this is not possible so If someone can help me with JS or jQuery.