Check out example codes for "css using the same background-color as the parent background". It will help you in understanding the concepts better.

Code Example 1

.child {
    float: right;
    background-color: inherit;
}

Learn ReactJs, React Native from akashmittal.com