XF 2.2 Responsive font size in posts?

Luke247

Member
For example, when the font size is 26px (in a post), how can I make it automatically resize to 18 px in mobile, either using .less or with a code in the post?

Thank you in advance.
 
Where do you try to change font size exactly ?
In the message body ?

You have to change that in ACP > Typo
Yes, I'm trying to make the text in the message body responsive. You can change the font size with (open bracket) size=36px (then closed bracket) for example. Trying to figure out how to do it with rem or vw as mentioned above...
 
Just because it works, doesn't mean it's right.

I would consider this an anti-pattern.

Using the w3c supplied font scale using relative units is the better, standardized approach.

px should be avoided in anything responsive and throwing in a media query to remedy that is putting a band-aid on another band-aid.

core xf font sizing needs improvement, so it's not exactly your fault here and, hey, if it works, it works, but this should be addressed by XF in a future release IMO.
 
Top Bottom