Page 1 of 1

Layout Grids - Set Font Attribute per Browser View Size

Posted: Mon Apr 27, 2020 12:43 am
by ColinM
I'm just really getting into Layout Grids (yes, it should have happened a long time ago and why it hasn't is a long story of justification :D :? ). So if this request demonstrates I'm missing something, then please let me know.

Layout grids are great. But the font size and attributes stay the same and can't be changed unless you take the break point / responsive text route. So you are stuck with what could be overlarge texts (say the main header) - unless you use a BP - and optionally elect to scale objects via general settings.

Is it possible to be able to set font attributes based on screen (view) width. It would act like a BP. You only add it when you need it.



Hope that makes sense.

Re: *** NOT POSSIBLE ***Layout Grids - Set Font Attribute per Browser View Size

Posted: Mon Apr 27, 2020 6:33 pm
by crispy68
Hey Colin,

You could achieve it by doing this:

1. Create a custom style in the style manager. This will control the default view. In this example, the default view is 970px.

2. Add your own media queries like such to the <head> section in page properties using whatever breakpoints you want. In this example, I used 768 and 480.

Code: Select all

<style>
@media only screen and (max-width: 969px){.CustomStyle{font-size:48px;}}
@media only screen and (max-width: 767px){.CustomStyle{font-size:36px;}}
@media only screen and (max-width: 479px){.CustomStyle{font-size:26px;}}
</style>
where 'CustomStyle' is the name of your style created in the Style manager. The above only controls the font size but you could add other attributes if needed.

Re: *** NOT POSSIBLE ***Layout Grids - Set Font Attribute per Browser View Size

Posted: Mon Apr 27, 2020 8:45 pm
by ColinM
Hey Crispy,

That's awesome mate! Thank you very much. 8)