Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font size inconsistent on iOS (appears fine in development, but differs for live/production) #45

Closed
AndrewNow opened this issue Jul 17, 2022 · 2 comments

Comments

@AndrewNow
Copy link

AndrewNow commented Jul 17, 2022

Hey all,

I'm having an issue styling the font size of the children of my marquee.

The font size doesn't seem to change on the live version of the site, but appears fine locally.

Testing:
image

Production:
image

Here's my code:

const BannerMarquee = ({ data }) => {
  return (
    <Wrapper>
      <Marquee gradientWidth={0} speed={55}>
        <small>
          <Link href={`${data.link}`}>{data.title}</Link>
        </small>
      </Marquee>
    </Wrapper>
  );
};

export default BannerMarquee;

const Wrapper = styled.div`
  width: 100%;
  background-color: var(--color-turquoise);
  * {
    font-size: 16px !important;
  }
  small {
    padding: 1rem 0;
  }

  small > a {
    text-decoration: none;
    color: var(--static-black);
  }

  :hover {
    /* cursor: pointer; */
    small > a {
      text-decoration: underline;
    }
  }
  @media (max-width: ${breakpoints.m}px) {
    * {
      font-size: 14px !important;
    }
  }
`;
@givi-phirtskhalava
Copy link

Hi @AndrewNow, had the same issue and this seems to fix it:

body { -webkit-text-size-adjust: 100%; }

More on https://stackoverflow.com/a/4966556

@fallenleavesguy
Copy link

me too.-webkit-text-size-adjust: 100%; fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants