How to stop Chrome using a large font size after refreshing

I was having a torrid time trying to work out why sometimes my Genesis site had a much bigger font that it should have done. It only occurred in Chrome, and even more bizarrely, it was often OK the first time you viewed a a page, but only occurred when you refreshed it!

It turns out to be a chrome bug, and the work around is very simple, as described in this stackoverflow question. It’s caused because Genesis child themes tend to use the rem unit of measurements on the body tag. The rem unit is supposed to stop font-sizes compounding and getting out of control, but for some reason Chrome trips over when there’s an rem unit on the body tag. The good news is that you don’t need a rem unit on the body tag, because ems are only a problem when you have lots of them. Having one em unit is fine.

So if you’re affected by this bug, just look for the body tag in your CSS file, and change the font-size unit from rem to em – like this:

From this:

body {
	color: #666;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-size: 1.6rem;
	font-weight: 300;
	line-height: 1.625;
}

To this:

body {
	color: #666;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-size: 1.6em;
	font-weight: 300;
	line-height: 1.625;
}

Comments

  1. thanks, great tip!

  2. Thanks a lot for share, this works fine!

  3. I’ve seen/had this problem across a few sites but never thought to actually search for the solution.

    The moment I do the first site I find it yours and fortunately the font-size switch is oh-so-simple.

    Sorted! Thanks. 🙂

  4. I ran into this problem too. I don’t think it’s because of using rem vs. em. I think it’s because the html element has a font size of 62.5% in order to make everything ten-based. This must be the case with the code you’ve used as an example because 16px would be 1rem, not 1.6 unless the html font size is 62.5%. On my sites, I went back and changed the font size for the html to 100% and adjusted all the other font sizes by using a Sass mixin to calculate the rem size. This stopped the behavior.

  5. It might certainly be a better idea than relying
    on a taxi if you are travelling with bulky luggage.
    Enterprise also informed us that they will pick up passengers after the cruise if
    they want to rent a car to spend time visiting around Manhattan before their flight home.
    Coach timetables are available online prior to the ski season commencing and tickets can be purchased from the coach hire desk.

  6. Hello to every body, it’s my first visit of this webpage; this website includes remarkable and genuinely
    good stuff in favor of visitors.

  7. Costs Invokved – The tootal area off the areas that you simply need to carpet will determine the
    total cost of your respective carpeting.
    Your family will appreciate it too for creating a clan house means creating a healthy family.
    It makes sense that your old carpet ought to be vacuum
    cleaned inn order thuat dusts could be eliminated prior to it bsing removed.

  8. Unquestionably believe that which you said. Your favorite justification appeared to be on the net the easiest thing to be awware of.

    I sayy to you, I definitely get annoyed while people think about worries that they just don’t know about.
    Yoou managwd to hit thee nail upon the toop and defined out the whole thing
    without having side effect , people can take a signal.
    Will likely be back to gett more. Thanks

  9. There aree many different wine gift baskets to seect from, that I am sure yyou can find one which
    meeets their liking. Complete TV show season on DVD:
    If you aare somebody who watches TV or keeps their finger around the pulse of pop
    culture, you will know thee has rally been some great television on the air inn the last five to ten years.

    Anyone could be pleased tto be given a basket packed with goodieds or his favorite
    stuff.

  10. First, you must go with a grfade oof filter that can form a
    barrier uup against the forms of particles you aare tryng to defend
    against. Cooling aair for comfort, instead of industrial uses, was first were only available in 1924.
    Hiring ann HVAC contractor and also hardwearing .

    ductwork clean and sealed properly may help keep the home cleaner and more
    dust-free inn addition to help keep your family healthy and comfortable.

  11. Once you’ve succeeded inn doing so, position the latch plate over the bbolt hole and trae itss outline onto the door.
    Tumbler padlocks would be the most typical selection of locis
    enployed in typidal homes. You can always chip more away,
    but you can’t increase the amount of wood once it’s
    gone.

Speak Your Mind

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.