Can I use calc to change multiple parent sizes?

Oct 31, 2021
Reaction score
Hello folks;
I have an oddball question. I'm working on a website where I would like to make text in different areas slightly larger then the parent element. Let's say there are three strings of text, all of different size. I want one word in each of these to be 10% larger. Can I use var to set different font sizes and then use calc on it?
something like
div { font-size: calc(parent-font * 1.1);

I made a quick codepen to demonstrate this


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question