[Question] Webview font size is auto adjusting as system font size
See original GitHub issueI wrote a simple webpage. This page only contains marquee
element.
<style>
#text {
padding: 0;
font-size: 65vh;
}
</style>
<marquee behavior="scroll" scrollamount="50" id="text">hello world</marquee>
And I wraped this page as a webview in React Native.
export default function App() {
return (
<WebView
source={{ uri: `https://marquee-page-url.com`}}
/>
);
}
It works like the below image. It works perfectly.
But if I change system (Android’s) font size, than it works wrong. The font is too big.
I’m suspecting that system font size is effecting webview’s font size. I want webview’s font size to be fixed. How to do this?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Android WebView scaled font size - Stack Overflow
The size is defined in a dimens resource, so my fontSize variable on an xhdpi device comes in as 36, which is not...
Read more >The font size and line width in Webview is different ... - MSDN
I manage to display the website in mobile phone using webview however the font size and line width in webview is bigger than...
Read more >text-size-adjust - CSS: Cascading Style Sheets - MDN Web Docs
The text-size-adjust property is specified as none , auto , or a <percentage> . Values. none. Disables the browser's inflation algorithm. auto.
Read more >How do I increase the font size of content in WebView? - Quora
This is what I use when I want to enable the user to change the text size / zoom in a [code ]WebView[/code]:...
Read more >Android Question Webview font size scaling with system ... - B4X
When i open my server website page in a browser then all font size on buttons fit correct. When i open the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you tried textZoom?
Hi, just tested, but works only on Android… not iOS.