R
Reactiflux

anonn – 10-05 Oct 12

anonn – 10-05 Oct 12

Aanonn10/12/2022
im using next js, and trying to use the meta tag for retaining the font size for phone viewports, but the font size of text when I go to the phone emulator in devtools doesn't seem to change. _app.js
import "../styles/globals.css";
import type { AppProps } from "next/app";
import Head from "next/head";

function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
</Head>
<Component {...pageProps} />
</>
);
}
import "../styles/globals.css";
import type { AppProps } from "next/app";
import Head from "next/head";

function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
</Head>
<Component {...pageProps} />
</>
);
}
UUUnknown User10/12/2022
Message Not Public
Sign In & Join Server To View
Aanonn10/12/2022
Sorry I will rephrase, I meant the purpose of the meta tag is the prevent the zoom out when the viewport is a phone. I know the meta tag will work for all viewports. My problem is that the meta tag does not take effect in removing the zoom out when the viewport is a phone, I must have some sort of error in my code. When I tried using the meta tag in a purely html file it worked, but with next.js it doesnt. nvm it works !close
UUUnknown User10/13/2022
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

anonn – 10-05 Oct 12

Join Server