+ 1

How we can use "inherit" value for font-variant property in CSS?! What's the result of its usage?

I need help about "inherit" value for font-variant property in CSS.

30th Jan 2018, 5:05 AM
Ahmad Heidari
Ahmad Heidari - avatar
2 odpowiedzi
+ 5
As with anything else with the value of inherit, the value of the font-varient will be the same as that of its parent element. Say you have a div tag with a p tag as its child. The div tag has the attribute font-varient being equal to small-caps and the font-varient for the p tag is equal to inherit. Because the value is being inherited from its parent, the font-varient for the p tag will then be equal to small-caps, as that is what the value of it is for its parent. Hope this cleared that up! d:
30th Jan 2018, 5:16 AM
Faisal
Faisal - avatar
+ 2
Thank you Faisal. It is completely cleared!
30th Jan 2018, 5:25 AM
Ahmad Heidari
Ahmad Heidari - avatar