How do you create variable font size based on width of parent element?

This is likely more of a CSS question but does Connect have a way to do the following:

I have a of fixed width because of limited space. Inside the is a data selection with a variable length.

Can the font size be set to resize up or down to fill the available width?

thanks

Lou

Hello Lou,

Have a look at this link, the top voted answer has a link to a site which explains what you`d like to do. Thanks!

Francis C

Thanks, I checked the link and tried it.
Viewport sized typography does not seem to work. When I try to add the font-size property as “5vw”, Connect does not accept it as a valid value.

Perhaps you could post an example use of the viewport sized typography in Connect?

thanks
Lou

Hello Lou,

Sorry for the late reply I had seen your answer while I was on a call and it slipped my mind afterwards. I tried it out myself and it is indeed working. The text resizes when you change the size of the browser`s window. I am not sure why it did not accept it as a value for you, as it worked for me. Here is a simple piece of code I wrote to test it out, you can copy it into your source and try it for yourself (no changes to css necessary).

HELLO

Cheers!

Francis C

https://learn.objectiflune.com/discourse/t/jquery-1-11-3-not-supported/421/1

Look at the last comment.

Regards,
Thomas