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

No members online now.

Forum statistics

Threads
473,981
Messages
2,570,188
Members
46,731
Latest member
MarcyGipso

Latest Threads

Top