CSS Bootstrap Can Do That:
Relative Font Sizes

Base font size is 14px


This is 0.5em

This is 1em

This is 1.2em

This is 2em

This is 1.2em inside 1.2em

This is 0.5em inside 2em


This is 0.5rem

This is 1rem

This is 1.2rem

This is 2rem

This is 1.2rem inside 1.2rem

This is 0.5em inside 2em