This is week 21 and 22 of 2019. In my recent work, I need to access a phpBB forum. A very old code base that use table layout and doesn’t have mobile friendly CSS. By using the WKWebView in iOS, I can inject CSS to change the loaded HTML. Specifically, I apply the following style:
- Make the wrapper `100vw` width.
- Turn `td` into block element.
- Apply image `max-width` to 100%.
- Adjust font-size to fit mobile reading.