Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Font-Scaling with screen dimension

Font-Scaling with screen dimension

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 65 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    studiocool
    wrote on last edited by
    #1

    Hi Forum,

    I couldn't find a post of someone with the same problem, so I'm opening one up here:

    I've tried to define all sizes (dimensions and font size) in percentages. This works well for most aspect ratios, but becomes problemativ for extrawide formats (eg. 21:9).

    I tried to set a 'max content width' in Lay settings, which applies to the grid, but fonts keep scaling further when widening the window.

    EXAMPLE VIDEO

    I tried to fix it myself by using custom CSS with a 'max font size' parameter as shown here, but had the feeling it was being ignored by my browser. (Edge)

    Can you give me a hint on what class to apply the max font size to, or how to realize my idea?

    Greetings,
    Philipp

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by arminunruh
      #2

      hey there!

      yes, a percentage based font size is actually a "vw" size which means viewportwidth, so the content max width setting will have no effect on this

      you can add your own media queries
      Screenshot 2023-03-14 at 20.29.57.png

      when you take a look at your textformat, you see: "HTML Class:" _Headline1

      (it will be a different word)

      then create css:

      lay options → custom css & html → Custom CSS
      (dont put this in custom css for desktop or mobile)

      @media (min-width: 1600px){
      ._Headline1{
      font-size: 70px!important;
      }
      }
      

      https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      I also code custom websites or custom Lay features.
      šŸ’æ Email me here: šŸ’æ
      info@laytheme.com

      Before you post:
      1. When using a WordPress Cache plugin, disable it or clear your cache.
      2. Update Lay Theme and all Lay Theme Addons
      3. Disable all Plugins
      4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

      This often solves issues you might run into

      When you post:
      1. Post a link to where the problem is
      2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
      3. If the problem is difficult to explain, post screenshots / link to a video to explain it
      Online Users
      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
      laytheme.com
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Search