+ 2

is the the inherit tag needed?

is is needed that we put “background-repeat: inherit” for it to inherit the style of the parent tag, or does it inherit anyway without having to specify it??

20th Jan 2018, 2:42 AM
SoniiSab
SoniiSab - avatar
3 odpowiedzi
+ 11
It depends, not all styles are inherited by default. For example color will be inherited by the descendents but it's not the case for border property. 😉 💡 Source https://developer.mozilla.org/en-US/docs/Web/CSS/inheritance
20th Jan 2018, 3:32 AM
Zephyr Koo
Zephyr Koo - avatar
+ 3
The best time to use inherit is when you plan on changing it during execution. Then, change one element and they all change. It also makes sense to use when wanting to override tag or class based attributes.
20th Jan 2018, 2:56 AM
John Wells
John Wells - avatar
+ 1
Thank youu 😁
20th Jan 2018, 3:38 AM
SoniiSab
SoniiSab - avatar