Can I use calc to change multiple parent sizes?

Joined
Oct 31, 2021
Messages
7
Reaction score
0
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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top