As noted, this is for email templates, read in email clients like gmail, yahoo mail, Mail (ios app) and etc. Because of this. I cannot use jQuery, @media queries are stripped down, and classes also.
So I had a fixed font-size, but because on gmail on phones the width is smaller, a lot of times the text gets wrapper into 2 lines. What I want to do is to use a width dependent font-size. So what I tried was using vw like this:
<p style="font-family: 'Lato', sans-serif; font-size: 2.5vw;font-weight: bold;line-height: 34px; padding: 0 5%; margin: 5% 0 0 0; color: #24b646;">
{{title}}
</p>
</td>
My problem is that, even tho' my main view has max-width 640px. In order to set the fontsize it calculates on all the width.
So this has a weird effect. Even if the View itself is 640px, because the TAB is bigger, the text becomes bigger
From:
To:
Is it someway possible to make it so that vw will use the width of the parent as the dependent variable? If not, what else can I use, so that the font size will be dependent strictly on it's parent? (Either 640px - the max width for pc's, or on mobile, the width of the screen)