Which properties are inherited by default?
By default, mostly typography, text, and a few properties related to visibility and the cursor are inherited. Key groups:
Inherited:
Text and fonts
font-sizefont-familyfont-stylefont-weightline-heightletter-spacingword-spacingtext-aligntext-transformtext-indentwhite-spacetext-shadow
Color
color
List
list-style,list-style-type,list-style-position,list-style-image
Table and block-level text features
quotes
Cursor and interaction
cursorvisibility
Others
pointer-events(partially)direction
Not inherited:
margin,padding,borderwidth,heightdisplayposition,top/right/bottom/leftbackground-*flex-*,grid-*
Conclusion
The properties that are inherited are the ones it makes sense to pass to children for consistent text styling, while anything that affects the box model, sizing, and positioning is not inherited.
If you need to force a property to inherit, you can set:
css
property: inherit;And to reset it to its initial value:
css
property: initial;Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.